mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-03 06:31:42 +01:00
Merge PR #10241: i18n: add Thai UI catalog
# Conflicts: # crates/ui-egui/src/i18n.rs # crates/ui-egui/src/i18n/LICENSE-translations.txt
This commit is contained in:
commit
cc5044d5b4
5 files changed
+4791
No files matched your search
@@ -256,6 +256,9 @@ pub static LANGUAGES: [LangInfo; 29] = [
|
||||
LangInfo { code: "az", name: "Azərbaycanca", source: catalog!("az"), plural: plural_one_other, complete_menus: true, catalog: OnceLock::new() },
|
||||
// Vietnamese; `vi-VN` resolves here.
|
||||
LangInfo { code: "vi", name: "Tiếng Việt", source: catalog!("vi"), plural: plural_none, complete_menus: true, catalog: OnceLock::new() },
|
||||
// Thai; `th`, `th-TH` and `th_TH.UTF-8` locales resolve here. Thai has no plural inflection,
|
||||
// so counts use one form.
|
||||
LangInfo { code: "th", name: "ไทย", source: catalog!("th"), plural: plural_none, complete_menus: true, catalog: OnceLock::new() },
|
||||
// Hindi; `hi`, `hi-IN` locales resolve here.
|
||||
LangInfo { code: "hi", name: "हिन्दी", source: catalog!("hi"), plural: plural_one_other, complete_menus: false, catalog: OnceLock::new() },
|
||||
// Arabic (Modern Standard); `ar-SA`, `ar-EG` and the other regional locales resolve here. The
|
||||
|
||||
@@ -76,3 +76,8 @@ English labels, and no proprietary translation resources were used.
|
||||
Romanian translations: machine-translated for @tronicum with Claude (Anthropic) as an AI
|
||||
contributor and not yet reviewed by a native speaker; original translations of PhotoCraft's
|
||||
English labels, and no proprietary translation resources were used.
|
||||
|
||||
Thai translations: PhotoCraft contributors, with opencode (DeepSeek) as an AI contributor; a
|
||||
machine-assisted first draft from PhotoCraft's English labels, reviewed for UI terminology. The
|
||||
resulting catalog is licensed under MIT OR Apache-2.0 as stated above, and no proprietary
|
||||
localisation resource was used.
|
||||
@@ -36,6 +36,19 @@ fn vietnamese_tags_resolve() {
|
||||
assert_eq!(Lang::from_pref("VI"), VI());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn thai_tags_resolve() {
|
||||
let th = Lang::from_code("th").expect("th registered");
|
||||
for tag in ["th", "TH", "th-TH", "th_TH", "th_TH.UTF-8"] {
|
||||
assert_eq!(lang_from_tag(tag), Some(th), "{tag}");
|
||||
assert_eq!(Lang::from_pref(tag), th, "{tag}");
|
||||
}
|
||||
assert_eq!(th.name(), "ไทย");
|
||||
assert_eq!(th.0.plural(5), 0, "Thai has one plural form");
|
||||
assert_eq!(tr(th, "File"), "ไฟล์");
|
||||
assert_eq!(tr(th, "Layer"), "เลเยอร์");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn picker_lists_english_first_then_names_alphabetically() {
|
||||
let order = Lang::for_picker();
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -27,6 +27,7 @@ contextual, command-ID and plural translations; missing entries fall back to Eng
|
||||
| Nederlands | `nl` | one / other |
|
||||
| Magyar | `hu` | one form |
|
||||
| Tiếng Việt | `vi` | one form |
|
||||
| ไทย | `th` | one form |
|
||||
| Srpski | `sr` | one / few / many (teens use many) |
|
||||
| Bosanski | `bs` | one / few / other (teens use other) |
|
||||
| हिन्दी | `hi` | one / other |
|
||||
|
||||
Reference in new issue
Block a user