fix(i18n): Invalidate cache to fix placeholder translations
All checks were successful
BotUI CI / build (push) Successful in 2m55s
All checks were successful
BotUI CI / build (push) Successful in 2m55s
- Increment CACHE_VERSION from v1 to v2 - Forces all users to fetch fresh translations from API - Fixes issue where old cache with placeholders was overriding correct HTML - Browser cache had stale translations from before i18n embed fix Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
8732738622
commit
4f654dd95d
1 changed files with 2 additions and 1 deletions
|
|
@ -3,11 +3,12 @@
|
||||||
|
|
||||||
const DEFAULT_LOCALE = "en";
|
const DEFAULT_LOCALE = "en";
|
||||||
const STORAGE_KEY = "gb-locale";
|
const STORAGE_KEY = "gb-locale";
|
||||||
const CACHE_VERSION = "v1";
|
const CACHE_VERSION = "v2";
|
||||||
const CACHE_TTL_MS = 3600000;
|
const CACHE_TTL_MS = 3600000;
|
||||||
|
|
||||||
// IMPORTANT: Increment CACHE_VERSION when translation structure changes
|
// IMPORTANT: Increment CACHE_VERSION when translation structure changes
|
||||||
// to invalidate all user caches and force fresh API fetches
|
// to invalidate all user caches and force fresh API fetches
|
||||||
|
// v2: Invalidated cache to fix placeholder translations after i18n embed fix
|
||||||
|
|
||||||
const MINIMAL_FALLBACK = {
|
const MINIMAL_FALLBACK = {
|
||||||
"label-loading": "Loading...",
|
"label-loading": "Loading...",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue