-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Migration from webL10n to i18next #4459
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
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. |
….js so that renderLanguageSelectIcon() works correctly
did you look at the quality report? it looks pretty nonsensical. |
@walterbender In the current report, I included:
|
The fields are correct. The data in the fields is not. |
@walterbender I'm flagging translations based on a combination of back-translation, lexical similarity with the original English, and spelling errors in the back-translation. For example:
Here, it’s a semantic match, but the lexical similarity is a bit low due to the word "Refresh" → "Update". |
@walterbender this is the new report |
This report is starting to make sense. Note that we may want to always flag anything that is ambiguous (and maybe it will help us improve the translator notes as well. For example, I noticed that "duck" was not flagged for review, but do we know if it is duck the noun or duck the verb? |
@walterbender for this "duck" situation i am going for POS tagging what do you say ? |
I don't think it is reasonable to tag every string in the code with POS. It is reasonable to expect decent translator hints. |
@walterbender I created a separate file,
Context file: en_translation_hints.json |
Is the separate file for the AI? The hints should be in the PO files. |
@walterbender but for i18next i am using |
I thought that we were going to use the PO framework for translators and i18next for the implementation. I assumed that the AI translation would show up in the PO files so that the translators can review them. |
@walterbender I initially converted all existing PO files into JSON(present in locales folder), and the AI-generated translations now work directly with JSON files. |
@walterbender in my ai translation code both .po and .json files are created |
@walterbender I have sent you the po file for catalan in the chat with the context included |
it is fine that the AI uses JSON and that you put the hints into JSON as long as the source of truth remains the POs -- since there is extensive PO file support in the translator community. |
@walterbender Also have you seen my proposal ,is there anything i am lacking or should research on ? |
I've gone through it multiple times. Time to submit it.
…On Sun, Apr 6, 2025 at 11:54 AM Aman Chadha(IVIXMMI) < ***@***.***> wrote:
@walterbender <https://github.com/walterbender> Also have you seen my
proposal ,is there anything i am lacking or should research on ?
—
Reply to this email directly, view it on GitHub
<#4459 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6PXYNJ736UDYYCBZCR67L2YFEZVAVCNFSM6AAAAABXX3ECWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBRGQ4DOMRUGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: ac-mmi]*ac-mmi* left a comment (sugarlabs/musicblocks#4459)
<#4459 (comment)>
@walterbender <https://github.com/walterbender> Also have you seen my
proposal ,is there anything i am lacking or should research on ?
—
Reply to this email directly, view it on GitHub
<#4459 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6PXYNJ736UDYYCBZCR67L2YFEZVAVCNFSM6AAAAABXX3ECWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBRGQ4DOMRUGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Walter Bender
Sugar Labs
https://www.sugarlabs.org
<http://www.sugarlabs.org>
|
@walterbender Thank you, I’ve submitted the proposal. |
@walterbender this is the updated context file Also the word 'in' in the translation refers to the Japanese scale ? |
Not sure how you are generating your context document. Ideally it would come directly from translator hints as they same context is needed by human translators. Yes, "in" is the name of a Japanese mode. Lots of strings are simply tagged "General UI String". Not sure the utility of that. |
@walterbender I just provided you with the basic outline of the context file. Yes, it does need human intervention. I’ve been generating the context using the GPT API, which is focused on giving basic context |
What are you basing the prompt(s) on? |
@walterbender I described the application then provided chunks of the JSON translation file to the GPT API. I asked it to generate context for each string based on the app’s purpose and usage. Since the translation file is large, I’m passing it in chunks to make the process manageable. |
This pull request has been open for more than 60 days without any activity. It will be closed in 3 days unless the |
Closed pull request due to inactivity for more than 63 days. |
@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.