i18n: Hebrew on one line, its sign held left, CLDR's short years
gpui 0.2.2 wraps shaped glyphs in the order they are drawn, so a right-to-left line that wraps comes out garbled. The demo's Hebrew lines are Ellipses, which cut by characters, and an Ellipsis now sits by its text's alignment, so a short line under text_right lies at the right; the editor's completion details take the side they ask for. A right-to-left locale leads a minus with a left-to-right mark, as CLDR does, so the sign stays at the digits' left inside Hebrew. en-US and de-DE write CLDR's two-digit year. The repeated-key and second-catalog guards have tests.
This commit is contained in:
1 parent
ae5f2334f5
commit
83ecacde65
6 files changed
+68
-18
No files matched your search
@@ -3,6 +3,7 @@ use ely_gpui_component::{
|
||||
i18n::{I18n, LOCALES},
|
||||
primitives::{Icon, IconName},
|
||||
theme::{ActiveTheme, Radius},
|
||||
typography::Ellipsis,
|
||||
};
|
||||
use gpui::{AnyElement, App, IntoElement, ParentElement, Styled, Window, div, px};
|
||||
use jiff::{Timestamp, tz::TimeZone};
|
||||
@@ -147,7 +148,7 @@ fn messages(cx: &App) -> impl IntoElement + use<> {
|
||||
.flex()
|
||||
.flex_col()
|
||||
.gap_1()
|
||||
.children(lines.map(|line| div().child(line))),
|
||||
.children(lines.map(Ellipsis::new)),
|
||||
),
|
||||
cx,
|
||||
)),
|
||||
@@ -190,7 +191,7 @@ fn mirrored(cx: &App) -> impl IntoElement + use<> {
|
||||
.px_3()
|
||||
.py_2()
|
||||
.child(Icon::new(IconName::File).color(theme.colors.fg_muted))
|
||||
.child(direction.align(div().flex_1().min_w_0().child(name)))
|
||||
.child(direction.align(div().flex_1().min_w_0().child(Ellipsis::new(name))))
|
||||
.child(
|
||||
div()
|
||||
.flex_none()
|
||||
|
||||
Reference in new issue
Block a user