LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
LRC-LIB-SMARTCOLL: Japanese yes/no field labels are plain nouns
Nathaniel Ledford65516b721c86
diff --git a/crates/ui-egui/locales/ja.json b/crates/ui-egui/locales/ja.jsonindex 773378612..de1a87de2 100644--- a/crates/ui-egui/locales/ja.json+++ b/crates/ui-egui/locales/ja.json@@ -503,8 +503,8 @@"HDR panorama": "HDRパノラマ","HDR panoramas": "HDRパノラマ","HDR with Last Settings": "前回の設定でHDR合成",- "Has Edits": "編集あり",- "Has GPS": "GPS情報あり",+ "Has Edits": "編集",+ "Has GPS": "GPS情報","High Contrast B&W": "ハイコントラスト白黒","Home": "ホーム","Hours": "時間",@@ -1743,5 +1743,7 @@"In Color": "カラー","No Label": "ラベルなし","smart album value|Yes": "あり",- "smart album value|No": "なし"+ "smart album value|No": "なし",+ "In a Stack": "スタック",+ "Cropped": "切り抜き"}diff --git a/crates/ui-egui/src/i18n.rs b/crates/ui-egui/src/i18n.rsindex 31ad3da5f..817a18e02 100644--- a/crates/ui-egui/src/i18n.rs+++ b/crates/ui-egui/src/i18n.rs@@ -680,6 +680,14 @@ mod tests {assert_eq!((Locale::Ja.tr("Yes"), Locale::Ja.tr("No")), ("はい", "いいえ"));assert_eq!(tr_ctx_in(Locale::Ja, "nope", "Yes"), "はい", "no contextual entry: the plain message");assert_eq!(tr_ctx_in(Locale::En, BOOL_CONTEXT, "Yes"), "Yes");+ // and the yes/no fields are named by plain nouns, so "編集 … なし" doesn't read "edits: yes … none"+ for (field, label, kind) in FIELDS {+ if *kind != Kind::Bool {+ continue;+ }+ let ja = Locale::Ja.catalog().get(*label).unwrap_or_else(|| panic!("ja lacks the {field} label {label:?}"));+ assert!(!ja.contains("あり") && !ja.contains("なし"), "{field}: {ja}");+ }// a contextual entry names a real value (a typo would silently fall back to はい / いいえ)let values = [lightcraft_catalog::rules::bool_label(true), lightcraft_catalog::rules::bool_label(false)];for language in Locale::ALL {