-
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
Reopen #1999: Can't resolve the locale #2097
Comments
The redirection logic introduced in #2005 seems to exist https://github.com/ipfs/ipfs-webui/blob/main/src/i18n.js#L42. I am wondering if #2092 caused a regression. |
FYI that I added some tests for i18n, and have a proper test case that is failing to prove this bug. working on fix now. edit: failing testcase: https://github.com/ipfs/ipfs-webui/actions/runs/4248889633/jobs/7388520133#step:7:351 |
I can repro the failure when loading via IPFS url at the above CID is for a local build I did: > npm run build
...
> ipfs add --cid-version 1 -Q -r ./build
bafybeidxhsjdowd3kgekefq3ezpcektrq7i2i4dnbrrioiwftvksz4oof4 looking into modifying the i18n-http-backend |
@gnh1201 Can you confirm that things are working properly with the build from the PR build ? Things are loading properly for me, with no misses on locale fetches any longer. PR: #2102 why the fleek CID and github CI's CID are different are unknown to me. probably because fleek is bundling up more than just the build dir? |
* test: test i18n languages and fallbacks * test(i18n): use available port * chore: add all local files for ko-KR english has 8 locale files: `ls -lhatr public/locales/en/*.json | wc -l # 8` before this change, ko-KR only had 4 `ls -lhatr public/locales/ko-KR/*.json | wc -l # 4` so I copied them over using `cp -n public/locales/en/*.json public/locales/ko-KR/` after this change `ls -lhatr public/locales/ko-KR/*.json | wc -l # 8` * chore(i18n): ensure app:actions.add has ko translation * fix: only send i18n requests for current language Sends only a single request for lang via i18n-http-backend see i18next/i18next-http-backend#61 * fix: current language displays correctly for fallbacks * test(lib/i18n): test getLanguage function * test(lib/i18n): add getCurrentLanguage test * test(i18n): add test for naming languages in languages.json * fix(i18n): add parser for getting valid locale codes * fix(lib/i18n): use i18n-localeParser * fix(i18n): prevent the lookup of invalid locales fixes #2097 * test(e2e:settings): test language selector * test(e2e/settings): validate that language files are requested * chore: remove untranslated ko-KR files
Describe the bug
Can't resolve the locale (Korean, ko, ko-KR), like #1999
To Reproduce
If I trying connect the IPFS webui on my computer (with ko-KR locale), it tries to access the wrong address.
Expected behavior
It connect to the locale
ko-KR
./ipfs/[BAFYHASH]/locales/ko-KR/[FILENAME].json
Actual behavior
It connect to the locale
ko
(it does not exist)./ipfs/[BAFYHASH]/locales/ko/[FILENAME].json
As a result, I got this error:
the
ko
and theko-KR
are the same code. It need a proper redirection.The text was updated successfully, but these errors were encountered: