Italian UI translation (it) (#853)
* Update mod.rs * Update system.rs * Update live_tests.rs * Update localization.md * Italian UI translation (it) * Register Italian fully and bring the catalog up to date - LANGUAGES grows to 13 entries (the array length was still 12), with the native name Italiano. - The system-locale test expects the code `it`, not `it-IT`. - Italian joins the i18n coverage report, ATTRIBUTION.md and LICENSE-translations.txt. - Translate the strings main gained since the catalog was written, and fix two comments copied from the Spanish catalog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Brandon Thomas <echelon@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b436950ae3
commit
7a9b591189
|
|
@ -11,6 +11,7 @@ next to them.
|
|||
| Path | Title | Author | Source | License |
|
||||
|---|---|---|---|---|
|
||||
| `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/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) |
|
||||
| `assets/fonts/Inter-Regular.ttf`, `Inter-Medium.ttf`, `Inter-SemiBold.ttf` | Inter 4.001 (UI font) | The Inter Project Authors (Rasmus Andersson) | <https://github.com/rsms/inter> | SIL OFL 1.1, [`assets/fonts/OFL-Inter.txt`](assets/fonts/OFL-Inter.txt) |
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
PhotoCraft's Korean, German and Brazilian Portuguese UI translation catalogs are licensed
|
||||
under MIT OR Apache-2.0, at your option. The full license texts are in ../../../../LICENSE-MIT
|
||||
PhotoCraft's Korean, German, Brazilian Portuguese and Italian 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.
|
||||
|
||||
Korean translations: PhotoCraft contributors, original translations of
|
||||
|
|
@ -10,3 +10,6 @@ PhotoCraft's English labels; no proprietary translation resources were used.
|
|||
|
||||
Brazilian Portuguese translations: PhotoCraft contributors, original translations of
|
||||
PhotoCraft's English labels; no proprietary translation resources were used.
|
||||
|
||||
Italian translations: PhotoCraft contributors, original translations of
|
||||
PhotoCraft's English labels; no proprietary translation resources were used.
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -83,7 +83,7 @@ fn plural_pt(n: u64) -> usize {
|
|||
}
|
||||
|
||||
/// The registry. English first: it is the fallback and the source language.
|
||||
pub static LANGUAGES: [LangInfo; 12] = [
|
||||
pub static LANGUAGES: [LangInfo; 13] = [
|
||||
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 {
|
||||
|
|
@ -110,6 +110,7 @@ pub static LANGUAGES: [LangInfo; 12] = [
|
|||
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() },
|
||||
];
|
||||
|
||||
impl LangInfo {
|
||||
|
|
@ -333,6 +334,8 @@ mod tests {
|
|||
assert_eq!(lang_from_tag("fr_FR"), Lang::from_code("fr"));
|
||||
assert_eq!(lang_from_tag("de_DE"), Lang::from_code("de"));
|
||||
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"));
|
||||
// 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()));
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ mod tests {
|
|||
(vec!["sv-SE", "ar-SA"], "en"),
|
||||
(vec!["de-AT", "en-US"], "de"),
|
||||
(vec!["pt-PT"], "pt-br"),
|
||||
(vec!["it-IT", "en-US"], "it"),
|
||||
(vec![], "en"),
|
||||
] {
|
||||
with_system_tags(&tags, || assert_eq!(system_lang().code(), expected));
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ contextual, command-ID and plural translations; missing entries fall back to Eng
|
|||
| Deutsch | `de` | one / other |
|
||||
| Bahasa Indonesia | `id` | one form |
|
||||
| Português (Brasil) | `pt-br` | singular for 0 and 1 / plural for 2+ |
|
||||
| Italiano | `it` | 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
|
||||
|
|
|
|||
|
|
@ -559,9 +559,16 @@ mod tests {
|
|||
fn source_key_set_is_covered_by_complete_catalogs() {
|
||||
let root = Path::new(env!("CARGO_MANIFEST_DIR")).parent().unwrap_or(Path::new("."));
|
||||
let keys = source_keys(root).unwrap_or_default();
|
||||
for (code, path) in
|
||||
[("ja", "ja.tsv"), ("zh-hant", "zh-hant.tsv"), ("es", "es.tsv"), ("ru", "ru.tsv"), ("cs", "cs.tsv"), ("de", "de.tsv"), ("pt-br", "pt-br.tsv")]
|
||||
{
|
||||
for (code, path) in [
|
||||
("ja", "ja.tsv"),
|
||||
("zh-hant", "zh-hant.tsv"),
|
||||
("es", "es.tsv"),
|
||||
("ru", "ru.tsv"),
|
||||
("cs", "cs.tsv"),
|
||||
("de", "de.tsv"),
|
||||
("pt-br", "pt-br.tsv"),
|
||||
("it", "it.tsv"),
|
||||
] {
|
||||
let catalog_path = root.join("crates/ui-egui/src/i18n").join(path);
|
||||
let text = fs::read_to_string(&catalog_path).unwrap_or_default();
|
||||
let translations = parse_catalog(&catalog_path, &text).unwrap_or_default();
|
||||
|
|
|
|||
Loading…
Reference in New Issue