feat(ui): localize UI strings

Converts hardcoded UI copy to i18n keys across the app, adds global translation for non-component modules, and splits the English catalog into feature modules with duplicate-key detection.
This commit is contained in:
Shantur Rathore
2026-01-26 12:26:12 +00:00
parent 33939f4096
commit 5b1e21345f
88 changed files with 2080 additions and 822 deletions

View File

@@ -3,6 +3,7 @@ import type { SupportMeta } from "../../../server/src/api-types"
import { getServerMeta } from "../lib/server-meta"
import { showToastNotification, ToastHandle } from "../lib/notifications"
import { getLogger } from "../lib/logger"
import { tGlobal } from "../lib/i18n"
import { hasInstances, showFolderSelection } from "./ui"
const log = getLogger("actions")
@@ -42,16 +43,16 @@ function ensureVisibilityEffect() {
if (!activeToast || activeToastKey !== key) {
dismissActiveToast()
activeToast = showToastNotification({
title: support.message ?? "Upgrade required",
title: support.message ?? tGlobal("releases.upgradeRequired.title"),
message: support.latestServerVersion
? `Update to CodeNomad ${support.latestServerVersion} to use the latest UI.`
: "Update CodeNomad to use the latest UI.",
? tGlobal("releases.upgradeRequired.message.withVersion", { version: support.latestServerVersion })
: tGlobal("releases.upgradeRequired.message.noVersion"),
variant: "info",
duration: Number.POSITIVE_INFINITY,
position: "bottom-right",
action: support.latestServerUrl
? {
label: "Get update",
label: tGlobal("releases.upgradeRequired.action.getUpdate"),
href: support.latestServerUrl,
}
: undefined,