@@ -89,6 +89,7 @@ Editable drawing code, native projects and shipped exports are collected under `
|
||||
| assets/icons/ui/source/navigation.rs | SolidCraft contributors | Original SolidCraft resource data or drawing code, collected without redesign | MIT OR Apache-2.0 |
|
||||
| assets/icons/ui/source/pointer.rs | SolidCraft contributors | Original SolidCraft resource data or drawing code, collected without redesign | MIT OR Apache-2.0 |
|
||||
| assets/locales/cs.json | potuzai | Czech translation of the English catalog, contributed upstream | MIT OR Apache-2.0 |
|
||||
| assets/locales/da.json | SolidCraft contributors | Original Danish translation of SolidCraft's English catalog; no commercial CAD text used | MIT OR Apache-2.0 |
|
||||
| assets/locales/de.json | SolidCraft contributors | Original SolidCraft resource data or drawing code, collected without redesign | MIT OR Apache-2.0 |
|
||||
| assets/locales/en.json | SolidCraft contributors | Original SolidCraft resource data or drawing code, collected without redesign | MIT OR Apache-2.0 |
|
||||
| assets/locales/es.json | jawler | Spanish (Spain) translation of the English catalog, contributed upstream | MIT OR Apache-2.0 |
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -722,6 +722,7 @@ fn the_sections_messages_are_in_every_catalog() {
|
||||
.collect();
|
||||
for (lang, text) in [
|
||||
("cs", include_str!("../../../assets/locales/cs.json")),
|
||||
("da", include_str!("../../../assets/locales/da.json")),
|
||||
("de", include_str!("../../../assets/locales/de.json")),
|
||||
("ja", include_str!("../../../assets/locales/ja.json")),
|
||||
("ko", include_str!("../../../assets/locales/ko.json")),
|
||||
@@ -734,7 +735,9 @@ fn the_sections_messages_are_in_every_catalog() {
|
||||
let (Some(en), Some(here)) = (english.get(*id), catalog.get(*id)) else {
|
||||
panic!("{lang}: missing message {id} (English: {})", english.contains_key(*id));
|
||||
};
|
||||
assert!(lang == "de" || here != en, "{lang}: {id} is the English text {en}");
|
||||
// Danish uses the same established names for these colour-vision modes.
|
||||
let shared_name = lang == "da" && ["ui.colour_vision_deutan", "ui.colour_vision_protan", "ui.colour_vision_tritan"].contains(id);
|
||||
assert!(lang == "de" || shared_name || here != en, "{lang}: {id} is the English text {en}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ impl Catalog {
|
||||
|
||||
static ENGLISH: Catalog = Catalog::new("en", "English", include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../../assets/locales/en.json")));
|
||||
static CZECH: Catalog = Catalog::new("cs", "Čeština", include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../../assets/locales/cs.json")));
|
||||
static DANISH: Catalog = Catalog::new("da", "Dansk", include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../../assets/locales/da.json")));
|
||||
static GERMAN: Catalog = Catalog::new("de", "Deutsch", include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../../assets/locales/de.json")));
|
||||
static SPANISH: Catalog = Catalog::new("es", "Español (España)", include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../../assets/locales/es.json")));
|
||||
static FRENCH: Catalog = Catalog::new("fr", "Français", include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../../assets/locales/fr.json")));
|
||||
@@ -55,6 +56,7 @@ static CHINESE: Catalog = Catalog::new("zh", "中文", include_str!(concat!(env!
|
||||
pub const LOCALES: &[&Catalog] = &[
|
||||
&ENGLISH,
|
||||
&CZECH,
|
||||
&DANISH,
|
||||
&GERMAN,
|
||||
&SPANISH,
|
||||
&FRENCH,
|
||||
@@ -348,6 +350,7 @@ mod tests {
|
||||
fn newly_catalogued_command_labels_translate() {
|
||||
let cases = [
|
||||
("cs", "Příruba", "Zebra analýza", "Studie pohybu"),
|
||||
("da", "Flange", "Zebraanalyse", "Bevægelsesanalyse"),
|
||||
("zh", "法兰", "斑马纹分析", "运动研究"),
|
||||
("ja", "フランジ", "ゼブラ解析", "モーション スタディ"),
|
||||
("de", "Flansch", "Zebra-Analyse", "Bewegungsuntersuchung"),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# UI localization
|
||||
|
||||
SolidCraft embeds its translations and works offline. English, Czech, German, Spanish, French, Galician, Italian,
|
||||
SolidCraft embeds its translations and works offline. English, Czech, Danish, German, Spanish, French, Galician, Italian,
|
||||
Japanese, Korean, Malay, Polish, Brazilian Portuguese, Russian, Turkish, Ukrainian and Chinese are currently registered in `crates/ui-egui/src/i18n.rs`. Adding a language requires an
|
||||
embedded catalog and one registration there; the preferences selector and validation use the same
|
||||
registry.
|
||||
@@ -38,7 +38,7 @@ that looks untranslated. Two guards catch that in the build:
|
||||
|
||||
- `every_complete_catalog_carries_every_english_message` — adding a key to `en.json`
|
||||
without giving it to a complete catalog fails the tests. English is the source catalog,
|
||||
Japanese and Chinese are delivered complete; German, Spanish, Galician, Italian, Korean, Malay, Polish, Brazilian Portuguese, Russian, French, Ukrainian and
|
||||
Japanese and Chinese are delivered complete; Danish, German, Spanish, Galician, Italian, Korean, Malay, Polish, Brazilian Portuguese, Russian, French, Ukrainian and
|
||||
Turkish are partial — their gaps fall back to English and are reported by `cargo xtask i18n` without
|
||||
failing the build. A new label needs en, ja, zh, de and ko; Russian, French, Ukrainian and Malay may
|
||||
follow later.
|
||||
|
||||
Reference in New Issue
Block a user