mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-25 18:47:42 -06:00
LRC-LIB-KEYWORDS: keyword translations: Person, merging, export
- Russian had no "Person": the option showed in English (it reaches `tr` through a variable). A test now checks that every label the Keyword List passes that way is in every language's file. - The merge confirmation's button said "Merge", which some languages translate as merging photos (HDR, panorama): it says "Merge Keywords". - Traditional Chinese uses 匯出 for Export, as everywhere else in the file, not 轉存; "Export Containing Keywords" means the parent keywords in both Chinese files (上層 / 上级), not "included" ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4010f4a466
commit
8fcc4897c7
@@ -1429,5 +1429,6 @@
|
||||
"Delete Keyword…": "Удалить ключевое слово…",
|
||||
"Drop here for the top level": "Отпустите здесь для верхнего уровня",
|
||||
"Their photos and the keywords below them come together under one keyword.": "Их фото и вложенные ключевые слова объединятся под одним ключевым словом.",
|
||||
"Select photos to give them keywords.": "Выберите фото, чтобы назначить им ключевые слова."
|
||||
"Select photos to give them keywords.": "Выберите фото, чтобы назначить им ключевые слова.",
|
||||
"Person": "Человек"
|
||||
}
|
||||
|
||||
@@ -1744,7 +1744,7 @@
|
||||
"Separated by commas": "用逗号分隔",
|
||||
"Keyword Tag Options": "关键字标记选项",
|
||||
"Include on Export": "导出时包含",
|
||||
"Export Containing Keywords": "导出包含的关键字",
|
||||
"Export Containing Keywords": "导出上级关键字",
|
||||
"Export Synonyms": "导出同义词",
|
||||
"Create Keyword Tag": "创建关键字标记",
|
||||
"Edit Keyword Tag": "编辑关键字标记",
|
||||
|
||||
@@ -1743,9 +1743,9 @@
|
||||
"Synonyms": "同義詞",
|
||||
"Separated by commas": "以逗號分隔",
|
||||
"Keyword Tag Options": "關鍵字標記選項",
|
||||
"Include on Export": "轉存時包含",
|
||||
"Export Containing Keywords": "轉存包含的關鍵字",
|
||||
"Export Synonyms": "轉存同義詞",
|
||||
"Include on Export": "匯出時包含",
|
||||
"Export Containing Keywords": "匯出上層關鍵字",
|
||||
"Export Synonyms": "匯出同義詞",
|
||||
"Create Keyword Tag": "建立關鍵字標記",
|
||||
"Edit Keyword Tag": "編輯關鍵字標記",
|
||||
"Create": "建立",
|
||||
|
||||
@@ -904,7 +904,8 @@ pub fn show(app: &mut LightcraftApp, ctx: &egui::Context) {
|
||||
Dialog::FaceModel { info, .. } if !informational && info["download"].is_string() => "Download",
|
||||
Dialog::FaceModel { .. } if !informational => "Install",
|
||||
Dialog::ConfirmDelete { .. } | Dialog::DeleteKeyword { .. } => "Delete",
|
||||
Dialog::MoveKeyword { .. } => "Merge",
|
||||
// (not "Merge": that is photo merging, HDR / panorama, in some languages)
|
||||
Dialog::MoveKeyword { .. } => "Merge Keywords",
|
||||
Dialog::KeywordTag { editing: None, .. } => "Create",
|
||||
Dialog::KeywordTag { .. } => "Save",
|
||||
Dialog::RemoveFolder { .. } => "Remove",
|
||||
|
||||
@@ -563,4 +563,31 @@ mod tests {
|
||||
let (c, ids) = library(&[&["Ärzte", "ÄRZTE"], &[]]);
|
||||
assert_eq!(Ticks::of(&c, &ids).tick("ärzte"), Tick::Some);
|
||||
}
|
||||
|
||||
/// The labels the Keyword List and its dialogs pass to `tr` through variables (out of reach of
|
||||
/// a literal search) are translated in every language.
|
||||
#[test]
|
||||
fn labels_passed_through_variables_are_translated() {
|
||||
use crate::i18n::Locale;
|
||||
let labels = [
|
||||
"Include on Export",
|
||||
"Export Containing Keywords",
|
||||
"Export Synonyms",
|
||||
"Person",
|
||||
"Merge Keywords",
|
||||
"No keywords yet",
|
||||
"No keywords match",
|
||||
"Add to Selected Photos",
|
||||
"Remove from Selected Photos",
|
||||
];
|
||||
let dir = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("locales");
|
||||
for code in ["de", "es", "pt-br", "ru", "ja", "zh-hans", "zh-hant"] {
|
||||
let text = std::fs::read_to_string(dir.join(format!("{code}.json"))).unwrap();
|
||||
let catalog: std::collections::HashMap<String, String> = serde_json::from_str(&text).unwrap();
|
||||
for label in labels {
|
||||
assert!(catalog.contains_key(label), "{code}: “{label}”");
|
||||
}
|
||||
}
|
||||
assert_eq!(Locale::ALL.len(), 8, "a language added: list its file above");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user