-
Notifications
You must be signed in to change notification settings - Fork 58
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
Restructure i18n files #200
Conversation
Thank you for this PR @mahyard ! Please ping me when you're ready for review. |
Hi Mrs. Vogel,
for any language we want to have its translation, we just need to store 4 files. |
@mahyard It's fine to remove those files if they are not needed. I don't think translations ever worked correctly for this xblock. The [XBlock documentation|http://edx.readthedocs.io/projects/xblock-tutorial/en/latest/edx_platform/edx_lms.html#internationalization-support] says that translations should be present in the Please ping me when the PR is ready for review. |
Hi @mtyaka @pomegranited |
Thank you @mahyard! The changes look good. I had some problems getting the string from the underscore file translated until I realized I have to run Note though that using the The new i18n machinery for xblocks uses an i18n service, however the i18n service was only recently implemented for django translation template tags, and support for translating JS strings still hasn't landed in edx-platform. If you're interested in how that will work, you can check out the work-in-progress on the Drag and Drop v2 xblock: https://github.com/edx-solutions/xblock-drag-and-drop-v2/pull/156/files. Since the i18n does not yet support JS files, I am merging this PR as an intermediate solution, but we will want to switch to i18n service in the future. 👍
|
I thought that we had merged the JS i18n code onto the solutions fork, so we could be using that now, at least on that fork? |
@bradenmacdonald @mtyaka We merged zyegfryed/django-statici18n#41 to support JS i18n in XBlocks, but have only used it on DnDv2 so far (cf openedx/xblock-drag-and-drop-v2#156). |
@bradenmacdonald Did you copy-paste a wrong quote? I don't see how completable-by-viewing code is relevant :) @pomegranited Do we need to open a PR to update the version of |
Not required -- it only needs to be used by the XBlock when generating the JS files shipped with that xblock, and so doesn't require the platform to use the same version.
Nope, the changes are isolated to the XBlock itself. Namespacing protects the platform's JS from the XBlock's specific translations, and only just changes how the XBlock access its own translations. |
@pomegranited Oh excellent, thanks for the info! |
@mtyaka lol whoops. I've edited my comment. I meant to reply to "Since the i18n does not yet support JS files, I am merging this PR as an intermediate solution, but we will want to switch to i18n service in the future." |
Via this PR:
Some changes to README.md may be necessary.