fix(settings): the offline language mirror does not outlive the account (#2146)

The mirror of the account language stayed in localStorage past logout, so the next account on the device booted in the previous user's language forever. It is cleared on logout and rewritten on login, and the rate-limit message follows the same order the boot language does.
This commit is contained in:
Maurice
2026-09-02 19:00:49 +02:00
committed by Maurice
parent 7c857173cf
commit a5d87d295a
5 changed files with 83 additions and 6 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ const RATE_LIMIT_MESSAGES: Record<string, string> = {
function translateRateLimit(): string {
const fallback = RATE_LIMIT_MESSAGES['en']!
try {
const lang = localStorage.getItem('app_language') || 'en'
const lang = localStorage.getItem('app_language') || localStorage.getItem('app_language_server') || 'en'
return RATE_LIMIT_MESSAGES[lang] ?? fallback
} catch {
return fallback