* Add Finnish (fi) UI localization (#9626) A fi catalog ("Suomi") translated from en.json, all 4801 messages, registered in LOCALES between es and fr, with finnish_catalog_is_registered_and_translates_keys, the language listed in docs/localization.md (registered and partial) with its terms, and a pending attribution row. Fixes #9626 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Finnish: the 3D mouse Restore defaults button gets its own label It shared its text with Restore defaults elsewhere on the page, so the layout test found the wrong button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Janiz-zzz <267742026+Janiz-zzz@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
| assets/locales/fi.json | SolidCraft contributors | Original Finnish translation of SolidCraft's English catalog, AI-assisted (Claude Code) clean-room from the English and not yet reviewed line by line by a native speaker; no commercial CAD text used | MIT OR Apache-2.0 |
|
||||
@@ -64,6 +64,7 @@ static GERMAN: Catalog = Catalog::new("de", "Deutsch", include_str!(concat!(env!
|
||||
/// English in UK spelling: only the messages whose spelling differs; the rest are English's.
|
||||
static ENGLISH_UK: Catalog = Catalog::new("en-GB", "English (UK)", include_str!(concat!(env!("OUT_DIR"), "/locales/en-GB.json")));
|
||||
static SPANISH: Catalog = Catalog::new("es", "Español (España)", include_str!(concat!(env!("OUT_DIR"), "/locales/es.json")));
|
||||
static FINNISH: Catalog = Catalog::new("fi", "Suomi", include_str!(concat!(env!("OUT_DIR"), "/locales/fi.json")));
|
||||
static FRENCH: Catalog = Catalog::new("fr", "Français", include_str!(concat!(env!("OUT_DIR"), "/locales/fr.json")));
|
||||
static GALICIAN: Catalog = Catalog::new("gl", "Galego", include_str!(concat!(env!("OUT_DIR"), "/locales/gl.json")));
|
||||
static HEBREW: Catalog = Catalog::new("he", "עברית", include_str!(concat!(env!("OUT_DIR"), "/locales/he.json")));
|
||||
@@ -99,6 +100,7 @@ pub const LOCALES: &[&Catalog] = &[
|
||||
&GERMAN,
|
||||
&ENGLISH_UK,
|
||||
&SPANISH,
|
||||
&FINNISH,
|
||||
&FRENCH,
|
||||
&GALICIAN,
|
||||
&HEBREW,
|
||||
@@ -1154,6 +1156,18 @@ mod tests {
|
||||
assert_eq!(gl.label("NonExistentKey"), "NonExistentKey");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn finnish_catalog_is_registered_and_translates_keys() {
|
||||
let fi = Locale::for_language("fi");
|
||||
assert_eq!(fi.name(), "Suomi");
|
||||
assert!(is_supported("fi"));
|
||||
assert_eq!(fi.text("ui.preferences"), "Asetukset");
|
||||
assert_eq!(fi.format("document.save_changes", &[("name", "My {design}")]), "Tallennetaanko muutokset tiedostoon My {design}?");
|
||||
assert_eq!(fi.format("dialog.selected_count", &[("count", "2")]), "↖ 2 valittu");
|
||||
assert_eq!(fi.label("Fillet"), "Pyöristys");
|
||||
assert_eq!(fi.label("NonExistentKey"), "NonExistentKey");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ukrainian_catalog_translates_keys_labels_and_browser_patterns() {
|
||||
let uk = Locale::for_language("uk");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# UI localization
|
||||
|
||||
SolidCraft embeds its translations and works offline. English, Arabic, Bosnian, Czech, Danish, German, English (UK), Spanish, French, Galician, Hebrew, Croatian, Italian,
|
||||
SolidCraft embeds its translations and works offline. English, Arabic, Bosnian, Czech, Danish, German, English (UK), Spanish, Finnish, French, Galician, Hebrew, Croatian, Italian,
|
||||
Japanese, Korean, Malay, Norwegian Bokmål, Dutch, Polish, Brazilian Portuguese, Russian, Serbian, 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.
|
||||
@@ -45,7 +45,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,
|
||||
Arabic, Hebrew, Japanese and Chinese are delivered complete; Bosnian, Croatian and Serbian carry
|
||||
every English message today but are not held to it, so a new label may follow later in them; Danish, German, Spanish, Galician, Italian, Korean, Malay, Norwegian Bokmål, Polish, Brazilian Portuguese, Russian, French, Ukrainian and
|
||||
every English message today but are not held to it, so a new label may follow later in them; Danish, German, Spanish, Finnish, Galician, Italian, Korean, Malay, Norwegian Bokmål, 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, ar, he, ja, zh, de and ko; Russian, French, Ukrainian and Malay may
|
||||
follow later.
|
||||
@@ -94,6 +94,8 @@ traka. In Serbian, brand and file names, acronyms, units, key names and placehol
|
||||
script inside the Cyrillic text. Command IDs, shortcuts, file formats, units and user-provided names
|
||||
are not translated.
|
||||
|
||||
The Finnish catalog (`fi`, shown as Suomi) uses Luonnos (Sketch), Kappale (Body), Piirre (timeline Feature), Rajoite (Constraint), Mitta (Dimension), Pyöristys (Fillet), Viiste (Chamfer), Pursotus (Extrude) and Pyöräytys (Revolve); a design is a malli and an AI model a tekoälymalli. Draft is Päästö, Flat Pattern is Levityskuva, Hem is Huulos, and Counterbore/Countersink are Upotus/Kartioupotus. Camera and view angles are Nyökkäys (pitch), Kääntö (yaw) and Kallistus (roll); a saved render shot is a Kuvakulma. Finnish puts a space before % (50 %). Command IDs, shortcuts, file formats, units and user-provided names stay unchanged.
|
||||
|
||||
The Norwegian Bokmål catalog (`nb`, shown as Norsk bokmål) uses Skisse (Sketch),
|
||||
Kropp (Body), Funksjon (timeline Feature), Binding (Constraint), Avrunding (Fillet)
|
||||
and Fas (Chamfer). Ground/Unground are Fest posisjon/Frigjør posisjon, Draft is
|
||||
|
||||
Reference in New Issue
Block a user