feat(locales): add french locale, fix missing error keys, remove dead keys

Adds french locale registration and translation file. Fixes 4 missing error keys that were referenced in code but absent from all locale files. Removes 2 unreferenced keys from `register.validation` that duplicated `registerPasskey.errors`.

I *think* that's all that's needed for french locale? Couldn't find anything else required to make it work!
This commit is contained in:
karitham.dev
2026-05-20 22:20:20 +03:00
committed by Tangled
parent 9ebde27540
commit a3bd7c59ad
4 changed files with 1224 additions and 3 deletions
+3 -1
View File
@@ -2,7 +2,7 @@ import { _, getLocaleFromNavigator, init, locale, register } from "svelte-i18n";
const LOCALE_STORAGE_KEY = "tranquil-pds-locale";
const SUPPORTED_LOCALES = ["en", "zh", "ja", "ko", "sv", "fi"] as const;
const SUPPORTED_LOCALES = ["en", "zh", "ja", "ko", "sv", "fi", "fr"] as const;
export type SupportedLocale = typeof SUPPORTED_LOCALES[number];
export const localeNames: Record<SupportedLocale, string> = {
@@ -12,6 +12,7 @@ export const localeNames: Record<SupportedLocale, string> = {
ko: "한국어",
sv: "Svenska",
fi: "Suomi",
fr: "Français",
};
register("en", () => import("../locales/en.json"));
@@ -20,6 +21,7 @@ register("ja", () => import("../locales/ja.json"));
register("ko", () => import("../locales/ko.json"));
register("sv", () => import("../locales/sv.json"));
register("fi", () => import("../locales/fi.json"));
register("fr", () => import("../locales/fr.json"));
function getInitialLocale(): string {
const stored = localStorage.getItem(LOCALE_STORAGE_KEY);
+5 -1
View File
@@ -359,6 +359,7 @@
"passwordRemoved": "Password removed. Your account is now passkey-only.",
"failedToRemovePassword": "Failed to remove password",
"failedToLoadTotpStatus": "Failed to load TOTP status",
"failedToRegenerateBackupCodes": "Failed to regenerate backup codes",
"totpEnabledSuccess": "Two-factor authentication enabled successfully",
"totpDisabledSuccess": "Two-factor authentication disabled",
"backupCodesCopied": "Backup codes copied to clipboard",
@@ -490,6 +491,8 @@
"invitesEnabled": "User invites enabled",
"invitesDisabled": "User invites disabled",
"userDeleted": "User account deleted",
"failedToDeleteAccount": "Failed to delete account",
"failedToSaveConfig": "Failed to save server configuration",
"failedToLoadConfig": "Failed to load server configuration",
"signalIntegration": "Signal",
"signalLinked": "Linked",
@@ -597,7 +600,8 @@
},
"error": {
"title": "Authorization failed",
"tryAgain": "Retry"
"tryAgain": "Retry",
"genericError": "An unexpected error occurred"
}
},
"sso_register": {
File diff suppressed because it is too large Load Diff