fix(webui): localize update check copy

This commit is contained in:
chengyongru
2026-06-14 17:59:31 +08:00
committed by Xubin Ren
parent 1b17aa1632
commit b226a95588
11 changed files with 85 additions and 1 deletions
+9
View File
@@ -52,6 +52,7 @@ const LOCALIZED_SETTINGS_COPY_KEYS = [
"settings.sections.webuiSafety",
"settings.sections.capabilities",
"settings.sections.apps",
"settings.sections.about",
"settings.rows.theme",
"settings.rows.language",
"settings.rows.density",
@@ -87,6 +88,10 @@ const LOCALIZED_SETTINGS_COPY_KEYS = [
"settings.status.upToDate",
"settings.actions.save",
"settings.actions.saving",
"settings.about.checking",
"settings.about.checkForUpdates",
"settings.about.upToDate",
"settings.about.updateAvailable",
];
function isRecord(value: unknown): value is Record<string, unknown> {
return !!value && typeof value === "object" && !Array.isArray(value);
@@ -230,6 +235,7 @@ describe("webui i18n", () => {
for (const key of SETTINGS_NAV_KEYS) {
expect(common.settings.nav[key as keyof typeof common.settings.nav]).toBeTruthy();
}
expect(common.settings.sections.about).toBeTruthy();
expect(common.settings.rows.theme).toBeTruthy();
expect(common.settings.status.loading).toBeTruthy();
expect(common.settings.actions.save).toBeTruthy();
@@ -241,6 +247,9 @@ describe("webui i18n", () => {
expect(common.settings.byok.showApiKey).toBeTruthy();
expect(common.settings.byok.hideApiKey).toBeTruthy();
expect(common.settings.byok.configuredKeyHint).toBeTruthy();
expect(common.settings.about.version).toBeTruthy();
expect(common.settings.about.checkForUpdates).toBeTruthy();
expect(common.settings.about.updateAvailable).toContain("{{version}}");
}
});