i18n: a locale per app, catalogs of messages, mirrored stacks

i18n::I18n is a gpui global holding the shown locale and one catalog of
messages per locale. text fills each {name} from its arguments; a
missing key, argument or catalog fails, and every catalog holds the
first one's keys. Locale writes numbers with its separators and dates
in CLDR's short numeric form; Hebrew replaces Arabic, whose Egyptian
digits Ely does not write. Direction::row mirrors a stack and
Direction::align sets text against the reading side. The gallery's
chapter 40 shows the messages in seven locales, every locale's number
and date, and a file list that mirrors under Hebrew.
This commit is contained in:
ZacharyZhang-NY committed 2026-09-27 18:59:45 -04:00
1 parent 17e3e19fc9
commit ae5f2334f5
9 files changed
+616 -4

No files matched your search

+3
View File
@@ -18,6 +18,7 @@ mod finance;
mod forms;
mod generative;
mod git;
mod i18n;
mod interaction;
mod layout;
mod lists;
@@ -92,8 +93,10 @@ pub const ALL: &[Page] = &[
onboarding::PAGE,
interaction::PAGE,
theme::PAGE,
i18n::PAGE,
];
pub use i18n::install as install_i18n;
pub use interaction::bind_keys;
pub use shell::{open_about, open_managed};