From b13c269162e6c858acbce6cc792636cd4cb921a9 Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Tue, 20 Jan 2026 15:00:46 -0600 Subject: wip(app): i18n --- packages/ui/src/context/i18n.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'packages/ui/src/context') 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 +export type UiI18nParams = Record export type UiI18n = { locale: Accessor @@ -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) }) } -- cgit v1.2.3