mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-01 03:17:20 -05:00
[PR #10206] [MERGED] i18n: Improve RTL text handling in chat and sidebar with auto-direction #109787
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/10206
Author: @ttv20
Created: 2/17/2025
Status: ✅ Merged
Merged: 2/17/2025
Merged by: @tjbck
Base:
dev← Head:patch-1📝 Commits (7)
ab94017Auto text direction (fix for RTL) in most casesb73b834fix table header align on rtl834617afix blockquote border line direction in RTL0888dddFix card title direction and alignment (for RTL)93590d2Merge branch 'dev' into patch-1d26569fUpdate ChatItem.svelte: Revert text-align for download button in rtl8d14934Update MarkdownTokens.svelte: Revert text-align for download button in rtl📊 Changes
3 files changed (+8 additions, -8 deletions)
View changed files
📝
src/app.css(+2 -2)📝
src/lib/components/chat/Messages/Markdown/MarkdownTokens.svelte(+5 -5)📝
src/lib/components/layout/Sidebar/ChatItem.svelte(+1 -1)📄 Description
Enhances the handling of right-to-left (RTL) text in chat messages and sidebar titles by implementing automatic text direction detection.
Key Changes:
Added
dir="auto"attribute to:Fixed RTL-specific styling:
border-lefttoborder-inline-starttext-align: righttotext-align: startTechnical Details:
There are two approaches to handle bi-directional text:
unicode-bidi: plain-texton the text container element (doen't work on parent element)dir="auto"attribute to the parent element (chosen approach)Testing:
To verify these changes, use the following prompt:
For a live example of the behavior, see: https://codepen.io/ssfrzglx-the-lessful/pen/KwKdRXP


Before:
After:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.