mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-24 10:27:00 -06:00
Merge branch 'pr-482' into batch/t5
# Conflicts: # docs/localization-parity.md # docs/mcp.md # docs/translating.md
This commit is contained in:
+1
-1
@@ -111,7 +111,7 @@ native speakers' reviews of the six language drafts need people.
|
||||
| Korean | ko | 100% | draft (needs native review) |
|
||||
| Vietnamese | vi | 0% | none |
|
||||
|
||||
No other languages. Figma ships English, Japanese, Korean, French, German, Spanish and Portuguese
|
||||
Also shipped: Swedish (`sv`: every UI string, 120 of 588 command labels and menu wordings; native review welcome). Figma ships English, Japanese, Korean, French, German, Spanish and Portuguese
|
||||
(Brazil); FigCraft has the localization layer, English and Spanish (Spain and Latin America),
|
||||
French, German, Brazilian Portuguese, Japanese, Korean and Simplified Chinese drafts (Preferences ▸
|
||||
Language; Traditional Chinese has no catalog; CJK UI
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -322,10 +322,23 @@ fn system_languages_pick_the_first_one_with_a_catalog() {
|
||||
// An OS list: the first language there is a catalog for (English counts).
|
||||
assert_eq!(code("system", Some("nl-NL,de-DE,en-US")), "de");
|
||||
assert_eq!(code("system", Some("nl-NL, en-US,fr-FR")), "en");
|
||||
assert_eq!(code("system", Some("nl,sv")), "en");
|
||||
assert_eq!(code("system", Some("nl,da")), "en");
|
||||
assert_eq!(code("system", Some("nl,sv")), "sv");
|
||||
assert_eq!(code("fr", Some("de-DE")), "fr", "a chosen language beats the system's");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn swedish_is_picked_for_swedish_locales() {
|
||||
let code = |pref: &str, system: Option<&str>| LANGS[resolve(pref, system)].code;
|
||||
for tag in ["sv", "sv-SE", "sv-FI", "sv_SE.UTF-8"] {
|
||||
assert_eq!(code("system", Some(tag)), "sv", "{tag}");
|
||||
}
|
||||
let sv = LANGS.iter().position(|l| l.code == "sv").unwrap();
|
||||
assert_eq!(LANGS[sv].name, "Svenska");
|
||||
assert!(!LANGS[sv].draft);
|
||||
assert!(!plural_one(sv, 0) && plural_one(sv, 1) && !plural_one(sv, 2));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn latin_american_spanish_overlays_spanish() {
|
||||
let code = |pref: &str, system: Option<&str>| LANGS[resolve(pref, system)].code;
|
||||
|
||||
@@ -37,6 +37,13 @@ supported by both apps (CJK, Arabic and Devanagari shaping, IME); Figma has no v
|
||||
other Latin American and US Spanish tags to es-419; zh, zh-CN, zh-SG and zh-Hans read zh-Hans,
|
||||
while Traditional Chinese (zh-Hant, zh-TW, zh-HK, zh-MO) has no catalog and reads English or the
|
||||
next OS language, never Simplified) or the browser's language on the web.
|
||||
(Latinoamérica), Français, 日本語, 한국어, Português (Brasil), Svenska, 简体中文), applied at once without a
|
||||
restart; System takes the first of the OS's preferred languages that has a catalog (Windows'
|
||||
language list, macOS AppleLanguages, `LANGUAGE` then the locale variables on Linux and BSD; a regional tag
|
||||
falls back to its language, pt-PT or pt to pt-BR, and es-419, es-MX, es-AR, es-CO and the other
|
||||
Latin American and US Spanish tags to es-419; zh, zh-CN, zh-SG and zh-Hans read zh-Hans, while
|
||||
Traditional Chinese (zh-Hant, zh-TW, zh-HK, zh-MO) has no catalog and reads English or the next OS
|
||||
language, never Simplified) or the browser's language on the web.
|
||||
`pref.language {language}` sets it from the CLI, MCP and the control channel.
|
||||
- **Regional overlays:** a regional catalog whose language has a catalog lists only what differs
|
||||
(`es-419.toml` over `es.toml`); its UI strings, command labels and menu wordings read the
|
||||
@@ -92,7 +99,9 @@ supported by both apps (CJK, Arabic and Devanagari shaping, IME); Figma has no v
|
||||
| Korean | ko | 2,076 / 2,076 (100%, draft) | yes | Hangul text and IME in documents; UI text in an installed Korean face (web: the `FIGCRAFT_EMBED_CJK` build) | no | draft | 1–2 (after native review) |
|
||||
| Vietnamese | vi | 0 (0%) | no | Latin with stacked diacritics | no | none | 3–5 |
|
||||
|
||||
Other languages: none shipped (Figma ships none beyond the eight above).
|
||||
Other languages: Swedish (`sv`): every UI string translated, and 120 of the 588 command labels and
|
||||
menu wordings (the rest show in English); native review welcome. Figma ships none beyond the eight
|
||||
above.
|
||||
|
||||
The layer is done. Per-language hours above are agent hours for a catalog of ~1,800 entries
|
||||
(a machine draft, then a pass over the panels for overflow), plus each language's plural rule where
|
||||
|
||||
@@ -352,6 +352,7 @@ on; `key` resolves keys the way the canvas does. Commands behind keys:
|
||||
- `pref.autoSave {on?}`: files that have a path save themselves a few seconds after they change
|
||||
(off by default; the desktop app's timer does it, so scripts still call `file.save`).
|
||||
- `pref.language {language: system|en|cs|ru|es|es-419|fr|de|pt-BR|ja|ko|zh-Hans|…}`: the app's interface language, applied live ("system":
|
||||
- `pref.language {language: system|en|es|es-419|fr|de|pt-BR|ja|ko|sv|zh-Hans|…}`: the app's interface language, applied live ("system":
|
||||
the OS or browser language; a language without a catalog shows English). Command ids, labels and
|
||||
every result stay English.
|
||||
|
||||
|
||||
@@ -20,6 +20,9 @@ Simplified Chinese (`zh-Hans`), Czech (`cs`) and Indonesian (`id`), machine-draf
|
||||
native speakers' review. Russian (`ru`, Русский) was reviewed and approved by VanTan; its catalog
|
||||
keeps Frame, Dev Mode and Smart animate as familiar tool names and uses « » quotes. Turkish (`tr`)
|
||||
was machine-drafted and reviewed by a native speaker.
|
||||
`es-419`), French (`fr`), German (`de`), Brazilian Portuguese (`pt-BR`), Japanese (`ja`), Korean (`ko`)
|
||||
and Simplified Chinese (`zh-Hans`), machine-drafted and waiting for native speakers' review, and
|
||||
Swedish (`sv`), which translates every UI string and some command labels.
|
||||
|
||||
## The catalogs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user