mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-31 05:46:46 -06:00
Swedish interface translation (sv)
Adds Swedish (Svenska) as an interface language: 2165 strings, written from the English source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
8482c3e85b
commit
ee2640d18e
+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`, 100%, 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
@@ -6,7 +6,7 @@ use std::collections::BTreeSet;
|
||||
use super::*;
|
||||
|
||||
/// Languages that must translate every UI string and command label.
|
||||
const COMPLETE: &[&str] = &["es"];
|
||||
const COMPLETE: &[&str] = &["es", "sv"];
|
||||
|
||||
/// Keys looked up from data rather than written as `tr("…")` in the code: the main menu's
|
||||
/// submenu names (the engine's menu catalog) and labels of engine and document enums.
|
||||
@@ -315,10 +315,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;
|
||||
|
||||
@@ -29,7 +29,7 @@ supported by both apps (CJK, Arabic and Devanagari shaping, IME); Figma has no v
|
||||
and 29 menu wordings by command id: 1,982 entries. Command ids, the CLI, MCP and the control
|
||||
channel stay English. Accessibility names come from the same strings.
|
||||
- **Language preference:** Preferences ▸ Language (System, English, Deutsch, Español, Español
|
||||
(Latinoamérica), Français, 日本語, 한국어, Português (Brasil), 简体中文), applied at once without a
|
||||
(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
|
||||
@@ -91,7 +91,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, command label and menu wording translated (a
|
||||
catalog test checks it stays complete); 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
|
||||
|
||||
+1
-1
@@ -349,7 +349,7 @@ on; `key` resolves keys the way the canvas does. Commands behind keys:
|
||||
nested layers), Escape or a click drops it.
|
||||
- `pref.reduceMotion {on?}`: reduced motion (the interface's own animations off; the system's
|
||||
accessibility setting turns it on too). Prototype transitions still play.
|
||||
- `pref.language {language: system|en|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.
|
||||
|
||||
|
||||
+2
-1
@@ -14,7 +14,8 @@ Simplified.
|
||||
|
||||
The catalogs: English (`en`, the source), and Spanish (`es`, with the Latin American overlay
|
||||
`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 Simplified Chinese (`zh-Hans`), machine-drafted and waiting for native speakers' review, and
|
||||
Swedish (`sv`), which translates every string.
|
||||
|
||||
## The catalogs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user