bs: Add Bosnian (bs) to the interface languages (#10290)

* Add Bosnian (bs) to the interface languages

bs.tsv: 4,552 rows, Latin script, Ijekavian, the same keys as the newest
catalogs. Wording shared with storytold/craft-i18n locales/bs/; the 306
strings craft-i18n doesn't have yet are new. Every Bosnian locale,
Cyrillic included, resolves to it, as for Serbian; plurals reuse the
one/few/other rule of plural_russian.

Locale and plural tests, live locale case, localization docs and an
ATTRIBUTION row (AI-assisted, not yet reviewed by a native speaker).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013Tayw8nmxoLLmKv13jK93z

* Add Bosnian to the translation license notice; document the locale test

LICENSE-translations.txt now lists the Bosnian catalog and its
provenance (shared with storytold/craft-i18n locales/bs/, AI-assisted,
not yet native-reviewed), as ATTRIBUTION.md points to it. The touched
live locale test gets a doc comment.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013Tayw8nmxoLLmKv13jK93z

* bs: wording from the craft-i18n catalog review

The Bosnian catalog review (storytold/craft-i18n#72) asked for one word
per concept; this catalog follows: pan is "pomjeranje" (not
"pomicanje"), a spreadsheet is "proračunska tabela", Greek & Cyrillic
reads "Grčko pismo i ćirilica". Placeholders and ellipses are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013Tayw8nmxoLLmKv13jK93z

* bs: translate the 30 strings added on main; match Camera Raw labels

Main gained Path operations, the SVG smart object editor, Esc/Return pen
status messages and more since this catalog was written, so the
every-language tests (esc_ends_a_refused_draft_and_return_keeps_it) failed
on bs. Five cameraRaw-context entries (White Balance: As Shot, Tone
Histogram, Show Selected Region, Opened {name}, Loaded Camera Raw settings
from {file}) differed from the plain entries the panel actually draws, which
failed the Camera Raw localization test; they now match.

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: FredApps <[email protected]>
This commit is contained in:
authored and GitHub committed 2026-11-05 05:16:02 +01:00
1 parent ca151c6b84
commit a331258dff
8 files changed
+4653 -6

No files matched your search

+1
View File
@@ -25,6 +25,7 @@ next to them.
| `crates/ui-egui/src/i18n/vi.tsv` | Vietnamese UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) |
| `crates/ui-egui/src/i18n/ar.tsv` | Arabic UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) |
| `crates/ui-egui/src/i18n/tr.tsv` | Turkish UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) |
| `crates/ui-egui/src/i18n/bs.tsv` | Bosnian (Latin, Ijekavian) UI translations | Nine (@nine-codes) with Claude Code, AI-assisted; not yet reviewed by a native speaker | Original translations of PhotoCraft's English labels, shared with storytold/craft-i18n `locales/bs/` | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) |
| `crates/ui-egui/src/i18n/sr.tsv` | Serbian (Latin, Ekavian) UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) |
| `crates/ui-egui/src/i18n/ru.tsv` | Russian UI translations | PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) |
| `crates/ui-egui/src/i18n/sv.tsv` | Swedish UI translations | @kler, @davvarn and PhotoCraft contributors | Original translations of PhotoCraft's English labels | MIT OR Apache-2.0, [`LICENSE-translations.txt`](crates/ui-egui/src/i18n/LICENSE-translations.txt) |
+6 -2
View File
@@ -42,7 +42,7 @@ pub struct LangInfo {
/// [`LangInfo::text`].
pub source: &'static [u8],
/// Plural form index for a count (English: 0 = one, 1 = other; Japanese, Chinese and Hungarian: always 0;
/// Czech: 0 = one, 1 = few (2–4), 2 = other; French: 0 = one (0 and 1), 1 = other). A catalog's `@plural` entries list one form per
/// Czech: 0 = one, 1 = few (2–4), 2 = other; Russian, Ukrainian and Bosnian: 0 = one (1, 21 …), 1 = few (2–4, 22–24 …), 2 = other; French: 0 = one (0 and 1), 1 = other). A catalog's `@plural` entries list one form per
/// index.
pub plural: fn(u64) -> usize,
/// Does the catalog cover every menu string? (`cargo xtask i18n-coverage` lists what it lacks)
@@ -201,7 +201,7 @@ fn expand(packed: &str, keys: &[&str]) -> Result<String, String> {
}
/// The registry. English first: it is the fallback and the source language.
pub static LANGUAGES: [LangInfo; 27] = [
pub static LANGUAGES: [LangInfo; 28] = [
LangInfo { code: "en", name: "English", source: b"", plural: plural_one_other, complete_menus: false, catalog: OnceLock::new() },
LangInfo { code: "ja", name: "日本語", source: catalog!("ja"), plural: plural_none, complete_menus: true, catalog: OnceLock::new() },
LangInfo { code: "zh-hans", name: "简体中文", source: catalog!("zh-hans"), plural: plural_none, complete_menus: true, catalog: OnceLock::new() },
@@ -216,6 +216,10 @@ pub static LANGUAGES: [LangInfo; 27] = [
// `sr-Latn-*` and `sr_RS@latin` resolve here; so do Cyrillic `sr` locales, which read Latin
// rather than English.
LangInfo { code: "sr", name: "Srpski", source: catalog!("sr"), plural: plural_russian, complete_menus: true, catalog: OnceLock::new() },
// Bosnian (Latin script, Ijekavian), the same one/few/other rule for integer counts. `bs-BA`,
// `bs-Latn-*` and `bs_BA.UTF-8` resolve here; so do Cyrillic `bs` locales, which read Latin
// rather than English.
LangInfo { code: "bs", name: "Bosanski", source: catalog!("bs"), plural: plural_russian, complete_menus: true, catalog: OnceLock::new() },
LangInfo { code: "cs", name: "Čeština", source: catalog!("cs"), plural: plural_cs, complete_menus: true, catalog: OnceLock::new() },
LangInfo { code: "fr", name: "Français", source: catalog!("fr"), plural: plural_fr, complete_menus: true, catalog: OnceLock::new() },
LangInfo { code: "id", name: "Bahasa Indonesia", source: catalog!("id"), plural: plural_none, complete_menus: true, catalog: OnceLock::new() },
@@ -1,6 +1,6 @@
PhotoCraft's Korean, German, Spanish, Brazilian Portuguese, Italian, Ukrainian, Dutch, Czech,
Turkish, Hungarian, Serbian, Russian, Swedish, Finnish, Danish and Norwegian Bokmål UI translation
catalogs are licensed under MIT OR Apache-2.0, at your option.
Turkish, Hungarian, Serbian, Russian, Swedish, Finnish, Danish, Norwegian Bokmål and Bosnian UI
translation catalogs are licensed under MIT OR Apache-2.0, at your option.
The full license texts are in ../../../../LICENSE-MIT and ../../../../LICENSE-APACHE.
Korean translations: PhotoCraft contributors, original translations of
@@ -57,3 +57,7 @@ translations of PhotoCraft's English labels, and no proprietary translation reso
Norwegian Bokmål translations: PhotoCraft contributors, combined from the catalogs contributed by
@nikolainyegaard and @Bolla76 and reviewed with Claude (Anthropic) as an AI contributor; original
translations of PhotoCraft's English labels, and no proprietary translation resources were used.
Bosnian translations: Nine (@nine-codes) with Claude Code (AI-assisted), original translations of
PhotoCraft's English labels, shared with storytold/craft-i18n (locales/bs/); no proprietary
translation resources were used. Not yet reviewed by a native speaker.
File diff suppressed because it is too large. Load diff
+3
View File
@@ -15,6 +15,8 @@ fn lang(code: &str) -> Lang {
Lang::from_code(code).expect("registered language")
}
/// Regional locale tags (`fr-CA`, `ko-KR`, `bs-BA` …) resolve to their registered catalog, as
/// a preference and as a system tag.
#[test]
fn requested_languages_resolve_regional_preferences() {
for (tag, code) in [
@@ -28,6 +30,7 @@ fn requested_languages_resolve_regional_preferences() {
("id-ID", "id"),
("vi-VN", "vi"),
("sr-RS", "sr"),
("bs-BA", "bs"),
] {
assert_eq!(Lang::from_pref(tag), lang(code), "{tag}");
}
+23
View File
@@ -292,6 +292,29 @@ fn serbian_plural_rule_handles_teens_and_compound_counts() {
assert_eq!(forms, [2, 0, 1, 1, 2, 2, 2, 2, 0, 1, 2, 0, 2, 2, 1]);
}
/// Bosnian locales, with or without region, script or encoding, select the Latin catalog.
#[test]
fn bosnian_resolves_locales_and_preferences() {
let bs = Lang::from_code("bs").expect("bs registered");
assert_eq!(bs.name(), "Bosanski");
for tag in ["bs", "BS", "bs-BA", "bs_BA", "bs_BA.UTF-8", "bs-Latn", "bs-Latn-BA", "bs-Cyrl-BA", "bs_BA@cyrillic"] {
assert_eq!(lang_from_tag(tag), Some(bs), "{tag}");
assert_eq!(Lang::from_pref(tag), bs, "{tag}");
}
assert_ne!(lang_from_tag("hr-HR"), Some(bs), "Croatian is not Bosnian");
}
/// Bosnian counts: 1, 21, 101 are `one`; 2–4, 22–24 (not 12–14) `few`; everything else `other`.
#[test]
fn bosnian_plural_rule_handles_teens_and_compound_counts() {
let bs = Lang::from_code("bs").expect("bs registered");
let counts = [0, 1, 2, 4, 5, 11, 12, 14, 21, 22, 25, 101, 111, 112, 122];
let forms: Vec<usize> = counts.into_iter().map(bs.0.plural).collect();
assert_eq!(forms, [2, 0, 1, 1, 2, 2, 2, 2, 0, 1, 2, 0, 2, 2, 1]);
assert_eq!(trn(bs, 3, "{n} pixel", "{n} pixels"), "3 piksela");
assert_eq!(trn(bs, 5, "{n} document", "{n} documents"), "5 dokumenata");
}
#[test]
fn catalog_kinds_are_parsed_and_looked_up() {
let c = Catalog::parse("# c\n\tHello\tこんにちは\n@id\tfile.save\t保存する\nmenu\tWindows\tウィンドウ群\n@plural\t{n} file|{n} files\t{n} 個\n\n");
+6 -2
View File
@@ -1,6 +1,6 @@
# Localization parity
> **Last reviewed:** 2026-10-12 · **Last updated:** 2026-10-29 · **Change:** minor (Swedish, Finnish, Danish and Norwegian Bokmål UI catalogs; previously minor: Arabic UI catalog) · **Target:** Adobe Photoshop 2026
> **Last reviewed:** 2026-10-12 · **Last updated:** 2026-10-30 · **Change:** minor (Bosnian UI catalog; previously minor: Swedish, Finnish, Danish and Norwegian Bokmål UI catalogs; previously minor: Arabic UI catalog) · **Target:** Adobe Photoshop 2026
Per-language status of PhotoCraft's UI. How catalogs work and how to add one:
[`localization.md`](localization.md). Language notes: [Korean](localization-ko.md), [Spanish](localization-es.md),
@@ -60,7 +60,10 @@ term per concept; the contested terms follow a native speaker's questionnaire an
`fi` (4,552 rows, combined from #5666 and #6961), Danish `da` (4,552 rows, based on #7267 and
completed for the current UI) and Norwegian Bokmål `nb` (4,552 rows, combined from #8072 and #9025;
`no` and `nn` locales resolve to it), all added 2026-10-29, cover the same keys with one term per
concept; none has had a native-speaker review yet.
concept; none has had a native-speaker review yet. Bosnian `bs` (4,552 rows, Latin script,
Ijekavian, added 2026-10-30) covers the same keys; its one/few/other plurals reuse the Russian
rule, and Cyrillic `bs` locales read it too. It is AI-assisted, shares its wording with
storytold/craft-i18n `locales/bs/`, and has not had a native-speaker review yet.
Czech UI follow-up (2026-10-11): status and notice wrappers, hardware labels, brush and
transform accessibility names, rasterization prompts, profile mismatch messages and preset
@@ -101,3 +104,4 @@ engine localization or native review is complete.
| 2026-10-28 | minor | Arabic (`ar`) UI catalog: every measured key, six plural forms; layer names and the title bar no longer reversed on egui 0.37 |
| 2026-10-29 | minor | Swedish (`sv`) UI catalog: every measured key plus the dynamic labels, combined from #5985 and #9536 |
| 2026-10-29 | minor | Finnish (`fi`), Danish (`da`) and Norwegian Bokmål (`nb`) UI catalogs: every measured key plus the dynamic labels, combined from #5666, #6961, #7267, #8072 and #9025 |
| 2026-10-30 | minor | Bosnian (`bs`, Latin, Ijekavian) catalog: the same 4,552 keys as the newest catalogs, `bs-*` locales (Cyrillic included) and one/few/other plurals |
+3
View File
@@ -28,6 +28,7 @@ contextual, command-ID and plural translations; missing entries fall back to Eng
| Magyar | `hu` | one form |
| Tiếng Việt | `vi` | one form |
| Srpski | `sr` | one / few / many (teens use many) |
| Bosanski | `bs` | one / few / other (teens use other) |
| हिन्दी | `hi` | one / other |
| Svenska | `sv` | one / other |
| Suomi | `fi` | one / other (partitive after every count but 1) |
@@ -57,6 +58,8 @@ native system locale; an unsupported code follows the same fallback. Regional ta
Simplified Chinese remain distinct. Every Portuguese locale (`pt`, `pt-BR`, `pt-PT`) uses the
Brazilian Portuguese catalog. The Serbian catalog is written in Latin script (Ekavian); every
Serbian locale (`sr-RS`, `sr-Latn-RS`, `sr_RS@latin`, and Cyrillic `sr-Cyrl-RS`) resolves to it.
The Bosnian catalog is written in Latin script (Ijekavian); every Bosnian locale (`bs-BA`,
`bs-Latn-BA`, `bs_BA.UTF-8`, and Cyrillic `bs-Cyrl-BA`) resolves to it.
Swedish locales from Sweden and Finland (`sv-SE`, `sv-FI`, `sv_FI.UTF-8`) use the Swedish catalog;
Finnish (`fi-FI`) uses the Finnish one. Every Norwegian locale (`nb-NO`, the macrolanguage `no`,
and Nynorsk `nn-NO` from POSIX systems) uses the Bokmål catalog.