Add Dutch (nl) UI translation (#1877)

A complete Dutch catalog (nl.tsv) registered with the complete-menu languages (nl-NL and nl-BE
resolve to it) and in the coverage test, with the strings added on main since the PR opened and
Dutch bit-depth labels (8-bits, 16-bits).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Neil Verschoore 2026-10-09 18:41:23 +02:00 committed by GitHub
parent 99e8ac2d2a
commit e7a83ca342
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 3472 additions and 2 deletions

View File

@ -14,6 +14,7 @@ next to them.
| `crates/ui-egui/src/i18n/de.tsv` | German UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) |
| `crates/ui-egui/src/i18n/it.tsv` | Italian UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) |
| `crates/ui-egui/src/i18n/ko.tsv` | Korean UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) |
| `crates/ui-egui/src/i18n/nl.tsv` | Dutch UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) |
| `crates/ui-egui/src/i18n/pl.tsv` | Polish UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) |
| `crates/ui-egui/src/i18n/pt-br.tsv` | Brazilian Portuguese UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) |
| `crates/ui-egui/src/i18n/uk.tsv` | Ukrainian UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) |

View File

@ -1,4 +1,4 @@
PhotoCraft's Korean, German, Brazilian Portuguese, Italian and Ukrainian UI translation catalogs are
PhotoCraft's Korean, German, Brazilian Portuguese, Italian, Ukrainian and Dutch UI translation catalogs are
licensed under MIT OR Apache-2.0, at your option. The full license texts are in ../../../../LICENSE-MIT
and ../../../../LICENSE-APACHE.
@ -16,3 +16,6 @@ PhotoCraft's English labels; no proprietary translation resources were used.
Ukrainian translations: PhotoCraft contributors, original translations of
PhotoCraft's English labels; no proprietary translation resources were used.
Dutch translations: PhotoCraft contributors, original translations of
PhotoCraft's English labels; no proprietary translation resources were used.

View File

@ -96,7 +96,7 @@ fn plural_polish(n: u64) -> usize {
}
/// The registry. English first: it is the fallback and the source language.
pub static LANGUAGES: [LangInfo; 16] = [
pub static LANGUAGES: [LangInfo; 17] = [
LangInfo { code: "en", name: "English", source: "", plural: plural_one_other, complete_menus: false, catalog: OnceLock::new() },
LangInfo { code: "ja", name: "日本語", source: include_str!("ja.tsv"), plural: plural_none, complete_menus: true, catalog: OnceLock::new() },
LangInfo {
@ -129,6 +129,8 @@ pub static LANGUAGES: [LangInfo; 16] = [
catalog: OnceLock::new(),
},
LangInfo { code: "el", name: "Ελληνικά", source: include_str!("el.tsv"), plural: plural_one_other, complete_menus: true, catalog: OnceLock::new() },
// Dutch; `nl-NL` and `nl-BE` locales both resolve here.
LangInfo { code: "nl", name: "Nederlands", source: include_str!("nl.tsv"), plural: plural_one_other, complete_menus: true, catalog: OnceLock::new() },
LangInfo { code: "it", name: "Italiano", source: include_str!("it.tsv"), plural: plural_one_other, complete_menus: true, catalog: OnceLock::new() },
];
@ -355,6 +357,8 @@ mod tests {
assert_eq!(lang_from_tag("de-AT"), Lang::from_code("de"));
assert_eq!(lang_from_tag("it_IT.UTF-8"), Lang::from_code("it"));
assert_eq!(lang_from_tag("it-CH"), Lang::from_code("it"));
assert_eq!(lang_from_tag("nl_NL.UTF-8"), Lang::from_code("nl"));
assert_eq!(lang_from_tag("nl-BE"), Lang::from_code("nl"));
// Traditional Chinese: by region, by script, and with a region after the script.
assert_eq!(lang_from_tag("zh_TW.UTF-8"), Some(ZH()));
assert_eq!(lang_from_tag("zh-TW"), Some(ZH()));

File diff suppressed because it is too large Load Diff

View File

@ -95,6 +95,7 @@ mod tests {
(vec!["de-AT", "en-US"], "de"),
(vec!["pt-PT"], "pt-br"),
(vec!["it-IT", "en-US"], "it"),
(vec!["nl-BE", "fr-BE"], "nl"),
(vec![], "en"),
] {
with_system_tags(&tags, || assert_eq!(system_lang().code(), expected));

View File

@ -24,6 +24,7 @@ contextual, command-ID and plural translations; missing entries fall back to Eng
| Italiano | `it` | one / other |
| Polski | `pl` | one / few (2–4, not 12–14) / many |
| Ελληνικά | `el` | one / other |
| Nederlands | `nl` | one / other |
Every non-English catalog covers the current menu labels, `tl!` literals, blend mode names,
and generated preference labels. Tests enforce that coverage. This does not include every

View File

@ -570,6 +570,7 @@ mod tests {
("it", "it.tsv"),
("el", "el.tsv"),
("uk", "uk.tsv"),
("nl", "nl.tsv"),
] {
let catalog_path = root.join("crates/ui-egui/src/i18n").join(path);
let text = fs::read_to_string(&catalog_path).unwrap_or_default();