diff options
| author | Edin <[email protected]> | 2026-02-05 13:58:14 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-05 06:58:14 -0600 |
| commit | ef09dddaa5ea7a533fa2042068761cd4a9cbcb35 (patch) | |
| tree | eaef73892dd1694da0f80a2c9108c9c619b002c2 /packages/app/src/context | |
| parent | bf7af99a3f07787bdf6781af0dfc57bcc169fe3b (diff) | |
| download | opencode-ef09dddaa5ea7a533fa2042068761cd4a9cbcb35.tar.gz opencode-ef09dddaa5ea7a533fa2042068761cd4a9cbcb35.zip | |
feat(i18n): add Bosnian locale (#12283)
Diffstat (limited to 'packages/app/src/context')
| -rw-r--r-- | packages/app/src/context/language.tsx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/app/src/context/language.tsx b/packages/app/src/context/language.tsx index 1b93c9b05..bf081996b 100644 --- a/packages/app/src/context/language.tsx +++ b/packages/app/src/context/language.tsx @@ -18,6 +18,7 @@ import { dict as ar } from "@/i18n/ar" import { dict as no } from "@/i18n/no" import { dict as br } from "@/i18n/br" import { dict as th } from "@/i18n/th" +import { dict as bs } from "@/i18n/bs" import { dict as uiEn } from "@opencode-ai/ui/i18n/en" import { dict as uiZh } from "@opencode-ai/ui/i18n/zh" import { dict as uiZht } from "@opencode-ai/ui/i18n/zht" @@ -33,6 +34,7 @@ import { dict as uiAr } from "@opencode-ai/ui/i18n/ar" import { dict as uiNo } from "@opencode-ai/ui/i18n/no" import { dict as uiBr } from "@opencode-ai/ui/i18n/br" import { dict as uiTh } from "@opencode-ai/ui/i18n/th" +import { dict as uiBs } from "@opencode-ai/ui/i18n/bs" export type Locale = | "en" @@ -50,6 +52,7 @@ export type Locale = | "no" | "br" | "th" + | "bs" type RawDictionary = typeof en & typeof uiEn type Dictionary = i18n.Flatten<RawDictionary> @@ -66,6 +69,7 @@ const LOCALES: readonly Locale[] = [ "ja", "pl", "ru", + "bs", "ar", "no", "br", @@ -99,6 +103,7 @@ function detectLocale(): Locale { return "no" if (language.toLowerCase().startsWith("pt")) return "br" if (language.toLowerCase().startsWith("th")) return "th" + if (language.toLowerCase().startsWith("bs")) return "bs" } return "en" @@ -129,6 +134,7 @@ export const { use: useLanguage, provider: LanguageProvider } = createSimpleCont if (store.locale === "no") return "no" if (store.locale === "br") return "br" if (store.locale === "th") return "th" + if (store.locale === "bs") return "bs" return "en" }) @@ -154,6 +160,7 @@ export const { use: useLanguage, provider: LanguageProvider } = createSimpleCont if (locale() === "no") return { ...base, ...i18n.flatten({ ...no, ...uiNo }) } if (locale() === "br") return { ...base, ...i18n.flatten({ ...br, ...uiBr }) } if (locale() === "th") return { ...base, ...i18n.flatten({ ...th, ...uiTh }) } + if (locale() === "bs") return { ...base, ...i18n.flatten({ ...bs, ...uiBs }) } return { ...base, ...i18n.flatten({ ...ko, ...uiKo }) } }) @@ -175,6 +182,7 @@ export const { use: useLanguage, provider: LanguageProvider } = createSimpleCont no: "language.no", br: "language.br", th: "language.th", + bs: "language.bs", } const label = (value: Locale) => t(labelKey[value]) |
