Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

chore(i18n): replace hardcoded UI text with t() calls across dashboard (round 3)

diegosouzapw55913d1c42cb
diff --git a/scripts/i18n/build-pending-from-missing.mjs b/scripts/i18n/build-pending-from-missing.mjs
new file mode 100644
index 0000000000..0329d103fb
--- /dev/null
+++ b/scripts/i18n/build-pending-from-missing.mjs
@@ -0,0 +1,104 @@
+#!/usr/bin/env node
+/**
+ * For every missing key in _audit.json, locate its English value by
+ * 1) finding the t("key") call site in the file
+ * 2) grabbing the line(s) immediately around it in the HEAD version of the file
+ *
+ * This rebuilds a complete _pending-keys.json after subagents have already
+ * rewritten .tsx files but en.json edits were lost.
+ */
+import { readFileSync, writeFileSync } from "node:fs";
+import { execSync } from "node:child_process";
+
+const audit = JSON.parse(readFileSync("scripts/i18n/_audit.json", "utf8"));
+
+function loadHead(file) {
+ try {
+ return execSync(`git show "HEAD:${file}"`, {
+ encoding: "utf8",
+ maxBuffer: 32 * 1024 * 1024,
+ });
+ } catch {
+ return null;
+ }
+}
+
+const SKIP = new Set([
+ "templatePayloads.vision.system",
+ "templatePayloads.vision.userPrompt",
+ "templatePayloads.vision.imageUrl",
+ "templatePayloads.schemaCoercion.userPrompt",
+ "templatePayloads.schemaCoercion.toolDescription",
+ "templatePayloads.schemaCoercion.cityDescription",
+]);
+
+/** Find the line in NEW source where t("key") is used, then derive English value from HEAD */
+function valueForKey(file, key) {
+ const cur = readFileSync(file, "utf8").split("\n");
+ const head = loadHead(file)?.split("\n") ?? [];
+ // String search avoids ReDoS — key is our own audit data but better safe
+ const needle1 = `t("${key}")`;
+ const needle2 = `t('${key}')`;
+ for (let i = 0; i < cur.length; i++) {
+ const line = cur[i];
+ if (!line.includes(needle1) && !line.includes(needle2)) continue;
+ // The original line in HEAD should be similar around the same area
+ // Find the most-recently corresponding HEAD line: scan backwards and forwards from i
+ const probe = [i, i - 1, i + 1, i - 2, i + 2, i - 3, i + 3];
+ for (const j of probe) {
+ if (j < 0 || j >= head.length) continue;
+ const line = head[j];
+ // Try to extract the English literal: between > <, or attribute value
+ const jsxMatch = line.match(/>([^<>{}\n]{2,})</);
+ if (jsxMatch && !jsxMatch[1].includes("{") && !jsxMatch[1].includes("=>")) {
+ const v = jsxMatch[1].trim();
+ if (v && /[A-Za-z]/.test(v) && v !== key) return v;
+ }
+ const attrMatch = line.match(
+ /\b(?:title|placeholder|aria-label|alt|label)\s*=\s*["']([^"']+)["']/
+ );
+ if (attrMatch) {
+ const v = attrMatch[1].trim();
+ if (v && /[A-Za-z]/.test(v) && v !== key) return v;
+ }
+ }
+ }
+ return null;
+}
+
+const inferredNamespaces = new Map();
+function ensureNs(ns) {
+ if (!inferredNamespaces.has(ns)) inferredNamespaces.set(ns, {});
+ return inferredNamespaces.get(ns);
+}
+
+for (const entry of audit) {
+ if (!entry.missingKeys.length) continue;
+ const ns = entry.namespaces[0];
+ if (!ns) continue; // exampleTemplates etc. — skip
+ const target = ensureNs(ns);
+ for (const key of entry.missingKeys) {
+ if (SKIP.has(key)) continue;
+ if (target[key]) continue;
+ const value = valueForKey(entry.file, key);
+ if (value) {
+ target[key] = value;
+ } else {
+ // Could not infer — leave a TODO marker so we notice
+ target[key] = `__TODO__${key}`;
+ }
+ }
+}
+
+const out = Object.fromEntries(inferredNamespaces);
+writeFileSync("scripts/i18n/_pending-keys.json", JSON.stringify(out, null, 2) + "\n");
+
+let total = 0;
+let todo = 0;
+for (const [ns, keys] of Object.entries(out)) {
+ const cnt = Object.keys(keys).length;
+ total += cnt;
+ for (const v of Object.values(keys)) if (String(v).startsWith("__TODO__")) todo++;
+ console.log(`${ns}: ${cnt} keys`);
+}
+console.log(`\nTotal: ${total} keys (${todo} need manual resolution)`);
diff --git a/src/app/(dashboard)/dashboard/analytics/ComboHealthTab.tsx b/src/app/(dashboard)/dashboard/analytics/ComboHealthTab.tsx
index 14d386e5e4..b327fac2f1 100644
--- a/src/app/(dashboard)/dashboard/analytics/ComboHealthTab.tsx
+++ b/src/app/(dashboard)/dashboard/analytics/ComboHealthTab.tsx
@@ -1,6 +1,7 @@
"use client";
import { useCallback, useEffect, useMemo, useState } from "react";
+import { useTranslations } from "next-intl";
import Card from "@/shared/components/Card";
import Badge from "@/shared/components/Badge";
import { Skeleton, Spinner } from "@/shared/components/Loading";
@@ -92,6 +93,7 @@ function DistributionBar({ label, value, meta }: { label: string; value: number;
}
function ComboHealthCard({ combo }: { combo: ComboHealthMetrics }) {
+ const t = useTranslations("analytics");
const sortedDistribution = useMemo(
() =>
[...combo.usageSkew.modelDistribution].sort(
@@ -119,18 +121,18 @@ function ComboHealthCard({ combo }: { combo: ComboHealthMetrics }) {
<div className="grid grid-cols-1 gap-3 sm:grid-cols-3 lg:min-w-[420px]">
<MetricBlock
icon="battery_status_good"
- label="Worst quota left"
+ label={t("comboHealthWorstQuotaLeft")}
value={formatPercent(combo.quotaHealth.worstRemainingPct)}
/>
<MetricBlock
icon="balance"
- label="Usage skew"
+ label={t("comboHealthUsageSkew")}
value={combo.usageSkew.giniCoefficient.toFixed(2)}
subValue="Gini coefficient"
/>
<MetricBlock
icon="bolt"
- label="Success rate"
+ label={t("comboHealthSuccessRate")}
value={formatPercent(combo.performance.successRate * 100, 1)}
subValue={`${combo.performance.totalRequests.toLocaleString()} requests`}
/>
@@ -141,7 +143,9 @@ function ComboHealthCard({ combo }: { combo: ComboHealthMetrics }) {
<div className="grid gap-6 px-6 py-5 xl:grid-cols-[1.1fr_1fr_0.95fr]">
<section className="flex flex-col gap-4">
<div>
- <div className="text-sm font-semibold text-text-main">Quota health</div>
+ <div className="text-sm font-semibold text-text-main">
+ {t("comboHealthQuotaHealth")}
+ </div>
<div className="mt-1 text-xs text-text-muted">
Lowest remaining quota across providers with short trend signals.
</div>
@@ -189,7 +193,7 @@ function ComboHealthCard({ combo }: { combo: ComboHealthMetrics }) {
<section className="flex flex-col gap-4">
<div>
- <div className="text-sm font-semibold text-text-main">Usage skew</div>
+ <div className="text-sm font-semibold text-text-main">{t("comboHealthUsageSkew")}</div>
<div className="mt-1 text-xs text-text-muted">
Model request share and token share within this combo.
</div>
@@ -214,12 +218,12 @@ function ComboHealthCard({ combo }: { combo: ComboHealthMetrics }) {
<div className="mt-3 grid gap-2">
<DistributionBar
- label="Requests"
+ label={t("comboHealthRequests")}
value={entry.requestShare}
meta={formatShare(entry.requestShare)}
/>
<DistributionBar
- label="Tokens"
+ label={t("comboHealthTokens")}
value={entry.tokenShare}
meta={formatShare(entry.tokenShare)}
/>
@@ -240,17 +244,17 @@ function ComboHealthCard({ combo }: { combo: ComboHealthMetrics }) {
<div className="grid gap-3 sm:grid-cols-3 xl:grid-cols-1">
<MetricBlock
icon="timer"
- label="Avg latency"
+ label={t("comboHealthAvgLatency")}
value={formatLatency(combo.performance.avgLatencyMs)}
/>
<MetricBlock
icon="task_alt"
- label="Success rate"
+ label={t("comboHealthSuccessRate")}
value={formatPercent(combo.performance.successRate * 100, 1)}
/>
<MetricBlock
icon="stacked_line_chart"
- label="Total requests"
+ label={t("comboHealthTotalRequests")}
value={combo.performance.totalRequests.toLocaleString()}
/>
</div>
@@ -260,7 +264,9 @@ function ComboHealthCard({ combo }: { combo: ComboHealthMetrics }) {
{targetHealth.length > 0 ? (
<div className="border-t border-black/5 px-6 py-5 dark:border-white/5">
<div>
- <div className="text-sm font-semibold text-text-main">Execution targets</div>
+ <div className="text-sm font-semibold text-text-main">
+ {t("comboHealthExecutionTargets")}
+ </div>
<div className="mt-1 text-xs text-text-muted">
Step-level runtime metrics and quota visibility for structured combo targets.
</div>
@@ -297,17 +303,17 @@ function ComboHealthCard({ combo }: { combo: ComboHealthMetrics }) {
<div className="mt-3 grid gap-2 sm:grid-cols-3">
<DistributionBar
- label="Success"
+ label={t("comboHealthSuccess")}
value={Math.max(target.successRate, 0) / 100}
meta={formatPercent(target.successRate, 0)}
/>
<DistributionBar
- label="Latency"
+ label={t("comboHealthLatency")}
value={target.avgLatencyMs > 0 ? 1 : 0}
meta={formatLatency(target.avgLatencyMs)}
/>
<DistributionBar
- label="Quota"
+ label={t("comboHealthQuota")}
value={Math.max(target.quotaRemainingPct || 0, 0) / 100}
meta={formatPercentOrDash(target.quotaRemainingPct)}
/>
@@ -361,6 +367,7 @@ function ComboHealthSkeleton() {
}
export default function ComboHealthTab() {
+ const t = useTranslations("analytics");
const [range, setRange] = useState<UtilizationTimeRange>("24h");
const [data, setData] = useState<ComboHealthResponse | null>(null);
const [loading, setLoading] = useState(true);
@@ -421,7 +428,7 @@ export default function ComboHealthTab() {
<div className="flex flex-col gap-6">
<div className="flex flex-col gap-4 rounded-xl border border-black/5 bg-surface p-5 shadow-sm dark:border-white/5 md:flex-row md:items-center md:justify-between">
<div>
- <h2 className="text-lg font-semibold text-text-main">Combo health</h2>
+ <h2 className="text-lg font-semibold text-text-main">{t("comboHealthTitle")}</h2>
<p className="mt-1 text-sm text-text-muted">
Monitor quota pressure, skewed model usage, and delivery performance by combo.
</p>
@@ -436,7 +443,7 @@ export default function ComboHealthTab() {
<div className="flex flex-col items-center justify-center gap-4 text-center">
<span className="material-symbols-outlined text-[40px] text-error">sync_problem</span>
<div className="flex flex-col gap-1">
- <div className="font-medium text-text-main">Unable to load combo health</div>
+ <div className="font-medium text-text-main">{t("comboHealthUnableToLoad")}</div>
<div className="text-sm text-text-muted">{error}</div>
</div>
<button
@@ -477,7 +484,7 @@ export default function ComboHealthTab() {
flowing.
</div>
<div className="rounded-lg border border-black/5 bg-black/[0.02] p-4 dark:border-white/5 dark:bg-white/[0.02]">
- <p className="text-xs font-medium text-text-main">Getting started</p>
+ <p className="text-xs font-medium text-text-main">{t("comboHealthGettingStarted")}</p>
<ul className="mt-2 text-left text-xs text-text-muted">
<li className="flex items-start gap-2">
<span className="material-symbols-outlined text-[14px] text-primary">
diff --git a/src/app/(dashboard)/dashboard/analytics/CompressionAnalyticsTab.tsx b/src/app/(dashboard)/dashboard/analytics/CompressionAnalyticsTab.tsx
index 6c84c6b077..d633b38010 100644
--- a/src/app/(dashboard)/dashboard/analytics/CompressionAnalyticsTab.tsx
+++ b/src/app/(dashboard)/dashboard/analytics/CompressionAnalyticsTab.tsx
@@ -8,6 +8,7 @@
"use client";
import { useEffect, useState } from "react";
+import { useTranslations } from "next-intl";
interface CompressionAnalyticsSummary {
totalRequests: number;
@@ -116,6 +117,7 @@ function ProviderBar({
}
export default function CompressionAnalyticsTab() {
+ const t = useTranslations("analytics");
const [stats, setStats] = useState<CompressionAnalyticsSummary | null>(null);
const [loading, setLoading] = useState(true);
const [error, setError] = useState<string | null>(null);
@@ -192,25 +194,33 @@ export default function CompressionAnalyticsTab() {
<div className="grid grid-cols-2 md:grid-cols-6 gap-4">
<StatCard
icon="compress"
- label="Total Requests"
+ label={t("compressionAnalyticsTotalRequests")}
value={stats.totalRequests.toLocaleString()}
/>
<StatCard
icon="token"
- label="Tokens Saved"
+ label={t("compressionAnalyticsTokensSaved")}
value={stats.totalTokensSaved.toLocaleString()}
/>
- <StatCard icon="percent" label="Avg Savings" value={`${stats.avgSavingsPct}%`} />
- <StatCard icon="timer" label="Avg Duration" value={`${stats.avgDurationMs}ms`} />
+ <StatCard
+ icon="percent"
+ label={t("compressionAnalyticsAvgSavings")}
+ value={`${stats.avgSavingsPct}%`}
+ />
+ <StatCard
+ icon="timer"
+ label={t("compressionAnalyticsAvgDuration")}
+ value={`${stats.avgDurationMs}ms`}
+ />
<StatCard
icon="receipt_long"
- label="Receipts"
+ label={t("compressionAnalyticsReceipts")}
value={stats.realUsage.requestsWithReceipts.toLocaleString()}
sub={`${stats.realUsage.totalTokens.toLocaleString()} real tokens`}
/>
<StatCard
icon="verified"
- label="Fallbacks"
+ label={t("compressionAnalyticsFallbacks")}
value={stats.validationFallbacks.toLocaleString()}
sub="validation restores"
/>
@@ -224,25 +234,25 @@ export default function CompressionAnalyticsTab() {
</h3>
<div className="grid grid-cols-1 md:grid-cols-5 gap-4 text-sm">
<div>
- <div className="text-text-muted">Prompt tokens</div>
+ <div className="text-text-muted">{t("compressionAnalyticsPromptTokens")}</div>
<div className="text-lg font-semibold text-text">
{stats.realUsage.promptTokens.toLocaleString()}
</div>
</div>
<div>
- <div className="text-text-muted">Completion tokens</div>
+ <div className="text-text-muted">{t("compressionAnalyticsCompletionTokens")}</div>
<div className="text-lg font-semibold text-text">
{stats.realUsage.completionTokens.toLocaleString()}
</div>
</div>
<div>
- <div className="text-text-muted">Total tokens</div>
+ <div className="text-text-muted">{t("compressionAnalyticsTotalTokens")}</div>
<div className="text-lg font-semibold text-text">
{stats.realUsage.totalTokens.toLocaleString()}
</div>
</div>
<div>
- <div className="text-text-muted">Cache tokens</div>
+ <div className="text-text-muted">{t("compressionAnalyticsCacheTokens")}</div>
<div className="text-lg font-semibold text-text">
{(
(stats.realUsage.cacheReadTokens ?? 0) + (stats.realUsage.cacheWriteTokens ?? 0)
@@ -345,7 +355,7 @@ export default function CompressionAnalyticsTab() {
<span className="material-symbols-outlined text-[48px] mb-3 block text-primary opacity-50">
compress
</span>
- <p className="font-medium text-text">No compression data yet</p>
+ <p className="font-medium text-text">{t("compressionAnalyticsNoDataYet")}</p>
<p className="text-sm mt-1">
Use <code className="bg-bg-muted px-1 rounded">POST /v1/chat/completions</code> with
compression configuration to start tracking compression analytics.
diff --git a/src/app/(dashboard)/dashboard/cloud-agents/page.tsx b/src/app/(dashboard)/dashboard/cloud-agents/page.tsx
index ca64dcef00..1b7e4dc004 100644
--- a/src/app/(dashboard)/dashboard/cloud-agents/page.tsx
+++ b/src/app/(dashboard)/dashboard/cloud-agents/page.tsx
@@ -328,14 +328,14 @@ export default function CloudAgentsPage() {
</div>
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
<Input
- label="Repository name"
+ label={t("repositoryName")}
placeholder="omniroute"
value={newTask.repoName}
onChange={(e) => setNewTask({ ...newTask, repoName: e.target.value })}
required
/>
<Input
- label="Repository URL"
+ label={t("repositoryUrl")}
placeholder="https://github.com/owner/repo"
value={newTask.repoUrl}
onChange={(e) => setNewTask({ ...newTask, repoUrl: e.target.value })}
@@ -344,7 +344,7 @@ export default function CloudAgentsPage() {
</div>
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
<Input
- label="Branch"
+ label={t("branch")}
placeholder="main"
value={newTask.branch}
onChange={(e) => setNewTask({ ...newTask, branch: e.target.value })}
diff --git a/src/app/(dashboard)/dashboard/combos/page.tsx b/src/app/(dashboard)/dashboard/combos/page.tsx
index d3f0c2a5b5..32cc038b2f 100644
--- a/src/app/(dashboard)/dashboard/combos/page.tsx
+++ b/src/app/(dashboard)/dashboard/combos/page.tsx
@@ -1732,7 +1732,7 @@ function ComboCard({
onChange={(e) => handleCompressionOverrideChange(e.target.value)}
disabled={isSavingCompression}
className="text-xs py-1 px-2 rounded border border-black/10 dark:border-white/10 bg-white dark:bg-bg-main text-text-main focus:border-primary focus:outline-none transition-colors disabled:opacity-50 max-w-[130px] md:max-w-none"
- title="Compression Override"
+ title={t("compressionOverride")}
>
<option value="">Default</option>
<option value="off">Off</option>
diff --git a/src/app/(dashboard)/dashboard/health/page.tsx b/src/app/(dashboard)/dashboard/health/page.tsx
index edbd9972b6..d760cc6d7f 100644
--- a/src/app/(dashboard)/dashboard/health/page.tsx
+++ b/src/app/(dashboard)/dashboard/health/page.tsx
@@ -255,7 +255,7 @@ export default function HealthPage() {
<span className="material-symbols-outlined text-[18px]">database</span>
</div>
<div>
- <h2 className="text-lg font-semibold text-text-main">Database Health</h2>
+ <h2 className="text-lg font-semibold text-text-main">{t("databaseHealth")}</h2>
<p className="text-sm text-text-muted">
Diagnose and repair stale quota/domain rows and broken combo references.
</p>
@@ -417,13 +417,13 @@ export default function HealthPage() {
</div>
<div className="grid grid-cols-2 gap-3 mb-4">
<div className="rounded-xl border border-border/40 bg-surface/30 p-3">
- <div className="text-xs text-text-muted">Sticky-bound sessions</div>
+ <div className="text-xs text-text-muted">{t("stickyBoundSessions")}</div>
<div className="text-2xl font-semibold text-text-main mt-1">
{sessions?.stickyBoundCount ?? 0}
</div>
</div>
<div className="rounded-xl border border-border/40 bg-surface/30 p-3">
- <div className="text-xs text-text-muted">Sessions by API key</div>
+ <div className="text-xs text-text-muted">{t("sessionsByApiKey")}</div>
<div className="text-2xl font-semibold text-text-main mt-1">
{Object.keys(sessions?.byApiKey || {}).length}
</div>
@@ -453,7 +453,7 @@ export default function HealthPage() {
))}
</div>
) : (
- <p className="text-sm text-text-muted">No active sessions tracked yet.</p>
+ <p className="text-sm text-text-muted">{t("noActiveSessionsTracked")}</p>
)}
</Card>
@@ -532,14 +532,14 @@ export default function HealthPage() {
))}
</div>
) : (
- <p className="text-sm text-text-muted">No session quota monitors active.</p>
+ <p className="text-sm text-text-muted">{t("noSessionQuotaMonitorsActive")}</p>
)}
</Card>
</div>
{/* Graceful Degradation Status */}
{degradation && degradation.features && degradation.features.length > 0 && (
- <Card className="p-5" role="region" aria-label="Graceful Degradation Status">
+ <Card className="p-5" role="region" aria-label={t("gracefulDegradationStatus")}>
<div className="flex items-center justify-between mb-4">
<h2 className="text-lg font-semibold text-text-main flex items-center gap-2">
<span className="material-symbols-outlined text-[20px] text-primary">healing</span>
diff --git a/src/app/(dashboard)/dashboard/settings/components/SystemStorageTab.tsx b/src/app/(dashboard)/dashboard/settings/components/SystemStorageTab.tsx
index 870c2e75a2..305c9b1939 100644
--- a/src/app/(dashboard)/dashboard/settings/components/SystemStorageTab.tsx
+++ b/src/app/(dashboard)/dashboard/settings/components/SystemStorageTab.tsx
@@ -666,7 +666,9 @@ export default function SystemStorageTab() {
<div className="p-3 rounded-lg bg-bg border border-border mb-4">
<div className="flex items-start justify-between gap-3 flex-wrap mb-3">
<div>
- <p className="text-sm font-medium text-text-main">Database backup retention</p>
+ <p className="text-sm font-medium text-text-main">
+ {t("storageDatabaseBackupRetention")}
+ </p>
<p className="text-xs text-text-muted">
Automatic SQLite backups are stored in <code>db_backups</code>. Configure how many
snapshots to keep and optionally delete backups older than N days.
@@ -1050,7 +1052,7 @@ export default function SystemStorageTab() {
>
delete_forever
</span>
- <p className="font-medium">Purge Data</p>
+ <p className="font-medium">{t("storagePurgeData")}</p>
</div>
<p className="text-xs text-text-muted">
Immediately delete all records (no retention check). Use with caution.
@@ -1389,7 +1391,9 @@ export default function SystemStorageTab() {
</h4>
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
<div>
- <label className="block text-xs text-text-muted mb-1">Quota Snapshots (days)</label>
+ <label className="block text-xs text-text-muted mb-1">
+ {t("retentionQuotaSnapshots")}
+ </label>
<input
type="number"
min="1"
@@ -1429,7 +1433,7 @@ export default function SystemStorageTab() {
/>
</div>
<div>
- <label className="block text-xs text-text-muted mb-1">MCP Audit (days)</label>
+ <label className="block text-xs text-text-muted mb-1">{t("retentionMcpAudit")}</label>
<input
type="number"
min="1"
@@ -1448,7 +1452,9 @@ export default function SystemStorageTab() {
/>
</div>
<div>
- <label className="block text-xs text-text-muted mb-1">A2A Events (days)</label>
+ <label className="block text-xs text-text-muted mb-1">
+ {t("retentionA2aEvents")}
+ </label>
<input
type="number"
min="1"
@@ -1467,7 +1473,7 @@ export default function SystemStorageTab() {
/>
</div>
<div>
- <label className="block text-xs text-text-muted mb-1">Call Logs (days)</label>
+ <label className="block text-xs text-text-muted mb-1">{t("retentionCallLogs")}</label>
<input
type="number"
min="1"
@@ -1486,7 +1492,9 @@ export default function SystemStorageTab() {
/>
</div>
<div>
- <label className="block text-xs text-text-muted mb-1">Usage History (days)</label>
+ <label className="block text-xs text-text-muted mb-1">
+ {t("retentionUsageHistory")}
+ </label>
<input
type="number"
min="1"
@@ -1505,7 +1513,9 @@ export default function SystemStorageTab() {
/>
</div>
<div>
- <label className="block text-xs text-text-muted mb-1">Memory Entries (days)</label>
+ <label className="block text-xs text-text-muted mb-1">
+ {t("retentionMemoryEntries")}
+ </label>
<input
type="number"
min="1"
@@ -1633,7 +1643,9 @@ export default function SystemStorageTab() {
<div className="space-y-4">
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
<div>
- <label className="block text-xs text-text-muted mb-1">Auto Vacuum Mode</label>
+ <label className="block text-xs text-text-muted mb-1">
+ {t("storageAutoVacuumMode")}
+ </label>
<select
value={dbSettings.optimization.autoVacuumMode}
onChange={(e) =>
@@ -1653,7 +1665,9 @@ export default function SystemStorageTab() {
</select>
</div>
<div>
- <label className="block text-xs text-text-muted mb-1">Scheduled Vacuum</label>
+ <label className="block text-xs text-text-muted mb-1">
+ {t("storageScheduledVacuum")}
+ </label>
<select
value={dbSettings.optimization.scheduledVacuum}
onChange={(e) =>
@@ -1674,7 +1688,9 @@ export default function SystemStorageTab() {
</select>
</div>
<div>
- <label className="block text-xs text-text-muted mb-1">Vacuum Hour (0-23)</label>
+ <label className="block text-xs text-text-muted mb-1">
+ {t("storageVacuumHour")}
+ </label>
<input
type="number"
min="0"
@@ -1693,7 +1709,7 @@ export default function SystemStorageTab() {
/>
</div>
<div>
- <label className="block text-xs text-text-muted mb-1">Page Size (bytes)</label>
+ <label className="block text-xs text-text-muted mb-1">{t("storagePageSize")}</label>
<input
type="number"
min="512"
@@ -1790,23 +1806,23 @@ export default function SystemStorageTab() {
</div>
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
<div className="p-3 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]">
- <p className="text-xs text-text-muted mb-1">Database Size</p>
+ <p className="text-xs text-text-muted mb-1">{t("storageDatabaseSize")}</p>
<p className="text-sm font-semibold">
{formatBytes(dbSettings.stats.databaseSizeBytes)}
</p>
</div>
<div className="p-3 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]">
- <p className="text-xs text-text-muted mb-1">Page Count</p>
+ <p className="text-xs text-text-muted mb-1">{t("storagePageCount")}</p>
<p className="text-sm font-semibold">{dbSettings.stats.pageCount.toLocaleString()}</p>
</div>
<div className="p-3 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]">
- <p className="text-xs text-text-muted mb-1">Freelist Count</p>
+ <p className="text-xs text-text-muted mb-1">{t("storageFreelistCount")}</p>
<p className="text-sm font-semibold">
{dbSettings.stats.freelistCount.toLocaleString()}
</p>
</div>
<div className="p-3 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]">
- <p className="text-xs text-text-muted mb-1">Last Vacuum</p>
+ <p className="text-xs text-text-muted mb-1">{t("storageLastVacuum")}</p>
<p className="text-sm font-semibold">
{dbSettings.stats.lastVacuumAt
? new Date(dbSettings.stats.lastVacuumAt).toLocaleString(locale)
@@ -1814,7 +1830,7 @@ export default function SystemStorageTab() {
</p>
</div>
<div className="p-3 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]">
- <p className="text-xs text-text-muted mb-1">Last Optimization</p>
+ <p className="text-xs text-text-muted mb-1">{t("storageLastOptimization")}</p>
<p className="text-sm font-semibold">
{dbSettings.stats.lastOptimizationAt
? new Date(dbSettings.stats.lastOptimizationAt).toLocaleString(locale)
@@ -1822,12 +1838,12 @@ export default function SystemStorageTab() {
</p>
</div>
<div className="p-3 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]">
- <p className="text-xs text-text-muted mb-1">Integrity Check</p>
+ <p className="text-xs text-text-muted mb-1">{t("storageIntegrityCheck")}</p>
<p className="text-sm font-semibold">
{dbSettings.stats.integrityCheck === "ok" ? (
- <span className="text-green-500">✓ OK</span>
+ <span className="text-green-500">{t("storageIntegrityOk")}</span>
) : dbSettings.stats.integrityCheck === "error" ? (
- <span className="text-red-500">✗ Error</span>
+ <span className="text-red-500">{t("storageIntegrityError")}</span>
) : (
"Not checked"
)}
@@ -1866,7 +1882,7 @@ export default function SystemStorageTab() {
pin
</span>
<div>
- <p className="font-medium">Usage Token Buffer</p>
+ <p className="font-medium">{t("storageUsageTokenBuffer")}</p>
<p className="text-sm text-text-muted mt-1">
Extra tokens added to reported usage to account for system prompt overhead. Set to 0
to report raw provider token counts. Default: 2000.
diff --git a/src/app/(dashboard)/dashboard/tokens/page.tsx b/src/app/(dashboard)/dashboard/tokens/page.tsx
index b369ae21b6..9a4cdc78ae 100644
--- a/src/app/(dashboard)/dashboard/tokens/page.tsx
+++ b/src/app/(dashboard)/dashboard/tokens/page.tsx
@@ -1,6 +1,7 @@
"use client";
import { useState, useEffect, useCallback } from "react";
+import { useTranslations } from "next-intl";
import { Card } from "@/shared/components";
interface TokenLedgerEntry {
@@ -34,6 +35,7 @@ interface ServerConnection {
}
export default function TokensPage() {
+ const t = useTranslations("common");
// Balance & History
const [balance, setBalance] = useState(0);
const [history, setHistory] = useState<TokenLedgerEntry[]>([]);
@@ -239,7 +241,7 @@ export default function TokensPage() {
<Card>
<div className="flex items-center justify-between">
<div>
- <p className="text-sm text-text-muted">Token Balance</p>
+ <p className="text-sm text-text-muted">{t("tokensTokenBalance")}</p>
<p className="text-4xl font-bold mt-1">{balance.toLocaleString()}</p>
</div>
<div className="text-6xl opacity-20">🪙</div>
@@ -247,15 +249,17 @@ export default function TokensPage() {
</Card>
{/* Transfer Form */}
- <Card title="Send Tokens" icon="send">
+ <Card title={t("tokensSendTokens")} icon="send">
<form onSubmit={handleTransfer} className="grid gap-4">
<div>
- <label className="block text-sm text-text-muted mb-1">Recipient API Key ID</label>
+ <label className="block text-sm text-text-muted mb-1">
+ {t("tokensRecipientApiKeyId")}
+ </label>
<input
type="text"
value={toApiKeyId}
onChange={(e) => setToApiKeyId(e.target.value)}
- placeholder="Enter recipient API key ID"
+ placeholder={t("tokensRecipientApiKeyIdPlaceholder")}
required
className="w-full px-3 py-2 rounded-lg bg-background border border-border text-sm focus:outline-none focus:ring-1 focus:ring-violet-500"
/>
@@ -274,12 +278,14 @@ export default function TokensPage() {
/>
</div>
<div>
- <label className="block text-sm text-text-muted mb-1">Reason (optional)</label>
+ <label className="block text-sm text-text-muted mb-1">
+ {t("tokensReasonOptional")}
+ </label>
<input
type="text"
value={reason}
onChange={(e) => setReason(e.target.value)}
- placeholder="e.g. bonus, reward"
+ placeholder={t("tokensReasonPlaceholder")}
className="w-full px-3 py-2 rounded-lg bg-background border border-border text-sm focus:outline-none focus:ring-1 focus:ring-violet-500"
/>
</div>
@@ -306,11 +312,11 @@ export default function TokensPage() {
</Card>
{/* Transaction History */}
- <Card title="Transaction History" icon="history">
+ <Card title={t("tokensTransactionHistory")} icon="history">
{historyLoading ? (
<div className="text-center py-8 text-text-muted">Loading...</div>
) : history.length === 0 ? (
- <div className="text-center py-8 text-text-muted">No transactions yet</div>
+ <div className="text-center py-8 text-text-muted">{t("tokensNoTransactionsYet")}</div>
) : (
<div className="overflow-x-auto">
<table className="w-full">
@@ -364,11 +370,11 @@ export default function TokensPage() {
</Card>
{/* Invite Panel */}
- <Card title="Invite Codes" icon="mail">
+ <Card title={t("tokensInviteCodes")} icon="mail">
<div className="flex flex-col gap-4">
<div className="flex items-end gap-3">
<div className="flex-1">
- <label className="block text-sm text-text-muted mb-1">Max Uses</label>
+ <label className="block text-sm text-text-muted mb-1">{t("tokensMaxUses")}</label>
<input
type="number"
value={inviteMaxUses}
@@ -398,12 +404,12 @@ export default function TokensPage() {
className="flex items-end gap-3 border-t border-border pt-4"
>
<div className="flex-1">
- <label className="block text-sm text-text-muted mb-1">Redeem Code</label>
+ <label className="block text-sm text-text-muted mb-1">{t("tokensRedeemCode")}</label>
<input
type="text"
value={redeemCode}
onChange={(e) => setRedeemCode(e.target.value)}
- placeholder="Enter invite code"
+ placeholder={t("tokensRedeemCodePlaceholder")}
required
className="w-full px-3 py-2 rounded-lg bg-background border border-border text-sm focus:outline-none focus:ring-1 focus:ring-violet-500"
/>
@@ -432,7 +438,7 @@ export default function TokensPage() {
{/* Active Invites */}
{invites.length > 0 && (
<div className="border-t border-border pt-4">
- <p className="text-sm text-text-muted mb-3">Your Active Invites</p>
+ <p className="text-sm text-text-muted mb-3">{t("tokensYourActiveInvites")}</p>
<div className="space-y-2">
{invites.map((inv) => (
<div
@@ -463,7 +469,7 @@ export default function TokensPage() {
</Card>
{/* Server Panel */}
- <Card title="Community Servers" icon="dns">
+ <Card title={t("tokensCommunityServers")} icon="dns">
<div className="flex flex-col gap-4">
<form onSubmit={handleConnectServer} className="grid gap-3">
<div className="grid grid-cols-1 md:grid-cols-3 gap-3">
@@ -471,7 +477,7 @@ export default function TokensPage() {
type="text"
value={serverName}
onChange={(e) => setServerName(e.target.value)}
- placeholder="Server name"
+ placeholder={t("tokensServerNamePlaceholder")}
required
className="px-3 py-2 rounded-lg bg-background border border-border text-sm focus:outline-none focus:ring-1 focus:ring-violet-500"
/>
@@ -487,7 +493,7 @@ export default function TokensPage() {
type="password"
value={serverApiKey}
onChange={(e) => setServerApiKey(e.target.value)}
- placeholder="API key"
+ placeholder={t("tokensApiKeyPlaceholder")}
required
className="px-3 py-2 rounded-lg bg-background border border-border text-sm focus:outline-none focus:ring-1 focus:ring-violet-500"
/>
diff --git a/src/app/(dashboard)/dashboard/usage/components/BudgetTab.tsx b/src/app/(dashboard)/dashboard/usage/components/BudgetTab.tsx
index 50e5d3c846..6bdee487e0 100644
--- a/src/app/(dashboard)/dashboard/usage/components/BudgetTab.tsx
+++ b/src/app/(dashboard)/dashboard/usage/components/BudgetTab.tsx
@@ -611,7 +611,7 @@ export default function BudgetTab() {
</div>
{visibleRows.length === 0 ? (
- <div className="py-10 text-center text-text-muted text-sm">No keys match filters</div>
+ <div className="py-10 text-center text-text-muted text-sm">{t("budgetNoKeysMatch")}</div>
) : (
visibleRows.map((row, idx) => (
<BudgetRow
@@ -856,16 +856,16 @@ function BudgetRowExpanded({
<h4 className="text-[11px] uppercase tracking-wide font-bold text-text-muted">
Projection
</h4>
- <span className="text-[10px] text-text-muted">linear extrapolation</span>
+ <span className="text-[10px] text-text-muted">{t("budgetLinearExtrapolation")}</span>
</div>
<div className="flex items-baseline gap-3">
<div>
- <div className="text-[10px] text-text-muted">This month so far</div>
+ <div className="text-[10px] text-text-muted">{t("budgetThisMonthSoFar")}</div>
<div className="text-lg font-bold tabular-nums">{formatCurrency(month)}</div>
</div>
<span className="text-text-muted">→</span>
<div>
- <div className="text-[10px] text-text-muted">Projected end of month</div>
+ <div className="text-[10px] text-text-muted">{t("budgetProjectedEndOfMonth")}</div>
<div
className={`text-lg font-bold tabular-nums ${
projectionOver ? "text-amber-400" : "text-emerald-400"
@@ -885,10 +885,12 @@ function BudgetRowExpanded({
<h4 className="text-[11px] uppercase tracking-wide font-bold text-text-muted">
Cost breakdown (30d)
</h4>
- <span className="text-[10px] text-text-muted">by provider</span>
+ <span className="text-[10px] text-text-muted">{t("budgetByProvider")}</span>
</div>
{breakdown === undefined ? (
- <div className="text-[11px] text-text-muted py-2 animate-pulse">Loading…</div>
+ <div className="text-[11px] text-text-muted py-2 animate-pulse">
+ {t("budgetLoading")}
+ </div>
) : breakdown.length === 0 ? (
<div className="text-[11px] text-text-muted py-2">No spend in last 30 days</div>
) : (
@@ -921,7 +923,7 @@ function BudgetRowExpanded({
</h4>
<div className="grid grid-cols-1 md:grid-cols-4 gap-3 mb-3">
<Input
- label="Daily $"
+ label={t("budgetDailyDollar")}
type="number"
step="0.01"
min="0"
@@ -930,7 +932,7 @@ function BudgetRowExpanded({
onChange={(e) => setForm({ ...form, dailyLimitUsd: e.target.value })}
/>
<Input
- label="Weekly $"
+ label={t("budgetWeeklyDollar")}
type="number"
step="0.01"
min="0"
@@ -939,7 +941,7 @@ function BudgetRowExpanded({
onChange={(e) => setForm({ ...form, weeklyLimitUsd: e.target.value })}
/>
<Input
- label="Monthly $"
+ label={t("budgetMonthlyDollar")}
type="number"
step="0.01"
min="0"
@@ -948,7 +950,7 @@ function BudgetRowExpanded({
onChange={(e) => setForm({ ...form, monthlyLimitUsd: e.target.value })}
/>
<Input
- label="Warn at %"
+ label={t("budgetWarnAtPct")}
type="number"
min="1"
max="100"
diff --git a/src/i18n/messages/en.json b/src/i18n/messages/en.json
index 20ce53e7a0..df07a07ec1 100644
--- a/src/i18n/messages/en.json
+++ b/src/i18n/messages/en.json
@@ -663,7 +663,23 @@
"noAnomaliesDetected": "No anomalies detected",
"apiKey": "API Key",
"xpLastHour": "XP (1h)",
- "zScore": "Z-Score"
+ "zScore": "Z-Score",
+ "tokensCommunityServers": "Community Servers",
+ "tokensServerNamePlaceholder": "Server name",
+ "tokensApiKeyPlaceholder": "API key",
+ "tokensTokenBalance": "Token Balance",
+ "tokensSendTokens": "Send Tokens",
+ "tokensRecipientApiKeyId": "Recipient API Key ID",
+ "tokensRecipientApiKeyIdPlaceholder": "Enter recipient API key ID",
+ "tokensReasonOptional": "Reason (optional)",
+ "tokensReasonPlaceholder": "e.g. bonus, reward",
+ "tokensTransactionHistory": "Transaction History",
+ "tokensNoTransactionsYet": "No transactions yet",
+ "tokensInviteCodes": "Invite Codes",
+ "tokensMaxUses": "Max Uses",
+ "tokensRedeemCode": "Redeem Code",
+ "tokensRedeemCodePlaceholder": "Enter invite code",
+ "tokensYourActiveInvites": "Your Active Invites"
},
"sidebar": {
"home": "Home",
@@ -1135,7 +1151,33 @@
"autoRoutingExplorationRate": "Exploration Rate",
"autoRoutingLkgpHitRate": "LKGP Hit Rate",
"autoRoutingRequestsByVariant": "Requests by Variant",
- "autoRoutingTopRoutedProviders": "Top Routed Providers"
+ "autoRoutingTopRoutedProviders": "Top Routed Providers",
+ "comboHealthWorstQuotaLeft": "Worst quota left",
+ "comboHealthUsageSkew": "Usage skew",
+ "comboHealthSuccessRate": "Success rate",
+ "comboHealthQuotaHealth": "Quota health",
+ "comboHealthRequests": "Requests",
+ "comboHealthTokens": "Tokens",
+ "comboHealthAvgLatency": "Avg latency",
+ "comboHealthTotalRequests": "Total requests",
+ "comboHealthExecutionTargets": "Execution targets",
+ "comboHealthSuccess": "Success",
+ "comboHealthLatency": "Latency",
+ "comboHealthQuota": "Quota",
+ "comboHealthTitle": "Combo health",
+ "comboHealthUnableToLoad": "Unable to load combo health",
+ "comboHealthGettingStarted": "Getting started",
+ "compressionAnalyticsTotalRequests": "Total Requests",
+ "compressionAnalyticsTokensSaved": "Tokens Saved",
+ "compressionAnalyticsAvgSavings": "Avg Savings",
+ "compressionAnalyticsAvgDuration": "Avg Duration",
+ "compressionAnalyticsReceipts": "Receipts",
+ "compressionAnalyticsFallbacks": "Fallbacks",
+ "compressionAnalyticsPromptTokens": "Prompt tokens",
+ "compressionAnalyticsCompletionTokens": "Completion tokens",
+ "compressionAnalyticsTotalTokens": "Total tokens",
+ "compressionAnalyticsCacheTokens": "Cache tokens",
+ "compressionAnalyticsNoDataYet": "No compression data yet"
},
"apiManager": {
"title": "API Keys",
@@ -2152,7 +2194,8 @@
"agentFeaturesContextLengthPlaceholder": "e.g. 128000",
"agentFeaturesContextLengthHint": "Defines the context window for this combo in /v1/models.",
"agentFeaturesContextLengthErrorInteger": "Context length must be a valid integer",
- "agentFeaturesContextLengthErrorRange": "Context length must be between 1000 and 2000000"
+ "agentFeaturesContextLengthErrorRange": "Context length must be between 1000 and 2000000",
+ "compressionOverride": "Compression Override"
},
"costs": {
"title": "Costs",
@@ -2702,7 +2745,13 @@
"learnedFromHeaders": "Learned from headers",
"remainingOfLimit": "{remaining}/{limit} remaining",
"throttleStatus": "Throttle: {value}",
- "lastHeaderUpdate": "Header update: {age}"
+ "lastHeaderUpdate": "Header update: {age}",
+ "databaseHealth": "Database Health",
+ "stickyBoundSessions": "Sticky-bound sessions",
+ "sessionsByApiKey": "Sessions by API key",
+ "noActiveSessionsTracked": "No active sessions tracked yet.",
+ "noSessionQuotaMonitorsActive": "No session quota monitors active.",
+ "gracefulDegradationStatus": "Graceful Degradation Status"
},
"telemetry": {
"title": "System Telemetry",
@@ -4351,7 +4400,28 @@
"resilienceResetTimeoutLabel": "Reset timeout",
"visionBridgeModelPlaceholder": "openai/gpt-4o-mini",
"visionBridgePromptPlaceholder": "Describe this image concisely.",
- "resilienceProviderBreakerTitle": "Circuit Breaker per Provider"
+ "resilienceProviderBreakerTitle": "Circuit Breaker per Provider",
+ "storageDatabaseBackupRetention": "Database backup retention",
+ "storagePurgeData": "Purge Data",
+ "retentionQuotaSnapshots": "Quota Snapshots (days)",
+ "retentionMcpAudit": "MCP Audit (days)",
+ "retentionA2aEvents": "A2A Events (days)",
+ "retentionCallLogs": "Call Logs (days)",
+ "retentionUsageHistory": "Usage History (days)",
+ "retentionMemoryEntries": "Memory Entries (days)",
+ "storageAutoVacuumMode": "Auto Vacuum Mode",
+ "storageScheduledVacuum": "Scheduled Vacuum",
+ "storageVacuumHour": "Vacuum Hour (0-23)",
+ "storagePageSize": "Page Size (bytes)",
+ "storageDatabaseSize": "Database Size",
+ "storagePageCount": "Page Count",
+ "storageFreelistCount": "Freelist Count",
+ "storageLastVacuum": "Last Vacuum",
+ "storageLastOptimization": "Last Optimization",
+ "storageIntegrityCheck": "Integrity Check",
+ "storageIntegrityOk": "✓ OK",
+ "storageIntegrityError": "✗ Error",
+ "storageUsageTokenBuffer": "Usage Token Buffer"
},
"contextRtk": {
"title": "RTK Engine",
@@ -4979,7 +5049,17 @@
"budgetSortNameAZ": "Sort: Name (A–Z)",
"budgetColDailyLim": "Daily lim",
"budgetColMonthlyLim": "Monthly lim",
- "budgetColUsedPct": "Used %"
+ "budgetColUsedPct": "Used %",
+ "budgetLoading": "Loading…",
+ "budgetNoKeysMatch": "No keys match filters",
+ "budgetLinearExtrapolation": "linear extrapolation",
+ "budgetThisMonthSoFar": "This month so far",
+ "budgetProjectedEndOfMonth": "Projected end of month",
+ "budgetByProvider": "by provider",
+ "budgetDailyDollar": "Daily $",
+ "budgetWeeklyDollar": "Weekly $",
+ "budgetMonthlyDollar": "Monthly $",
+ "budgetWarnAtPct": "Warn at %"
},
"modals": {
"waitingAuth": "Waiting for Authorization",
@@ -5571,7 +5651,10 @@
"statusWaitingApproval": "Waiting Approval",
"statusCompleted": "Completed",
"statusFailed": "Failed",
- "statusCancelled": "Cancelled"
+ "statusCancelled": "Cancelled",
+ "repositoryName": "Repository name",
+ "repositoryUrl": "Repository URL",
+ "branch": "Branch"
},
"templateNames": {
"simple-chat": "Simple Chat",