Merge pull request #4722 from nine-codes/bosnian-language-support

bs: Add Bosnian (bs) to the interface languages
This commit is contained in:
BFlat
2026-10-31 02:03:44 +07:00
committed by GitHub
5 changed files with 5877 additions and 6 deletions
+1
View File
@@ -110,6 +110,7 @@ Weights, evidence and the missing items per area: [target-app-parity.md](docs/ta
| Japanese | `ja` | full | 100% |
| German | `de` | full | 98% |
| Korean | `ko` | full | 100% |
| Bosnian | `bs` | full (AI-assisted, native review pending) | 100% |
| Vietnamese | `vi` | full | 100% |
Also shipped: Traditional Chinese (partial, 80%), Bulgarian, Finnish, Greek, Hungarian, Italian, Polish, Russian, Swedish, Ukrainian and Georgian (full), Catalan (full; AI-drafted, native review welcome), Czech (catalog complete; render-site gaps reduced; native review pending).
+13 -3
View File
@@ -68,8 +68,8 @@ fn plural_french(n: u64) -> usize {
usize::from(n > 1)
}
/// Russian and Ukrainian integer counts: 1 (but not 11) is `one`, 2–4 (but not 12–14)
/// `few`, everything else `many`.
/// Russian, Ukrainian and Bosnian integer counts: 1 (but not 11) is `one`, 2–4 (but not 12–14)
/// `few`, everything else `many` (Bosnian `other`).
fn plural_east_slavic(n: u64) -> usize {
match n % 100 {
11..=14 => 2,
@@ -94,7 +94,7 @@ fn plural_polish(n: u64) -> usize {
}
/// The registry. English first: it is the fallback and the source language.
pub static LANGUAGES: [LangInfo; 26] = [
pub static LANGUAGES: [LangInfo; 27] = [
LangInfo { code: "en", name: "English", source: "", plural: plural_one_other, complete_menus: false, catalog: OnceLock::new() },
// Greek: the whole interface and the status and error messages, keeping the same names in
// English as Spanish; every `el-*` locale (including `el-GR` and `el-CY`) resolves here.
@@ -137,6 +137,16 @@ pub static LANGUAGES: [LangInfo; 26] = [
complete_menus: true,
catalog: OnceLock::new(),
},
// Bosnian (Latin script, Ijekavian): the whole interface and the status and error messages, with
// one/few/other plurals (the Russian rule for whole counts); every `bs-*` locale resolves here.
LangInfo {
code: "bs",
name: "Bosanski",
source: include_str!("i18n/bs.tsv"),
plural: plural_east_slavic,
complete_menus: true,
catalog: OnceLock::new(),
},
// German: the whole interface and the status and error messages, keeping the same names in
// English as Spanish; every `de-*` locale (`de-DE`, `de-AT`, `de-CH`, `de-LU` …) resolves here.
LangInfo {
File diff suppressed because it is too large Load Diff
+6 -2
View File
@@ -44,9 +44,13 @@ fn tags_map_to_languages() {
assert_eq!(lang_from_tag("_"), None);
}
/// The Georgian, Ukrainian, Hungarian, Korean, Vietnamese, Swedish and Catalan tags of
/// The Bosnian, Georgian, Ukrainian, Hungarian, Korean, Vietnamese, Swedish and Catalan tags of
/// [`tags_map_to_languages`].
fn other_tags_map_to_languages() {
let bs = Lang::from_code("bs").expect("bs registered");
for tag in ["bs", "bs-BA", "bs_BA.UTF-8", "BS-ba", "bs-Latn-BA"] {
assert_eq!(lang_from_tag(tag), Some(bs), "{tag}");
}
for tag in ["ka", "ka-GE", "ka_GE.UTF-8", "KA-ge"] {
assert_eq!(lang_from_tag(tag), Some(ka()), "{tag}");
}
@@ -149,7 +153,7 @@ fn each_language_counts_with_its_plural_rule() {
(&["de", "es", "it", "pt-br", "fi", "ca"][..], [1, 0, 1, 1, 1, 1, 1, 1]),
(&["fr"], [0, 0, 1, 1, 1, 1, 1, 1]),
(&["ja", "ka", "hu", "ko", "vi", "tr"], [0; 8]),
(&["ru", "uk"], [2, 0, 1, 1, 2, 2, 0, 1]),
(&["ru", "uk", "bs"], [2, 0, 1, 1, 2, 2, 0, 1]),
(&["cs"], [2, 0, 1, 1, 2, 2, 2, 2]),
(&["pl"], [2, 0, 1, 1, 2, 2, 2, 1]),
] {
+3 -1
View File
@@ -1,6 +1,6 @@
# Localization parity
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-29 · **Change:** minor (Vietnamese text: stacked diacritics tested and attach in every form, #4491; previously: Catalan (`ca`) catalog added, complete under the tests)
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-30 · **Change:** minor (Bosnian (`bs`): complete catalog; previously minor: Vietnamese text: stacked diacritics tested and attach in every form, #4491; previously: Catalan (`ca`) catalog added, complete under the tests)
Per-language status of VectorCraft's interface. How the catalogs work and how to add a language:
[`development.md` › Localisation](development.md#localisation). Part of
@@ -58,6 +58,7 @@ plus review. Native-speaker review is human work and isn't in the hours.
| Polish | `pl` | 5,130 rows (counted 2026-10-21): menus, `tl!` literals and messages complete when counted; one/few/many plurals | full; native review pending |
| Finnish | `fi` | 5,318 rows (counted 2026-10-21): menus, `tl!` literals and messages complete when counted; one/other plurals, 797 `@msg` rows | full; AI-assisted, native proofreading pending |
| Czech | `cs` | 5,240 catalog entries, including 795 `@msg` rows (counted 2026-10-21); menus, literals and messages complete when counted | catalog complete; render-site gaps reduced; native review pending |
| Bosnian | `bs` | 5,841 rows (counted 2026-10-30): menus, `tl!` literals and messages complete when counted; one/few/other plurals | full; AI-assisted, native review pending |
| Swedish | `sv` | 5,251 rows, 795 of them `@msg` (counted 2026-10-21): menus, `tl!` literals and messages complete when counted; one/other plurals | full; native review welcome |
| Bulgarian | `bg` | 5,245 rows, 763 of them `@msg` (counted 2026-10-21): menus and `tl!` literals complete when counted; its messages are partial | full; AI-drafted, native review pending |
| Greek | `el` | 5,251 rows, 795 of them `@msg` (counted 2026-10-21): menus, `tl!` literals and messages complete when counted | full; native review welcome |
@@ -95,6 +96,7 @@ font for the web build.
| Date | Change | Summary |
|---|---|---|
| 2026-10-30 | minor | Bosnian (`bs`, Latin, Ijekavian): complete catalog of 5,841 rows, every `bs-*` locale, one/few/other plurals; AI-assisted, not yet native-reviewed |
| 2026-10-29 | minor | Vietnamese text: letters with two marks (Ể, Ứ, Ự) attach in precomposed, decomposed and keyboard forms, and a font lacking the marks falls back for the whole letter (#4491); scores unchanged |
| 2026-10-28 | minor | Catalan (`ca`): complete catalog under the tests (menus, literals, messages; one/other plurals); every `ca-*` locale resolves here; AI-drafted, native review welcome. Added the Turkish and Indonesian rows the table was missing. Scores and estimates unchanged |
| 2026-10-23 | patch | A missing translation never fails a test or a build; one untranslated report, printed by `cargo xtask ci` and `cargo xtask i18n-report`, lists the missing strings per language; scores unchanged |