-
Notifications
You must be signed in to change notification settings - Fork 990
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
Migration from webL10n to i18next #4459
base: master
Are you sure you want to change the base?
Conversation
❌ Some Jest tests failed. Please check the logs and fix the issues before merging. Failed Tests:
|
I am not sure why you changed the _() function to t(). It is quite an invasive and seemingly unnecessary change. |
@walterbender I switched from |
@walterbender If you were referring to encoding issues in es.po (if I assumed that correctly), I ran a thorough check on the PO files, including es.po, and didn't find any encoding issues using a custom script that detects unescaped quotes and encoding errors. The only issues found were in other files, like ayc.po, quz.po, and te.po, where unescaped double quotes were present. |
I think keeping the _() wrapper is a good idea. |
look t your es.json file and you'll see that it is no longer utf-8. It is some weird encoding. "Are you sure you want to clear the workspace?": "¿Estás segura de que quieres borrar el espacio de trabajo?", Should be: "Are you sure you want to clear the workspace?": "¿Estás segura de que quieres borrar el espacio de trabajo?"", |
❌ Some Jest tests failed. Please check the logs and fix the issues before merging. Failed Tests:
|
Not sure what you are doing to fix the encodings, but it is not correct. There should not be any strings with "Â" in them. It is not a glyph used in Spanish. |
❌ Some Jest tests failed. Please check the logs and fix the issues before merging. Failed Tests:
|
@walterbender Could you please let me know the encoding format used in the PO files? This will help me improve the Python script for conversion and avoid similar issues in the future. |
Everything should be utf-8 |
@ac-mmi I saw many tests failures please try to resolve those along with the PR only. |
@walterbender do we really need this change currently as I don't feel so |
@walterbender do we really need this change currently as I don't feel so currently |
It needs work. |
✅ All Jest tests passed! This PR is ready to merge. |
@walterbender i have made changes in the _() functionality catering to i18next functions and also passing the test suits of the repo |
ES is still broken. Now all of the non-ASCII characters are just missing. |
✅ All Jest tests passed! This PR is ready to merge. |
@walterbender For language detection, we could detect user's browser or system language as a default. |
@walterbender I have successfully migrated the internationalization system in Music Blocks from webL10n to i18next. I have tested the implementation, and it is working as expected. The only remaining task is to update the test suites, which are currently tailored for webL10n, to support the new i18next standards.
I made the following changes:
loader.js
: Added i18next initialization with i18nextHttpBackend to load translations from JSON files stored in the locales folder. This change allows the application to switch languages dynamically.activity.js,block.js,blocks.js,ActionBlocks.js,BooleanBlocks.js
and more...)locales
containing converted PO files into JSON format, supporting i18next's structure for managing translations.