Skip to content

EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust

Merge #1843: i18n: Georgian (ka) interface language (@devius)

aionggfefe4b8a91db
diff --cc crates/ui-egui/src/i18n/effects.rs
index 4aa32f887,8b410d4d2..b41430bed
--- a/crates/ui-egui/src/i18n/effects.rs
+++ b/crates/ui-egui/src/i18n/effects.rs
@@@ -566,7 -909,7 +908,7 @@@ mod tests
const PENDING: &[(&str, &[Row])] = &[("zh-hant", TRADITIONAL_CHINESE)];
/// The languages whose tables are being filled in: guarded like [`PENDING`] row by row.
-- const PARTIAL: &[(&str, &[Row])] = &[("ja", JAPANESE_EFFECTS)];
++ const PARTIAL: &[(&str, &[Row])] = &[("ja", JAPANESE_EFFECTS), ("ka", GEORGIAN)];
/// A pending language may lag Simplified Chinese but may not invent ids or disagree about
/// which effect an id names: a translator fills these tables row by row. While they are
@@@ -590,12 -933,18 +932,14 @@@
}
}
- /// Every category the registry and its plug-ins report has a Simplified Chinese row, and
- /// every row of every language names a category that exists — else the generated Effect menu
- /// and Effects & Presets would draw a label no folder has.
+ /// Every category row of every language names a category that exists, else the generated
+ /// Effect menu and Effects & Presets would carry a label no folder has.
#[test]
- fn every_category_has_a_row() {
+ fn every_category_row_names_a_category() {
let categories = effects::categories();
- for (language, rows) in [("zh-hans", SIMPLIFIED_CHINESE_CATEGORIES), ("zh-hant", TRADITIONAL_CHINESE_CATEGORIES), ("ja", JAPANESE_CATEGORIES)] {
- for category in &categories {
- assert!(SIMPLIFIED_CHINESE_CATEGORIES.iter().any(|(english, _)| english == category), "no catalog row for category {category}");
- }
+ for (language, rows) in
+ [("zh-hans", SIMPLIFIED_CHINESE_CATEGORIES), ("zh-hant", TRADITIONAL_CHINESE_CATEGORIES), ("ja", JAPANESE_CATEGORIES), ("ka", GEORGIAN_CATEGORIES)]
+ {
for (english, translated) in rows {
assert!(categories.contains(english), "{language} lists {english}, which is not a category");
assert!(!translated.is_empty(), "empty {language} translation for {english}");
diff --cc crates/ui-egui/src/i18n/ui.rs
index dea81fad5,c42a17ff9..fab6c2e04
--- a/crates/ui-egui/src/i18n/ui.rs
+++ b/crates/ui-egui/src/i18n/ui.rs
@@@ -40,18 -37,6 +40,20 @@@ pub(crate) fn current() -> &'static st
type Index = HashMap<&'static str, &'static str>;
+/// Every language with panel rows, for the tests and the missing-strings report.
+#[cfg(test)]
+const ROWS: &[(&str, &[(&str, &str)])] = &[
+ ("ja", JAPANESE),
+ ("zh-hans", SIMPLIFIED_CHINESE),
+ ("zh-hant", TRADITIONAL_CHINESE),
+ ("uk", UKRAINIAN),
+ ("pt-br", PORTUGUESE),
+ ("cs", CZECH),
+ ("es", SPANISH),
++ ("ka", GEORGIAN),
++ ("ka", GEORGIAN_PANELS),
+];
+
/// The catalog for `language`, indexed by English source (built on first use: panels translate
/// hundreds of strings a frame); `None` for English and any language that has no rows yet.
fn catalog(language: &str) -> Option<&'static Index> {
@@@ -4501,13 -5531,28 +5464,17 @@@ mod tests
/// English source carries is a bug in the catalog itself.
#[test]
fn catalogs_are_unique_and_keep_the_english_shape() {
- let hans: Vec<&str> = SIMPLIFIED_CHINESE.iter().map(|(en, _)| *en).collect();
- let hant: Vec<&str> = TRADITIONAL_CHINESE.iter().map(|(en, _)| *en).collect();
- assert_eq!(hans, hant, "the two Chinese catalogs list different source strings");
- let ka: Vec<&str> = GEORGIAN.iter().map(|(en, _)| *en).collect();
- assert_eq!(hans, ka, "the Georgian catalog lists different source strings from the Chinese ones");
- let ka_panels: Vec<&str> = GEORGIAN_PANELS.iter().map(|(en, _)| *en).collect();
- let shared: Vec<&str> = ka_panels.iter().copied().filter(|en| hans.contains(en)).collect();
- assert!(shared.is_empty(), "Georgian-only rows the Chinese catalogs have too (move them to GEORGIAN): {shared:?}");
- let mut own = ka_panels.clone();
- own.sort_unstable();
- own.dedup();
- assert_eq!(own.len(), ka_panels.len(), "a Georgian-only source string is listed twice");
- // Japanese, Ukrainian and Czech may lag the Chinese catalogs: a missing row falls back to English.
- for (name, cat) in [("Japanese", JAPANESE), ("Ukrainian", UKRAINIAN), ("Brazilian Portuguese", PORTUGUESE), ("Czech", CZECH), ("Spanish", SPANISH)] {
- let extra: Vec<&str> = cat.iter().map(|(en, _)| *en).filter(|en| !hans.contains(en)).collect();
- assert!(extra.is_empty(), "the {name} catalog lists source strings the Chinese ones don't: {extra:?}");
++ // Grouped by language: a source listed in two tables of one language is still a repeat.
++ let mut by_code: std::collections::BTreeMap<&str, Vec<&str>> = std::collections::BTreeMap::new();
+ for (code, rows) in ROWS {
- let mut sources: Vec<&str> = rows.iter().map(|(en, _)| *en).collect();
++ by_code.entry(code).or_default().extend(rows.iter().map(|(en, _)| *en));
++ }
++ for (code, mut sources) in by_code {
+ sources.sort_unstable();
+ let listed = sources.len();
+ sources.dedup();
+ assert_eq!(listed, sources.len(), "{code}: a source string is listed twice");
}
- let mut sorted = hans.clone();
- sorted.sort_unstable();
- let listed = sorted.len();
- sorted.dedup();
- assert_eq!(listed, sorted.len(), "a source string is listed twice");
for (en, translated) in catalogs() {
assert!(!en.is_empty() && !translated.is_empty(), "empty row for {en:?}");
assert!(en.contains("{}") || !en.contains('{'), "{en:?} has a placeholder but no `{{}}`");
@@@ -4529,6 -5574,62 +5496,16 @@@
set_current("en");
}
- /// The same language preference used for the menus reaches panels immediately, and formatted
- /// text keeps the caller's values intact even when they contain non-Ukrainian words.
++ /// Georgian also reads its own table, for text the other catalogs don't have yet.
+ #[test]
- fn ukrainian_panels_translate_and_keep_project_content() {
- set_current("uk");
- assert_eq!(tr("Composition Name:"), "Назва композиції:");
- assert_eq!(tr("Cancel"), "Скасувати");
- assert_eq!(tr("my layer.mp4"), "my layer.mp4");
- assert_eq!(tr_args("Proxy Use: {}", &[&"Best"]), "Використання проксі: Best");
- assert_eq!(tr_args("Step {} of {}: {}", &[&1, &3, &"Colour"]), "Крок 1 з 3: Colour");
- assert_eq!(tr_args("Template: {}\n{}", &[&"Title", &"My description"]), "Шаблон: Title\nMy description");
- set_current("en");
- assert_eq!(tr("Composition Name:"), "Composition Name:");
- }
-
- /// Brazilian Portuguese panels translate, fill values in order and keep project content.
- #[test]
- fn brazilian_portuguese_panels_translate_and_keep_project_content() {
- set_current("pt-br");
- assert_eq!(tr("Composition Name:"), "Nome da composição:");
- assert_eq!(tr("Cancel"), "Cancelar");
- assert_eq!(tr("my layer.mp4"), "my layer.mp4");
- assert_eq!(tr_args("Step {} of {}: {}", &[&1, &3, &"Colour"]), "Etapa 1 de 3: Colour");
- assert_eq!(tr(" OK "), " OK ");
- set_current("en");
- assert_eq!(tr("Cancel"), "Cancel");
- }
-
- /// Spanish panels translate, fill values in order and keep project content.
- #[test]
- fn spanish_panels_translate_and_keep_project_content() {
- set_current("es");
- assert_eq!(tr("Composition Name:"), "Nombre de la composición:");
- assert_eq!(tr("Cancel"), "Cancelar");
- assert_eq!(tr("my layer.mp4"), "my layer.mp4");
- assert_eq!(tr_args("Step {} of {}: {}", &[&1, &3, &"Colour"]), "Paso 1 de 3: Colour");
- set_current("en");
- assert_eq!(tr("Cancel"), "Cancel");
- }
-
- /// Georgian reads its own rows; counts stay count-neutral and values keep their order.
- #[test]
- fn georgian_panels_translate_and_keep_project_content() {
++ fn georgian_reads_its_own_panel_rows() {
+ set_current("ka");
- assert_eq!(tr("Composition Name:"), "კომპოზიციის სახელი:");
- assert_eq!(tr("Cancel"), "გაუქმება");
- assert_eq!(tr("my layer.mp4"), "my layer.mp4");
- assert_eq!(tr_args("Step {} of {}: {}", &[&1, &3, &"Colour"]), "ნაბიჯი 1 / 3: Colour");
- assert_eq!(tr_args("{} minutes ago", &[&5]), "5 წუთის წინ");
- // A Georgian-only row (GEORGIAN_PANELS), which other languages still draw in English.
- assert_eq!(tr("Solid Settings"), "სოლიდის პარამეტრები");
- set_current("cs");
- assert_eq!(tr("Solid Settings"), "Solid Settings");
++ for (source, _) in GEORGIAN_PANELS.iter().take(3) {
++ assert_eq!(tr(source), row(GEORGIAN_PANELS, source));
++ }
+ set_current("en");
+ }
+
/// Values fill the placeholders in order, and a missing value is dropped instead of panicking.
#[test]
fn tr_args_fills_values_in_order() {
diff --cc crates/ui-egui/src/theme.rs
index 9f5faddbb,c8aaafed7..932b0928f
--- a/crates/ui-egui/src/theme.rs
+++ b/crates/ui-egui/src/theme.rs
@@@ -646,24 -596,20 +647,35 @@@ mod script_font_tests
}
}
+ #[test]
+ fn the_interface_asks_for_the_platforms_ui_faces() {
+ // The face a window draws its own chrome with, which is not the one a composed frame
+ // renders with: the two orders are deliberately separate.
+ let ja = &["Meiryo UI", "Yu Gothic UI", "MS UI Gothic"][..];
+ assert_eq!(interface_fallback_candidates("japanese-system", "ja"), ja);
+ assert_eq!(interface_fallback_candidates("chinese-system", "ja"), ja);
+ assert_eq!(interface_fallback_candidates("chinese-system", "zh-hans"), &["Microsoft YaHei UI"][..]);
+ assert_eq!(interface_fallback_candidates("chinese-system", "zh-hant"), &["Microsoft JhengHei UI", "PMingLiU"][..]);
+ // Every other script the install probes has no UI variant, so it keeps the shared order.
+ for &(_, name) in SCRIPT_PROBES.iter() {
+ assert!(interface_fallback_candidates(name, "en").is_empty(), "{name} asked for a UI face");
+ }
+ }
+
+ /// The Georgian interface draws its Mkhedruli text with an installed Georgian face (Sylfaen,
+ /// SF Georgian, Noto Sans Georgian…): Inter has no Georgian, so the labels showed as boxes.
+ #[test]
+ fn installed_georgian_fallback_draws_the_georgian_interface() {
+ if !installed('ა') {
+ eprintln!("no Georgian system font installed; skipping glyph coverage");
+ return;
+ }
+ assert_drawn("ka", "კომპოზიციაფენასაკვანძოკადრიეფექტიპარამეტრები");
+ }
+
- /// #1141: switching the interface to Simplified Chinese drew most labels as boxes. The English
- /// interface had already loaded a Japanese face for kana, and that face covers the Han probe,
- /// so it became the Chinese fallback too, without the simplified-only hanzi.
+ /// #1141: switching the interface to Simplified Chinese drew most labels as boxes. A Japanese face
+ /// can cover the Han probe while lacking other catalog characters. The context must keep its
+ /// own language policy even when another context installs Japanese fallbacks concurrently.
#[test]
fn simplified_chinese_interface_draws_simplified_hanzi_after_another_language() {
let ctx = egui::Context::default();
diff --cc docs/localization-parity.md
index a9f6b04a6,9d53be6d3..3fcdf06de
--- a/docs/localization-parity.md
+++ b/docs/localization-parity.md
@@@ -1,6 -1,6 +1,6 @@@
# Localization parity
- > **Last reviewed:** 2026-10-12 · **Last updated:** 2026-10-23 · **Change:** minor (missing strings show in English; `missing_translations_report` lists them) · **Target:** Adobe After Effects 2026
-> **Last reviewed:** 2026-10-14 · **Last updated:** 2026-10-14 · **Change:** minor (catalogs recounted at `upstream/main` 470ea7a3: menus in 10 languages, panels in 6, Hangul probe (#599); Georgian: menus, panels and effect names) · **Target:** Adobe After Effects 2026
++> **Last reviewed:** 2026-10-14 · **Last updated:** 2026-10-23 · **Change:** minor (Georgian: menus, panels and effect names; missing strings show in English; `missing_translations_report` lists them) · **Target:** Adobe After Effects 2026
How much of EffectCraft's interface is translated, language by language, compared with After
Effects. [gaps.md](gaps.md) gap 16 and workstream G9 hold the work;
diff --cc docs/preferences.md
index 581410d7d,52fe92279..ce96da0bf
--- a/docs/preferences.md
+++ b/docs/preferences.md
@@@ -30,7 -30,7 +30,7 @@@ Commands (CLI, MCP, control channel)
### Settings that change behaviour
- - `general.language`: interface language (`system` / `en` / `ja` / `zh-hans` / `zh-hant` / `uk` / `es` / `pt-br`), Settings ▸ General ▸ Language; menu labels change immediately. `system` (Match System, the default) follows the operating system's interface language where EffectCraft has a translation and is English otherwise: a Simplified Chinese locale (`zh`, `zh-CN`, `zh_CN.UTF-8`, `zh-Hans-CN`, `zh-SG`) selects `zh-hans`, a Traditional one (`zh-TW`, `zh-HK`, `zh-Hant`, `zh_MO`) selects `zh-hant`, a Ukrainian one (`uk`, `uk-UA`, `uk_UA.UTF-8`) selects `uk`, a Spanish one (`es`, `es-ES`, `es_MX.UTF-8`) selects `es`, a Portuguese one (`pt`, `pt-BR`, `pt_PT.UTF-8`) selects `pt-br`; the browser build follows `?lang=` in the address, then the browser's languages (`navigator.languages`). Choose **Español** or **Português (Brasil)** for Spanish or Brazilian Portuguese menus (panels stay in English for now); choose **Українська** for Ukrainian menus and cataloged panel, dialog, button and tooltip text; Ukrainian uses the bundled UI fonts. Native Japanese, Simplified and Traditional Chinese UI uses installed system fonts; the web host must supply a Japanese font. The same setting picks the CJK fallback for the interface *and* the Han preference of the text engine, so the composition's own text is drawn with the same language's glyph forms (the text engine's preference is process-global); swapping the language reinstalls the fonts, so it applies without a restart. Two catalogs back the text: the menus are keyed by `(command, English label)` (`crates/ui-egui/src/i18n.rs`), and the rest of the interface - panels, dialogs, buttons, tooltips - is keyed by its English source string (`crates/ui-egui/src/i18n/ui.rs`, with rows for Japanese, Simplified and Traditional Chinese and Ukrainian), where a panel writes `tr("Rename")`, or `tr_args("Proxy Use: {}", &[&quality])` when the row carries a value. A row that is missing falls back to English, so a new string shows up untranslated rather than empty; the `missing_translations_report` test lists what each language lacks, and the tests in `ui.rs` fail on an unused row.
-- `general.language`: interface language (`system` / `en` / `ja` / `zh-hans` / `zh-hant` / `uk` / `es` / `pt-br` / `ka`), Settings ▸ General ▸ Language; menu labels change immediately. `system` (Match System, the default) follows the operating system's interface language where EffectCraft has a translation and is English otherwise: a Simplified Chinese locale (`zh`, `zh-CN`, `zh_CN.UTF-8`, `zh-Hans-CN`, `zh-SG`) selects `zh-hans`, a Traditional one (`zh-TW`, `zh-HK`, `zh-Hant`, `zh_MO`) selects `zh-hant`, a Ukrainian one (`uk`, `uk-UA`, `uk_UA.UTF-8`) selects `uk`, a Spanish one (`es`, `es-ES`, `es_MX.UTF-8`) selects `es`, a Portuguese one (`pt`, `pt-BR`, `pt_PT.UTF-8`) selects `pt-br`, a Georgian one (`ka`, `ka-GE`, `ka_GE.UTF-8`) selects `ka`; the browser build follows `?lang=` in the address, then the browser's languages (`navigator.languages`). Choose **Español** or **Português (Brasil)** for Spanish or Brazilian Portuguese menus (panels stay in English for now); choose **Українська** for Ukrainian menus and cataloged panel, dialog, button and tooltip text; Ukrainian uses the bundled UI fonts. Native Japanese, Simplified and Traditional Chinese UI uses installed system fonts; the web host must supply a Japanese font. The same setting picks the CJK fallback for the interface *and* the Han preference of the text engine, so the composition's own text is drawn with the same language's glyph forms (the text engine's preference is process-global); swapping the language reinstalls the fonts, so it applies without a restart. Two catalogs back the text: the menus are keyed by `(command, English label)` (`crates/ui-egui/src/i18n.rs`), and the rest of the interface - panels, dialogs, buttons, tooltips - is keyed by its English source string (`crates/ui-egui/src/i18n/ui.rs`, with rows for Japanese, Simplified and Traditional Chinese and Ukrainian), where a panel writes `tr("Rename")`, or `tr_args("Proxy Use: {}", &[&quality])` when the row carries a value. A row that is missing falls back to English, so a new string shows up untranslated rather than empty; the tests in that module fail on an unused row and on a hard-coded string in a converted panel.
++- `general.language`: interface language (`system` / `en` / `ja` / `zh-hans` / `zh-hant` / `uk` / `es` / `pt-br` / `ka`), Settings ▸ General ▸ Language; menu labels change immediately. `system` (Match System, the default) follows the operating system's interface language where EffectCraft has a translation and is English otherwise: a Simplified Chinese locale (`zh`, `zh-CN`, `zh_CN.UTF-8`, `zh-Hans-CN`, `zh-SG`) selects `zh-hans`, a Traditional one (`zh-TW`, `zh-HK`, `zh-Hant`, `zh_MO`) selects `zh-hant`, a Ukrainian one (`uk`, `uk-UA`, `uk_UA.UTF-8`) selects `uk`, a Spanish one (`es`, `es-ES`, `es_MX.UTF-8`) selects `es`, a Portuguese one (`pt`, `pt-BR`, `pt_PT.UTF-8`) selects `pt-br`, a Georgian one (`ka`, `ka-GE`, `ka_GE.UTF-8`) selects `ka`; the browser build follows `?lang=` in the address, then the browser's languages (`navigator.languages`). Choose **Español** or **Português (Brasil)** for Spanish or Brazilian Portuguese menus (panels stay in English for now); choose **Українська** for Ukrainian menus and cataloged panel, dialog, button and tooltip text; Ukrainian uses the bundled UI fonts. Native Japanese, Simplified and Traditional Chinese UI uses installed system fonts; the web host must supply a Japanese font. The same setting picks the CJK fallback for the interface *and* the Han preference of the text engine, so the composition's own text is drawn with the same language's glyph forms (the text engine's preference is process-global); swapping the language reinstalls the fonts, so it applies without a restart. Two catalogs back the text: the menus are keyed by `(command, English label)` (`crates/ui-egui/src/i18n.rs`), and the rest of the interface - panels, dialogs, buttons, tooltips - is keyed by its English source string (`crates/ui-egui/src/i18n/ui.rs`, with rows for Japanese, Simplified and Traditional Chinese and Ukrainian), where a panel writes `tr("Rename")`, or `tr_args("Proxy Use: {}", &[&quality])` when the row carries a value. A row that is missing falls back to English, so a new string shows up untranslated rather than empty; the `missing_translations_report` test lists what each language lacks, and the tests in `ui.rs` fail on an unused row.
- `general.undoLevels`: Levels of Undo
- `general.pathPointSize`: Path Point and Handle Size
- `general.recentItems`: Recent Projects Shown