Merge pull request #2645 from nihilist-narwhal/i18n/split-add-comma

i18n: Paste Special's Add and Text to Columns' Comma get their own keys
This commit is contained in:
FredApps authored and GitHub committed 2026-11-26 21:42:11 +01:00
commit 79285118ca
11 files changed
+44 -3

No files matched your search

+8 -2
View File
@@ -531,7 +531,13 @@ impl Dialog {
Choice {
key: "operation",
label: "Operation",
options: vec![("none", "None"), ("add", "Add"), ("subtract", "Subtract"), ("multiply", "Multiply"), ("divide", "Divide")],
options: vec![
("none", "None"),
("add", "Paste Special|Add"),
("subtract", "Subtract"),
("multiply", "Multiply"),
("divide", "Divide"),
],
},
Check { key: "skipBlanks", label: "Skip blanks" },
Check { key: "transpose", label: "Transpose (E)" },
@@ -673,7 +679,7 @@ impl Dialog {
vec![
Check { key: "tab", label: "Tab" },
Check { key: "semicolon", label: "Semicolon" },
Check { key: "comma", label: "Comma" },
Check { key: "comma", label: "Text to Columns|Comma" },
Check { key: "space", label: "Space" },
Text { key: "other", label: "Other:" },
Check { key: "treatConsecutive", label: "Treat consecutive delimiters as one" },
+18
View File
@@ -667,6 +667,24 @@ mod tests {
}
}
#[test]
fn paste_special_add_and_text_to_columns_comma_have_their_own_keys() {
// "Add" is also the Solver button and "Comma" also the cell style (Spanish Excel: Sumar
// vs Agregar, Coma vs Millares), so the two dialog options are keyed by context. English
// shows the plain label, and a catalog that translates the plain label translates the
// keyed one too, so the dialog option doesn't fall back to English.
for (keyed, plain) in [("Paste Special|Add", "Add"), ("Text to Columns|Comma", "Comma")] {
assert_eq!(Language::En.tr(keyed), plain);
for language in Language::ALL {
let shown = language.tr(keyed);
assert!(!shown.contains('|'), "{} shows a context prefix for {keyed}: {shown}", language.code());
if language.tr(plain) != plain {
assert_ne!(shown, plain, "{} translates {plain:?} but not {keyed:?}", language.code());
}
}
}
}
#[test]
fn translations_never_show_the_context_prefix() {
// `tr` returns a found translation as it is, so a catalog that keeps `context|` in its
+2
View File
@@ -672,6 +672,7 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Values and number formats" => "Τιμές και μορφές αριθμών",
"Operation" => "Πράξη",
"Add" => "Πρόσθεση",
"Paste Special|Add" => "Πρόσθεση",
"Subtract" => "Αφαίρεση",
"Multiply" => "Πολλαπλασιασμός",
"Divide" => "Διαίρεση",
@@ -709,6 +710,7 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Tab" => "Στηλοθέτης",
"Semicolon" => "Ερωτηματικό (;)",
"Comma" => "Κόμμα",
"Text to Columns|Comma" => "Κόμμα",
"Space" => "Διάστημα",
"Other:" => "Άλλο:",
"Treat consecutive delimiters as one" => "Αντιμετώπιση διαδοχικών διαχωριστικών ως ενός",
+2
View File
@@ -553,6 +553,7 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Values and number formats" => "Valori e formati numero",
"Operation" => "Operazione",
"Add" => "Aggiungi",
"Paste Special|Add" => "Aggiungi",
"Subtract" => "Sottrai",
"Multiply" => "Moltiplica",
"Divide" => "Dividi",
@@ -592,6 +593,7 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Tab" => "Tabulazione",
"Semicolon" => "Punto e virgola",
"Comma" => "Virgola",
"Text to Columns|Comma" => "Virgola",
"Space" => "Spazio",
"Other:" => "Altro:",
"Treat consecutive delimiters as one" => "Considera delimitatori consecutivi come uno solo",
+2
View File
@@ -570,6 +570,7 @@ pub(super) const DIALOGS: &[(&str, &str)] = &[
("Values and number formats", "値と数値の書式"),
("Operation", "演算"),
("Add", "加算"),
("Paste Special|Add", "加算"),
("Subtract", "減算"),
("Multiply", "乗算"),
("Divide", "除算"),
@@ -609,6 +610,7 @@ pub(super) const DIALOGS: &[(&str, &str)] = &[
("Tab", "タブ"),
("Semicolon", "セミコロン"),
("Comma", "コンマ"),
("Text to Columns|Comma", "コンマ"),
("Space", "スペース"),
("Other:", "その他:"),
("Treat consecutive delimiters as one", "連続した区切り文字は 1 文字として扱う"),
+2
View File
@@ -544,6 +544,7 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Values and number formats" => "Wartości i formaty liczb",
"Operation" => "Operacja",
"Add" => "Dodaj",
"Paste Special|Add" => "Dodaj",
"Subtract" => "Odejmij",
"Multiply" => "Pomnóż",
"Divide" => "Podziel",
@@ -583,6 +584,7 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Tab" => "Tabulator",
"Semicolon" => "Średnik",
"Comma" => "Przecinek",
"Text to Columns|Comma" => "Przecinek",
"Space" => "Spacja",
"Other:" => "Inny:",
"Treat consecutive delimiters as one" => "Traktuj kolejne ograniczniki jako jeden",
+2
View File
@@ -580,6 +580,7 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Values and number formats" => "Valores e formatos de número",
"Operation" => "Operação",
"Add" => "Adicionar",
"Paste Special|Add" => "Adicionar",
"Subtract" => "Subtrair",
"Multiply" => "Multiplicar",
"Divide" => "Dividir",
@@ -619,6 +620,7 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Tab" => "Tabulação",
"Semicolon" => "Ponto e vírgula",
"Comma" => "Vírgula",
"Text to Columns|Comma" => "Vírgula",
"Space" => "Espaço",
"Other:" => "Outros:",
"Treat consecutive delimiters as one" => "Considerar delimitadores consecutivos como um só",
+2
View File
@@ -550,6 +550,7 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Values and number formats" => "Valori și formate de număr",
"Operation" => "Operație",
"Add" => "Adăugare",
"Paste Special|Add" => "Adăugare",
"Subtract" => "Scădere",
"Multiply" => "Înmulțire",
"Divide" => "Împărțire",
@@ -589,6 +590,7 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Tab" => "Tab",
"Semicolon" => "Punct și virgulă",
"Comma" => "Virgulă",
"Text to Columns|Comma" => "Virgulă",
"Space" => "Spațiu",
"Other:" => "Altele:",
"Treat consecutive delimiters as one" => "Delimitatorii consecutivi se tratează ca unul singur",
+2
View File
@@ -484,6 +484,7 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Action" => "Действие",
"Action Journal" => "Журнал действий",
"Add" => "Добавить",
"Paste Special|Add" => "Добавить",
"Add Chart Element" => "Добавить элемент диаграммы",
"Add subtotal to (columns, e.g. C,D):" => "Добавить итоги по (столбцы, например C,D):",
"Add to Dictionary" => "Добавить в словарь",
@@ -546,6 +547,7 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Columns (blank = all, e.g. A,C):" => "Столбцы (пусто = все, например A,C):",
"Combo" => "Комбинированная",
"Comma" => "Запятая",
"Text to Columns|Comma" => "Запятая",
"Comment:" => "Комментарий:",
"Comments and notes (C)" => "Комментарии и заметки (C)",
"Comments pane" => "Область комментариев",
+2
View File
@@ -548,6 +548,7 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Values and number formats" => "Values and number formats",
"Operation" => "Operation",
"Add" => "Add",
"Paste Special|Add" => "Add",
"Subtract" => "Subtract",
"Multiply" => "Multiply",
"Divide" => "Divide",
@@ -587,6 +588,7 @@ pub(super) fn translate(text: &str) -> Option<&'static str> {
"Tab" => "Tab",
"Semicolon" => "Semicolon",
"Comma" => "Comma",
"Text to Columns|Comma" => "Comma",
"Space" => "Space",
"Other:" => "Other:",
"Treat consecutive delimiters as one" => "Treat consecutive delimiters as one",
+2 -1
View File
@@ -1,6 +1,6 @@
# Localization parity
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (fill-handle and Home › Fill menu labels in every catalog); previously minor (RaTeX equation parser messages follow the interface language); previously minor (status bar statistics, resize tips, picture-in-cell text, sheet notes, Format Control title, equation errors, Goal Seek and macro toasts follow the interface language); previously minor (Arabic PDF export no longer fails when a character or the Arabic font is missing; Arabic PDF cells keep their reading direction and RTL pages mirror); previously minor (Brazilian Portuguese function help); previously minor (Ukrainian Chart is Діаграма); previously minor (Diagram and Decorative Text labels, Diagram distinct from Chart); previously minor (CJK fallback baseline alignment); previously minor (Arabic bidi display, editing and cell reading direction; missing translations are listed by `cargo xtask i18n-report` and never fail a check); previously minor (Arabic font fallback; missing translations are listed by `cargo xtask i18n-report` and never fail a check); previously minor (number formats honour the `B1`/`B2` calendar prefixes, checked against Excel; earlier: missing translations are listed by `cargo xtask i18n-report` and never fail a check; Arabic text sorts by its letters, not its vowel marks); previously minor (AutoFit estimates Arabic text width from measured glyph widths); previously minor (missing translations are listed by `cargo xtask i18n-report` and never fail a check; Arabic text sorts by its letters, not its vowel marks) · **Target:** Microsoft Excel (Microsoft 365), Excel for Mac 16.113.4
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (Paste Special's Add and Text to Columns' Comma get their own keys); previously minor (Ukrainian Chart is Діаграма); previously minor (Diagram and Decorative Text labels, Diagram distinct from Chart); previously minor (CJK fallback baseline alignment); previously minor (Arabic bidi display, editing and cell reading direction; missing translations are listed by `cargo xtask i18n-report` and never fail a check); previously minor (Arabic font fallback; missing translations are listed by `cargo xtask i18n-report` and never fail a check); previously minor (number formats honour the `B1`/`B2` calendar prefixes, checked against Excel; earlier: fill-handle and Home › Fill menu labels in every catalog); previously minor (RaTeX equation parser messages follow the interface language); previously minor (status bar statistics, resize tips, picture-in-cell text, sheet notes, Format Control title, equation errors, Goal Seek and macro toasts follow the interface language); previously minor (Arabic PDF export no longer fails when a character or the Arabic font is missing; Arabic PDF cells keep their reading direction and RTL pages mirror); previously minor (Brazilian Portuguese function help); previously minor (Ukrainian Chart is Діаграма); previously minor (Diagram and Decorative Text labels, Diagram distinct from Chart); previously minor (CJK fallback baseline alignment); previously minor (Arabic bidi display, editing and cell reading direction; missing translations are listed by `cargo xtask i18n-report` and never fail a check); previously minor (Arabic font fallback; missing translations are listed by `cargo xtask i18n-report` and never fail a check); previously minor (number formats honour the `B1`/`B2` calendar prefixes, checked against Excel; earlier: missing translations are listed by `cargo xtask i18n-report` and never fail a check; Arabic text sorts by its letters, not its vowel marks); previously minor (AutoFit estimates Arabic text width from measured glyph widths); previously minor (missing translations are listed by `cargo xtask i18n-report` and never fail a check; Arabic text sorts by its letters, not its vowel marks) · **Target:** Microsoft Excel (Microsoft 365), Excel for Mac 16.113.4
Per-language status against Excel, which ships its UI in dozens of languages (Windows language
packs cover 100+), with localized function names, argument separators, number and date formats,
@@ -158,6 +158,7 @@ language (none so far) and of localized function names.
| 2026-10-26 | minor | Arabic text renders in cells and the interface: a system Arabic face (Tahoma, Arial or Segoe UI on Windows, Geeza Pro on macOS, Noto Sans or Naskh Arabic on Linux) joins the script fallbacks, fontconfig's Arabic choice, when it has Arabic letters, leads the Arabic fallbacks and draws Arabic wherever the UI or cell font has none, such as the default cell fonts (part of #229; a UI font with Arabic of its own, such as DejaVu Sans in the Flatpak, still draws interface Arabic, left for a follow-up), and craft-fonts' Noto Sans Arabic is a required face allowed on the web. Workbook fonts without Arabic keep every script fallback. Shaping and bidirectional layout remain separate work |
| 2026-10-27 | minor | Number formats honour the `B1`/`B2` calendar prefixes: never shown; `B2` renders year, month, day and Arabic month and weekday names in the tabular Hijri calendar (1 Jan 2001 = 6 Shawwal 1421; leap years 2, 5, 7, 10, 13, 15, 18, 21, 24, 26 and 29 of the 30-year cycle, which is what Excel shows). Checked against Excel 16.0 (build 20527, en-US) on every serial and about 1,700 format/value pairs: a locale or currency tag before `B2` keeps the date Gregorian, a misplaced `B` and digit or a prefix before a number format is rejected, serial 60 has no Hijri date, serial 0 shows as serial 1, two-word month names use a no-break space. Not matched: Excel's weekday/month-name mix-ups in one `B2` section and its weekday-only quirks |
| 2026-10-27 | minor | AutoFit column width, wrapped-row height and PivotTable column fit estimate Arabic letters at ~0.48 em (measured 0.36–0.53 em shaped, Noto Sans/Naskh Arabic and DejaVu Sans) instead of 1 em, Arabic-Indic digits as wide as ASCII digits, and give vowel marks and direction marks no width; vowelled Arabic no longer fits ~3.5× too wide |
| 2026-10-26 | minor | Paste Special's Add operation and Text to Columns' Comma delimiter are keyed `Paste Special\|Add` and `Text to Columns\|Comma`, so they can be translated apart from the Solver's Add button and the Comma cell style (Spanish: Sumar vs Agregar, Coma vs Millares); every catalog keeps the text it showed |
| 2026-10-26 | minor | Arabic PDF cells, headers and chart labels support joined letters, combining marks, digits, bold/italic, rotation and grapheme wrapping |
| 2026-10-23 | minor | Missing translations are reported, never a failure: `cargo xtask i18n-report` prints, per language, the strings other catalogs translate and it lacks (plus Spanish function help rows keyed by English the function catalog no longer has) and always passes; `cargo xtask ci` runs it first. Coverage and per-language parity tests and tests of one language's exact wording are gone; UI tests take the expected text from the catalog. Duplicate-key, placeholder, context-prefix and line-shape checks stay |
| 2026-10-21 | minor | Romanian interface (`ro`, Română): 970 labels covering every key of the other catalogs (`crates/ui-egui/src/i18n/ro.rs`), `ro-*` system locales, the View-tab switcher and `app.language.set`; context keys show no prefix (File › Options test). English formulas and formats; AI-assisted draft pending native-speaker review |