-
Notifications
You must be signed in to change notification settings - Fork 490
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
feat(i18n): cache locale files #1658
Conversation
This adds i18next-localstorage-backend which caches fetched translation files in window.localStorage for a week.
Will this introduce a need to repeatedly clear caches when hacking on text in master |
Good catch! Fixed in 09ba001 – disabled cache when developer server provided by |
@@ -121,7 +123,7 @@ | |||
"go-ipfs": "0.6.0", | |||
"http-proxy": "^1.18.1", | |||
"http-server": "^0.12.3", | |||
"ipfs": "^0.48.1", | |||
"ipfs": "0.50.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this intended in this PR? Just want to make sure we test everything so we don't problems from upgrading ipfs :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! js-ipfs is used only in e2e tests.
Not related to this PR, but I noticed we were not using hard-coded version so fixed it and bumped to the latest version to ensure we are green with the latest version.
Don't forget to update ipld-explorer-components translation array to match the one on this PR 😄 |
@rafaelramalho19 added it to ipfs/ipld-explorer-components#281 👌 |
This adds
i18next-localstorage-backend
which caches fetched translation files inwindow.localStorage
for a week, which removes the need for seven requests for.json
files.ps. I also discovered that https://webui.ipfs.io/?lng=zh-CN works, so added it to README ;-)