From d9120c7b569ea4f43d9c9ea8117132b89b3b1fe5 Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Sat, 25 Apr 2026 20:56:43 -0300 Subject: [PATCH] fix(i18n): add missing dashboard message keys across locales Populate newly introduced dashboard and provider UI message keys in all locale bundles to prevent missing translation lookups after the v3.7.0 changes. Also fix quota reset handling so expired limits are only marked stale when usage is still pending, adjust combo form dark-mode backgrounds, and expand the prepublish hash rewrite to handle nested package paths. --- scripts/prepublish.ts | 4 +- src/app/(dashboard)/dashboard/combos/page.tsx | 12 +- .../usage/components/ProviderLimits/utils.tsx | 12 +- src/i18n/messages/ar.json | 1028 ++++++++++++++++- src/i18n/messages/bg.json | 1028 ++++++++++++++++- src/i18n/messages/cs.json | 1028 ++++++++++++++++- src/i18n/messages/da.json | 1028 ++++++++++++++++- src/i18n/messages/de.json | 1028 ++++++++++++++++- src/i18n/messages/en.json | 953 ++++++++++++++- src/i18n/messages/es.json | 1028 ++++++++++++++++- src/i18n/messages/fi.json | 1028 ++++++++++++++++- src/i18n/messages/fr.json | 1028 ++++++++++++++++- src/i18n/messages/he.json | 1028 ++++++++++++++++- src/i18n/messages/hi.json | 1028 ++++++++++++++++- src/i18n/messages/hu.json | 1028 ++++++++++++++++- src/i18n/messages/id.json | 1028 ++++++++++++++++- src/i18n/messages/it.json | 1028 ++++++++++++++++- src/i18n/messages/ja.json | 1028 ++++++++++++++++- src/i18n/messages/ko.json | 1026 +++++++++++++++- src/i18n/messages/ms.json | 1028 ++++++++++++++++- src/i18n/messages/nl.json | 1028 ++++++++++++++++- src/i18n/messages/no.json | 1028 ++++++++++++++++- src/i18n/messages/phi.json | 1028 ++++++++++++++++- src/i18n/messages/pl.json | 1028 ++++++++++++++++- src/i18n/messages/pt-BR.json | 726 +++++++++++- src/i18n/messages/pt.json | 1028 ++++++++++++++++- src/i18n/messages/ro.json | 1028 ++++++++++++++++- src/i18n/messages/ru.json | 1028 ++++++++++++++++- src/i18n/messages/sk.json | 1028 ++++++++++++++++- src/i18n/messages/sv.json | 1028 ++++++++++++++++- src/i18n/messages/th.json | 1028 ++++++++++++++++- src/i18n/messages/tr.json | 1028 ++++++++++++++++- src/i18n/messages/uk-UA.json | 1028 ++++++++++++++++- src/i18n/messages/vi.json | 1028 ++++++++++++++++- src/i18n/messages/zh-CN.json | 953 ++++++++++++++- 35 files changed, 31983 insertions(+), 487 deletions(-) diff --git a/scripts/prepublish.ts b/scripts/prepublish.ts index efc5dfdde2..37a398986b 100644 --- a/scripts/prepublish.ts +++ b/scripts/prepublish.ts @@ -255,7 +255,7 @@ if (sanitisedCount > 0) { // to ensure all require() calls use the real package names. { const serverOutput = join(APP_DIR, ".next", "server"); - const HASH_RE = /(['"\\])([a-z@][a-z0-9@./_-]+-[0-9a-f]{16})\1/g; + const HASH_RE = /(['"\\])([a-z@][a-z0-9@./_-]+?-[0-9a-f]{16}(?:\/[^'"\\]+)?)\1/g; let patchedFiles = 0; let patchedMatches = 0; const walkDir = (dir: string) => { @@ -277,7 +277,7 @@ if (sanitisedCount > 0) { const src = readFileSync(full, "utf8"); let count = 0; const patched = src.replace(HASH_RE, (_, q, name) => { - const base = name.replace(/-[0-9a-f]{16}$/, ""); + const base = name.replace(/-[0-9a-f]{16}(?=\/|$)/, ""); count++; return `${q}${base}${q}`; }); diff --git a/src/app/(dashboard)/dashboard/combos/page.tsx b/src/app/(dashboard)/dashboard/combos/page.tsx index f4774d4796..73a275e506 100644 --- a/src/app/(dashboard)/dashboard/combos/page.tsx +++ b/src/app/(dashboard)/dashboard/combos/page.tsx @@ -2801,7 +2801,7 @@ function ComboFormModal({ isOpen, combo, onClose, onSave, activeProviders, combo } className={`py-1.5 px-2 rounded-md text-xs font-medium transition-all ${ strategy === s.value - ? "bg-white dark:bg-bg-main shadow-sm text-primary" + ? "bg-white dark:bg-white/5 shadow-sm text-primary" : "text-text-muted hover:text-text-main" }`} > @@ -2913,7 +2913,7 @@ function ComboFormModal({ isOpen, combo, onClose, onSave, activeProviders, combo }} placeholder="provider/model" data-testid="combo-manual-model-input" - className="flex-1 text-xs py-2 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 font-mono" + className="flex-1 text-xs py-2 px-2 rounded border border-black/10 dark:border-white/10 bg-white dark:bg-white/5 text-text-main focus:border-primary focus:outline-none font-mono" />