i18n: Hindi rows no longer keep English words or garble their sentences

264 Hindi rows kept English words in a Hindi sentence ("or", "give",
"see"), dropped the word that names what is wrong ("unknown align" read
as "unknown `left`"), reversed a condition ("not editing an opacity
mask" read as "do not edit an opacity mask"), translated enum values the
command reads in English, broke a list of accepted values
("(vertical|horizontal|free)" read as "(vertical Chhorizontal
Chlorfree)"), or repeated a parameter as a "size: आकार" prefix. Each row
now says what its English says, with parameter names, enum values,
placeholders and value lists unchanged, and "positive" reads धनात्मक.

Two tests check every row: no English connecting word outside
backticks, quotes, braces and brackets, and every `a|b|c` list of an
`@msg` row kept as written.
This commit is contained in:
dotCooCoo
2026-11-13 13:21:38 -08:00
parent c9b2119552
commit d5e2a95403
4 changed files with 325 additions and 264 deletions
File diff suppressed because it is too large Load Diff
+53
View File
@@ -113,6 +113,59 @@ fn hindi_rows_keep_the_meaning_of_their_english() {
assert!(all.contains("3 आर्टबोर्ड में से 1") && all.contains("सभी आर्टबोर्ड रखने के लिए"), "{all}");
let left_out = message(hi, "the file was read up to an error (bad xref): what follows it was left out");
assert!(left_out.contains("उसके बाद का हिस्सा छोड़ दिया गया"), "{left_out}");
assert_eq!(message(hi, "unknown align `left`"), "अज्ञात संरेखण `left`");
assert_eq!(tr(hi, "Delete Library Group"), "लाइब्रेरी ग्रुप हटाएँ");
assert_eq!(message(hi, "not editing an opacity mask"), "ओपेसिटी मास्क संपादित नहीं किया जा रहा है");
assert_eq!(
message(hi, "a page thumbnail must be RGB pixels, 1 to 256 a side (got 0 × 4)"),
"पेज थंबनेल RGB पिक्सल का होना चाहिए, हर तरफ़ 1 से 256 (मिला 0 × 4)"
);
assert_eq!(message(hi, "invalid angle"), "अमान्य कोण");
}
/// Hindi messages keep every `a|b|c` list of accepted values exactly as their English writes it.
#[test]
fn hindi_messages_keep_their_lists_of_accepted_values() {
let hi = Lang::from_code("hi").expect("hi registered");
let (entries, _) = parse_entries(hi.0.source);
let mut wrong = Vec::new();
for (_, src, translation) in entries.iter().filter(|(ctx, _, _)| ctx == "@msg") {
let lists = src.split(|c: char| !(c.is_ascii_alphabetic() || c == '|')).filter(|w| w.contains('|') && w.split('|').all(|v| !v.is_empty()));
for list in lists.filter(|list| !translation.contains(*list)) {
wrong.push(format!("{list} in {src:?} -> {translation:?}"));
}
}
assert!(wrong.is_empty(), "{} Hindi messages change a list of values:\n{}", wrong.len(), wrong.join("\n"));
}
/// Hindi rows leave no English connecting word in their sentences. Text in backticks, quotes,
/// braces and brackets is a name, value or placeholder and keeps its English.
#[test]
fn hindi_rows_keep_no_english_words_in_their_sentences() {
const ENGLISH: [&str; 13] = ["or", "and", "the", "must", "give", "see", "use", "most", "is", "of", "be", "not", "an"];
let hi = Lang::from_code("hi").expect("hi registered");
let (entries, _) = parse_entries(hi.0.source);
let mut wrong = Vec::new();
for (_, src, translation) in &entries {
let mut prose = String::new();
let mut close = None;
for c in translation.chars() {
match (close, c) {
(Some(end), _) if c == end => close = None,
(Some(_), _) => {}
(None, '`') => close = Some('`'),
(None, '"') => close = Some('"'),
(None, '“') => close = Some('”'),
(None, '{') => close = Some('}'),
(None, '[') => close = Some(']'),
(None, _) => prose.push(c),
}
}
if let Some(word) = prose.split(|c: char| !c.is_ascii_alphabetic()).find(|w| ENGLISH.contains(w)) {
wrong.push(format!("{word} in {src:?} -> {translation:?}"));
}
}
assert!(wrong.is_empty(), "{} Hindi rows keep an English word:\n{}", wrong.len(), wrong.join("\n"));
}
/// Locale tags name their language by region or script (in either case, with an encoding or
+7
View File
@@ -40,6 +40,13 @@ community. The stroke corner names (Bevel Join, Miter Join, Round Join) and the
जॉइन. `hindi_rows_use_one_term_for_a_variable_and_for_joining_paths` checks both terms in every
row.
A sentence keeps no English connecting word such as "or", "must" or "give": write या, होना
चाहिए and दें. Parameter names, enum values and command IDs stay in English, and a list of
accepted values such as `(left|right|top|bottom)` keeps the English's spelling and its `|`
separators. `hindi_rows_keep_no_english_words_in_their_sentences` checks every row outside
backticks, quotes, braces and brackets, and `hindi_messages_keep_their_lists_of_accepted_values`
checks every `@msg` row's lists.
## Terminology
| English | Hindi |
+1
View File
@@ -870,6 +870,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
- Hindi (2026-11-06): Hindi (`hi`): 7,877-row machine-assisted catalog, zero/one singular plurals, desktop font fallback and optional Devanagari craft-fonts fallback; all 55 translation tests pass; native review and a web font remain; scores and estimates unchanged. [Terminology and limitations](localization-hi.md).
- Hindi wording (2026-11-13): rows outside the plug-in messages keep their English's meaning, quantities and clauses, and use the catalog's save, swatch, crop, resolution, path and type terms; a test checks those terms and the point unit in every row; native review remains; scores and estimates unchanged.
- Hindi terms (2026-11-13): every row that names a variable (data merge, variable fonts and widths, environment variables) says वेरिएबल, and joining paths, anchor points, point type and lines says जोड़ें instead of शामिल हों, which stays for joining the community; a test checks both terms in every row; scores and estimates unchanged.
- Hindi English words (2026-11-13): 264 rows no longer keep English words in their sentences, repeat a parameter's name in Hindi or garble them, among them "unknown align", which now names the alignment; lists of accepted values such as `(left|right|top|bottom)` stay as their English writes them; two tests check every row; native review remains; scores and estimates unchanged.
- Window › Help Bar shows or hides the tool-help strip at the bottom of the window apart from the status bar (`window.helpBar`). Each setting is kept with the UI preferences and in saved workspaces, and Presentation Mode hides both bars. Layouts saved before the setting existed show the Help Bar where they show the status bar (`help_bar_toggle_is_independent_and_saved_in_workspaces`, `help_bar_and_status_bar_render_independently`, `legacy_help_bar_visibility_follows_each_layouts_status_bar`, `a_help_bar_setting_the_file_lacks_is_saved`).
- Czech render-site labels: desktop/web file filters, diagnostics, suggested preset names and contributor tooltips/plurals now use catalog lookups; gradients have Czech adjective agreement and printer marks have a separate context (PDF/Print and Summary). Search, Home, toolbar/panel tooltips and Preferences already look up their labels. Every complete catalog has rows for these labels and for the Roman and Japanese printer mark styles. Evidence: `i18n::tests::czech_render_site_follow_up`, `i18n::tests::complete_catalogs_translate_render_site_labels`, `dialogs::tests_modal::printer_mark_labels_are_distinct_from_language_names`; see [localization-parity.md](localization-parity.md).
- The History panel, Edit › Undo and Edit › Redo translate the names of the steps that apply or redefine a character or paragraph style and of the step that redefines a graphic style: each such step keeps its template (`Apply {name}`, `Redefine {name}`, `Redefine Graphic Style “{name}”`) and the style's name, every complete catalog has a row for each template, and the panel and the menu show the style's name as the document holds it, except the Normal styles' names, which they show in the interface language (`steps_named_after_a_style_list_the_template_around_the_name`, `undo_and_redo_name_a_style_step_around_the_style_name`).