Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cached translation files cause broken UI after releases #435

Open
arildm opened this issue Feb 20, 2025 · 0 comments
Open

Cached translation files cause broken UI after releases #435

arildm opened this issue Feb 20, 2025 · 0 comments

Comments

@arildm
Copy link
Member

arildm commented Feb 20, 2025

JS bundles are decorated with a content hash, so the browser fetches new code after a release, instead of reusing cached code. This is since #318. However, the locale files have permanent names (locale-swe.json etc) so the browser will reuse cached locale files. If the new relase has new or changed translation strings, they will not show correctly.

Locale files are referenced in code, not sure if we can get a Webpack-generated content hash in there.

const file = `translations/${pkg}-${lang}.json`

An alternative could be to include the locale files at build time.

I guess we should be able to dynamically import them, just like we do with Rickshaw and some other things, and then Webpack will sort out hashed filenames?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant