summaryrefslogtreecommitdiffhomepage
path: root/packages/desktop/src
diff options
context:
space:
mode:
authorEdin <[email protected]>2026-02-05 13:58:14 +0100
committerGitHub <[email protected]>2026-02-05 06:58:14 -0600
commitef09dddaa5ea7a533fa2042068761cd4a9cbcb35 (patch)
treeeaef73892dd1694da0f80a2c9108c9c619b002c2 /packages/desktop/src
parentbf7af99a3f07787bdf6781af0dfc57bcc169fe3b (diff)
downloadopencode-ef09dddaa5ea7a533fa2042068761cd4a9cbcb35.tar.gz
opencode-ef09dddaa5ea7a533fa2042068761cd4a9cbcb35.zip
feat(i18n): add Bosnian locale (#12283)
Diffstat (limited to 'packages/desktop/src')
-rw-r--r--packages/desktop/src/i18n/bs.ts32
-rw-r--r--packages/desktop/src/i18n/index.ts41
2 files changed, 70 insertions, 3 deletions
diff --git a/packages/desktop/src/i18n/bs.ts b/packages/desktop/src/i18n/bs.ts
new file mode 100644
index 000000000..861253bb8
--- /dev/null
+++ b/packages/desktop/src/i18n/bs.ts
@@ -0,0 +1,32 @@
+export const dict = {
+ "desktop.menu.checkForUpdates": "Provjeri ažuriranja...",
+ "desktop.menu.installCli": "Instaliraj CLI...",
+ "desktop.menu.reloadWebview": "Ponovo učitavanje webview-a",
+ "desktop.menu.restart": "Restartuj",
+
+ "desktop.dialog.chooseFolder": "Odaberi folder",
+ "desktop.dialog.chooseFile": "Odaberi datoteku",
+ "desktop.dialog.saveFile": "Sačuvaj datoteku",
+
+ "desktop.updater.checkFailed.title": "Provjera ažuriranja nije uspjela",
+ "desktop.updater.checkFailed.message": "Nije moguće provjeriti ažuriranja",
+ "desktop.updater.none.title": "Nema dostupnog ažuriranja",
+ "desktop.updater.none.message": "Već koristiš najnoviju verziju OpenCode-a",
+ "desktop.updater.downloadFailed.title": "Ažuriranje nije uspjelo",
+ "desktop.updater.downloadFailed.message": "Neuspjelo preuzimanje ažuriranja",
+ "desktop.updater.downloaded.title": "Ažuriranje preuzeto",
+ "desktop.updater.downloaded.prompt":
+ "Verzija {{version}} OpenCode-a je preuzeta. Želiš li da je instaliraš i ponovo pokreneš aplikaciju?",
+ "desktop.updater.installFailed.title": "Ažuriranje nije uspjelo",
+ "desktop.updater.installFailed.message": "Neuspjela instalacija ažuriranja",
+
+ "desktop.cli.installed.title": "CLI instaliran",
+ "desktop.cli.installed.message":
+ "CLI je instaliran u {{path}}\n\nRestartuj terminal da bi koristio komandu 'opencode'.",
+ "desktop.cli.failed.title": "Instalacija nije uspjela",
+ "desktop.cli.failed.message": "Neuspjela instalacija CLI-a: {{error}}",
+
+ "desktop.error.serverStartFailed.title": "OpenCode se nije mogao pokrenuti",
+ "desktop.error.serverStartFailed.description":
+ "Lokalni OpenCode server se nije mogao pokrenuti. Restartuj aplikaciju ili provjeri mrežne postavke (VPN/proxy) i pokušaj ponovo.",
+}
diff --git a/packages/desktop/src/i18n/index.ts b/packages/desktop/src/i18n/index.ts
index f2496346f..376769e28 100644
--- a/packages/desktop/src/i18n/index.ts
+++ b/packages/desktop/src/i18n/index.ts
@@ -15,6 +15,7 @@ import { dict as desktopRu } from "./ru"
import { dict as desktopAr } from "./ar"
import { dict as desktopNo } from "./no"
import { dict as desktopBr } from "./br"
+import { dict as desktopBs } from "./bs"
import { dict as appEn } from "../../../app/src/i18n/en"
import { dict as appZh } from "../../../app/src/i18n/zh"
@@ -30,13 +31,45 @@ import { dict as appRu } from "../../../app/src/i18n/ru"
import { dict as appAr } from "../../../app/src/i18n/ar"
import { dict as appNo } from "../../../app/src/i18n/no"
import { dict as appBr } from "../../../app/src/i18n/br"
-
-export type Locale = "en" | "zh" | "zht" | "ko" | "de" | "es" | "fr" | "da" | "ja" | "pl" | "ru" | "ar" | "no" | "br"
+import { dict as appBs } from "../../../app/src/i18n/bs"
+
+export type Locale =
+ | "en"
+ | "zh"
+ | "zht"
+ | "ko"
+ | "de"
+ | "es"
+ | "fr"
+ | "da"
+ | "ja"
+ | "pl"
+ | "ru"
+ | "ar"
+ | "no"
+ | "br"
+ | "bs"
type RawDictionary = typeof appEn & typeof desktopEn
type Dictionary = i18n.Flatten<RawDictionary>
-const LOCALES: readonly Locale[] = ["en", "zh", "zht", "ko", "de", "es", "fr", "da", "ja", "pl", "ru", "ar", "no", "br"]
+const LOCALES: readonly Locale[] = [
+ "en",
+ "zh",
+ "zht",
+ "ko",
+ "de",
+ "es",
+ "fr",
+ "da",
+ "ja",
+ "pl",
+ "ru",
+ "bs",
+ "ar",
+ "no",
+ "br",
+]
function detectLocale(): Locale {
if (typeof navigator !== "object") return "en"
@@ -64,6 +97,7 @@ function detectLocale(): Locale {
)
return "no"
if (language.toLowerCase().startsWith("pt")) return "br"
+ if (language.toLowerCase().startsWith("bs")) return "bs"
}
return "en"
@@ -108,6 +142,7 @@ function build(locale: Locale): Dictionary {
if (locale === "ar") return { ...base, ...i18n.flatten(appAr), ...i18n.flatten(desktopAr) }
if (locale === "no") return { ...base, ...i18n.flatten(appNo), ...i18n.flatten(desktopNo) }
if (locale === "br") return { ...base, ...i18n.flatten(appBr), ...i18n.flatten(desktopBr) }
+ if (locale === "bs") return { ...base, ...i18n.flatten(appBs), ...i18n.flatten(desktopBs) }
return { ...base, ...i18n.flatten(appKo), ...i18n.flatten(desktopKo) }
}