summaryrefslogtreecommitdiffhomepage
path: root/packages/ui/src/context
diff options
context:
space:
mode:
authorAdam <[email protected]>2026-01-20 15:00:46 -0600
committerAdam <[email protected]>2026-01-20 17:58:06 -0600
commitb13c269162e6c858acbce6cc792636cd4cb921a9 (patch)
treed4e81f96109919ce41b36c175bd8da9aba5506ee /packages/ui/src/context
parentef36af0e55d814dc80893af923886ccff40f46e5 (diff)
downloadopencode-b13c269162e6c858acbce6cc792636cd4cb921a9.tar.gz
opencode-b13c269162e6c858acbce6cc792636cd4cb921a9.zip
wip(app): i18n
Diffstat (limited to 'packages/ui/src/context')
-rw-r--r--packages/ui/src/context/i18n.tsx5
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/ui/src/context/i18n.tsx b/packages/ui/src/context/i18n.tsx
index fd8b05d3c..a2ff0f37b 100644
--- a/packages/ui/src/context/i18n.tsx
+++ b/packages/ui/src/context/i18n.tsx
@@ -3,7 +3,7 @@ import { dict as en } from "../i18n/en"
export type UiI18nKey = keyof typeof en
-export type UiI18nParams = Record<string, string | number | boolean | null | undefined>
+export type UiI18nParams = Record<string, string | number | boolean>
export type UiI18n = {
locale: Accessor<string>
@@ -15,8 +15,7 @@ function resolveTemplate(text: string, params?: UiI18nParams) {
return text.replace(/{{\s*([^}]+?)\s*}}/g, (_, rawKey) => {
const key = String(rawKey)
const value = params[key]
- if (value === undefined || value === null) return ""
- return String(value)
+ return value === undefined ? "" : String(value)
})
}