summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/context
diff options
context:
space:
mode:
authorvaur94 <[email protected]>2026-02-27 14:41:06 +0300
committerGitHub <[email protected]>2026-02-27 05:41:06 -0600
commita325c9af8fbf2c70767af070113332c4ed955c07 (patch)
treeca86821d25cd160fc8b7d80b6d31ee7569950d4e /packages/app/src/context
parentdc8c0115101e132666f64c71354e8ba065b9a989 (diff)
downloadopencode-a325c9af8fbf2c70767af070113332c4ed955c07.tar.gz
opencode-a325c9af8fbf2c70767af070113332c4ed955c07.zip
feat(app): add Turkish (tr) locale for app and ui packages (#15278)
Co-authored-by: Ugur <[email protected]>
Diffstat (limited to 'packages/app/src/context')
-rw-r--r--packages/app/src/context/language.tsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/app/src/context/language.tsx b/packages/app/src/context/language.tsx
index 905305d3a..50cc302f4 100644
--- a/packages/app/src/context/language.tsx
+++ b/packages/app/src/context/language.tsx
@@ -19,6 +19,7 @@ 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 tr } from "@/i18n/tr"
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"
@@ -35,6 +36,7 @@ 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"
+import { dict as uiTr } from "@opencode-ai/ui/i18n/tr"
export type Locale =
| "en"
@@ -53,6 +55,7 @@ export type Locale =
| "br"
| "th"
| "bs"
+ | "tr"
type RawDictionary = typeof en & typeof uiEn
type Dictionary = i18n.Flatten<RawDictionary>
@@ -78,6 +81,7 @@ const LOCALES: readonly Locale[] = [
"no",
"br",
"th",
+ "tr",
]
const LABEL_KEY: Record<Locale, keyof Dictionary> = {
@@ -97,6 +101,7 @@ const LABEL_KEY: Record<Locale, keyof Dictionary> = {
br: "language.br",
th: "language.th",
bs: "language.bs",
+ tr: "language.tr",
}
const base = i18n.flatten({ ...en, ...uiEn })
@@ -117,6 +122,7 @@ const DICT: Record<Locale, Dictionary> = {
br: { ...base, ...i18n.flatten({ ...br, ...uiBr }) },
th: { ...base, ...i18n.flatten({ ...th, ...uiTh }) },
bs: { ...base, ...i18n.flatten({ ...bs, ...uiBs }) },
+ tr: { ...base, ...i18n.flatten({ ...tr, ...uiTr }) },
}
const localeMatchers: Array<{ locale: Locale; match: (language: string) => boolean }> = [
@@ -138,6 +144,7 @@ const localeMatchers: Array<{ locale: Locale; match: (language: string) => boole
{ locale: "br", match: (language) => language.startsWith("pt") },
{ locale: "th", match: (language) => language.startsWith("th") },
{ locale: "bs", match: (language) => language.startsWith("bs") },
+ { locale: "tr", match: (language) => language.startsWith("tr") },
]
type ParityKey = "command.session.previous.unseen" | "command.session.next.unseen"
@@ -157,6 +164,7 @@ const PARITY_CHECK: Record<Exclude<Locale, "en">, Record<ParityKey, string>> = {
br,
th,
bs,
+ tr,
}
void PARITY_CHECK