diff --git a/crates/catalog/src/rules.rs b/crates/catalog/src/rules.rs index ca6c4795f..95c0c0ac3 100644 --- a/crates/catalog/src/rules.rs +++ b/crates/catalog/src/rules.rs @@ -61,7 +61,7 @@ pub const FIELDS: &[(&str, &str, Kind)] = &[ ( "label", "Color Label", - Kind::Choice(&[("red", "Red"), ("yellow", "Yellow"), ("green", "Green"), ("blue", "Blue"), ("purple", "Purple"), ("none", "None")]), + Kind::Choice(&[("red", "Red"), ("yellow", "Yellow"), ("green", "Green"), ("blue", "Blue"), ("purple", "Purple"), ("none", "No Label")]), ), ("text", "Any Searchable Text", Kind::Text), // Source @@ -117,7 +117,7 @@ pub const FIELDS: &[(&str, &str, Kind)] = &[ // Develop ("edited", "Has Edits", Kind::Bool), ("cropped", "Cropped", Kind::Bool), - ("treatment", "Treatment", Kind::Choice(&[("color", "Color"), ("monochrome", "Black & White")])), + ("treatment", "Treatment", Kind::Choice(&[("color", "In Color"), ("monochrome", "Black & White")])), // Assisted Culling ("sharpness", "Focus (assisted culling)", Kind::Number), ("bestOfGroup", "Best of Similar Shots", Kind::Bool), @@ -848,6 +848,10 @@ mod tests { fn choices_have_readable_labels() { assert_eq!(choice_label("copyrightStatus", "publicDomain"), Some("Public Domain")); assert_eq!(choice_label("treatment", "monochrome"), Some("Black & White")); + // own labels where a shared word would translate wrongly: "Color" is the colour noun (the + // Color panel) and "None" agrees with other nouns in gendered languages + assert_eq!(choice_label("treatment", "color"), Some("In Color")); + assert_eq!(choice_label("label", "none"), Some("No Label")); assert_eq!(choice_label("flag", "pick"), Some("Picked")); assert_eq!(choice_label("aspect", "landscape"), Some("Landscape (wide)")); assert_eq!(choice_label("flag", "nope"), None); diff --git a/crates/ui-egui/locales/de.json b/crates/ui-egui/locales/de.json index 8ae445bdb..936a11ec0 100644 --- a/crates/ui-egui/locales/de.json +++ b/crates/ui-egui/locales/de.json @@ -1894,5 +1894,7 @@ "Unknown": "Unbekannt", "Landscape (wide)": "Querformat", "Portrait (tall)": "Hochformat", - "Square": "Quadratisch" + "Square": "Quadratisch", + "In Color": "Farbig", + "No Label": "Ohne Markierung" } diff --git a/crates/ui-egui/locales/es.json b/crates/ui-egui/locales/es.json index 82d8441b1..475744d20 100644 --- a/crates/ui-egui/locales/es.json +++ b/crates/ui-egui/locales/es.json @@ -1739,5 +1739,7 @@ "Unknown": "Desconocido", "Landscape (wide)": "Horizontal (apaisada)", "Portrait (tall)": "Vertical (retrato)", - "Square": "Cuadrada" + "Square": "Cuadrada", + "In Color": "En color", + "No Label": "Sin etiqueta" } diff --git a/crates/ui-egui/locales/ja.json b/crates/ui-egui/locales/ja.json index 9357aa945..d38fe90f0 100644 --- a/crates/ui-egui/locales/ja.json +++ b/crates/ui-egui/locales/ja.json @@ -1739,5 +1739,7 @@ "Unknown": "不明", "Landscape (wide)": "横長", "Portrait (tall)": "縦長", - "Square": "正方形" + "Square": "正方形", + "In Color": "カラー", + "No Label": "ラベルなし" } diff --git a/crates/ui-egui/locales/pt-br.json b/crates/ui-egui/locales/pt-br.json index bdbc7b576..2bac81d40 100644 --- a/crates/ui-egui/locales/pt-br.json +++ b/crates/ui-egui/locales/pt-br.json @@ -1739,5 +1739,7 @@ "Unknown": "Desconhecido", "Landscape (wide)": "Paisagem (horizontal)", "Portrait (tall)": "Retrato (vertical)", - "Square": "Quadrada" + "Square": "Quadrada", + "In Color": "Colorida", + "No Label": "Sem rótulo" } diff --git a/crates/ui-egui/locales/ru.json b/crates/ui-egui/locales/ru.json index bc5e64ad5..cd36a04ec 100644 --- a/crates/ui-egui/locales/ru.json +++ b/crates/ui-egui/locales/ru.json @@ -1411,5 +1411,7 @@ "Unknown": "Неизвестно", "Landscape (wide)": "Альбомная", "Portrait (tall)": "Книжная", - "Square": "Квадратная" + "Square": "Квадратная", + "In Color": "Цветное", + "No Label": "Без метки" } diff --git a/crates/ui-egui/locales/zh-hans.json b/crates/ui-egui/locales/zh-hans.json index 9a0302a9a..e1d579ac1 100644 --- a/crates/ui-egui/locales/zh-hans.json +++ b/crates/ui-egui/locales/zh-hans.json @@ -1739,5 +1739,7 @@ "Unknown": "未知", "Landscape (wide)": "横向", "Portrait (tall)": "纵向", - "Square": "正方形" + "Square": "正方形", + "In Color": "彩色", + "No Label": "无标签" } diff --git a/crates/ui-egui/locales/zh-hant.json b/crates/ui-egui/locales/zh-hant.json index 3e96dc8c3..dc80a7b30 100644 --- a/crates/ui-egui/locales/zh-hant.json +++ b/crates/ui-egui/locales/zh-hant.json @@ -1739,5 +1739,7 @@ "Unknown": "未知", "Landscape (wide)": "橫向", "Portrait (tall)": "直向", - "Square": "正方形" + "Square": "正方形", + "In Color": "彩色", + "No Label": "無標籤" } diff --git a/crates/ui-egui/src/i18n.rs b/crates/ui-egui/src/i18n.rs index d86c81d05..2d869ecd8 100644 --- a/crates/ui-egui/src/i18n.rs +++ b/crates/ui-egui/src/i18n.rs @@ -636,10 +636,6 @@ mod tests { } } - /// Every command, control, rule and rename label, and every line of What's New, is a message a - /// catalog can translate. What a language lacks is reported, not failed (like - /// `catalogs_agree_on_placeholders_and_report_gaps`): a feature PR doesn't have to ship every - /// language, and the translations catch up at their own pace. /// Smart-album choice values read as words in every language (English "Public Domain", German /// "Gemeinfrei"), never as rule ids like `publicDomain`; an id the field doesn't know shows as /// written. Unlike other labels these must be translated: an untranslated one would be English @@ -650,6 +646,9 @@ mod tests { assert_eq!(choice_text_in(Locale::En, "copyrightStatus", "publicDomain"), "Public Domain"); assert_eq!(choice_text_in(Locale::De, "copyrightStatus", "publicDomain"), "Gemeinfrei"); assert_eq!(choice_text_in(Locale::De, "copyrightStatus", "someday"), "someday"); + assert_eq!(choice_text_in(Locale::ZhHans, "treatment", "color"), "彩色", "in colour, not the colour noun"); + assert_eq!(choice_text_in(Locale::Ru, "treatment", "color"), "Цветное"); + assert_eq!(choice_text_in(Locale::Es, "label", "none"), "Sin etiqueta"); for language in Locale::ALL { for (field, _, kind) in FIELDS { let Kind::Choice(choices) = kind else { continue }; @@ -664,6 +663,10 @@ mod tests { } } + /// Every command, control, rule and rename label, and every line of What's New, is a message a + /// catalog can translate. What a language lacks is reported, not failed (like + /// `catalogs_agree_on_placeholders_and_report_gaps`): a feature PR doesn't have to ship every + /// language, and the translations catch up at their own pace. #[test] fn display_label_gaps_are_reported() { let mut labels: Vec<&str> = lightcraft_engine::command_specs().iter().map(|spec| spec.label).collect(); diff --git a/docs/whats-new.md b/docs/whats-new.md index ed6589c6d..eb44424af 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -8,7 +8,7 @@ Culling. - New fields: Keyword Count ("2 or more", "exactly 2"…), People and People Count (named faces), Shutter Speed (written as 1/250), File Extension, Video Duration, Copy Name, In a Stack, Alt Text, City, State / Province, Country, Long - Edge, Short Edge, Aspect Ratio (landscape / portrait / square), Cropped and Treatment (color / black & white). + Edge, Short Edge, Aspect Ratio (landscape / portrait / square), Cropped and Treatment (in color / black & white). - Choice values read as words in every language: "Public Domain", "Picked", "Black & White" rather than ids like `publicDomain` (rules and agents keep using the ids; `album.ruleFields` adds `choiceLabels`). - Any Searchable Text also finds the state / province, alt text, people and a virtual copy's name.