Merge pull request #10304 from ttv20/dev

i18n: Improve RTL text handling in chat and sidebar with auto-direction #2
This commit is contained in:
Timothy Jaeryang Baek 2025-02-18 19:31:12 -08:00 committed by GitHub
commit a33214ab6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 4 deletions

View File

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.5.15]
### Added
- **🌍 Enhanced Internationalization (i18n)**: Improved right-to-left languages experience with automatic text direction handling in chat and sidebar
## [0.5.14] - 2025-02-17 ## [0.5.14] - 2025-02-17
### Fixed ### Fixed

View File

@ -76,7 +76,7 @@
{#if token.type === 'hr'} {#if token.type === 'hr'}
<hr class=" border-gray-100 dark:border-gray-850" /> <hr class=" border-gray-100 dark:border-gray-850" />
{:else if token.type === 'heading'} {:else if token.type === 'heading'}
<svelte:element this={headerComponent(token.depth)}> <svelte:element this={headerComponent(token.depth)} dir="auto">
<MarkdownInlineTokens id={`${id}-${tokenIdx}-h`} tokens={token.tokens} {onSourceClick} /> <MarkdownInlineTokens id={`${id}-${tokenIdx}-h`} tokens={token.tokens} {onSourceClick} />
</svelte:element> </svelte:element>
{:else if token.type === 'code'} {:else if token.type === 'code'}
@ -176,7 +176,7 @@
{#if token.ordered} {#if token.ordered}
<ol start={token.start || 1}> <ol start={token.start || 1}>
{#each token.items as item, itemIdx} {#each token.items as item, itemIdx}
<li dir="auto"> <li dir="auto" class="text-start">
{#if item?.task} {#if item?.task}
<input <input
class=" translate-y-[1px] -translate-x-1" class=" translate-y-[1px] -translate-x-1"
@ -208,7 +208,7 @@
{:else} {:else}
<ul> <ul>
{#each token.items as item, itemIdx} {#each token.items as item, itemIdx}
<li dir="auto"> <li dir="auto" class="text-start">
{#if item?.task} {#if item?.task}
<input <input
class=" translate-y-[1px] -translate-x-1" class=" translate-y-[1px] -translate-x-1"
@ -239,7 +239,7 @@
</ul> </ul>
{/if} {/if}
{:else if token.type === 'details'} {:else if token.type === 'details'}
<Collapsible title={token.summary} attributes={token?.attributes} className="w-full space-y-1"> <Collapsible title={token.summary} attributes={token?.attributes} className="w-full space-y-1" dir="auto">
<div class=" mb-1.5" slot="content"> <div class=" mb-1.5" slot="content">
<svelte:self <svelte:self
id={`${id}-${tokenIdx}-d`} id={`${id}-${tokenIdx}-d`}