-
Notifications
You must be signed in to change notification settings - Fork 16
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: Add gettext for JS translation #70
feat: Add gettext for JS translation #70
Conversation
Thanks for the pull request, @shadinaif! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
@shadinaif what's the status of this PR? Do we still need this fix after the recent work you've done? |
Hi @shadinaif and @OmarIthawi - just checking to see if this can be closed? |
@shadinaif I think we should add the following note to the PR description:
Is this a follow up to the PR below? |
It seems to be pending work that we forgot to follow up on. |
503724b
to
33d3014
Compare
33d3014
to
0372561
Compare
@@ -78,10 +78,10 @@ def get_version(file_path): | |||
license='AGPL 3.0', | |||
entry_points={ | |||
'xblock.v1': [ | |||
'recommender = recommender:RecommenderXBlock', | |||
'recommender = recommender.recommender:RecommenderXBlock', |
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.
because we're not importing RecommenderXBlock
in __init__.py
@OmarIthawi, @brian-smith-tcril please review. This one is ready |
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.
sorry, this is an old review that I haven't posted it.
Makefile
Outdated
@@ -31,3 +32,7 @@ extract_translations: ## extract strings to be translated, outputting .po files | |||
fi |
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.
@shadinaif now the i18n-tools==1.2.0
package has been released. Would you mind using it here?
I suppose this XBlock won't use the --merge-po-files
option, right?
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.
it will use the option @OmarIthawi , but this goes into another PR
- Upgrade requirements
- Use new options
--no-segment --merge-po-files
- Remove
django.po
and thetext.po
symlink
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.
A minor change before this is ready to go.
43374da
to
95fdb79
Compare
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.
Thanks @shadinaif! Please test it on the openedx-translations
repo and it's should be ready to get merged.
95fdb79
to
b6827a1
Compare
all good @OmarIthawi , please take a final look |
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.
Thanks @shadinaif!! Looks great!
@OmarIthawi I see that you recommended |
I see that |
Good question @brian-smith-tcril . Here's why I recommended
Please let me know what's your thoughts. I'm okay with reverting back to I'll copy this comment into openedx/edx-cookiecutters#382. |
For consistency with the naming decided on in openedx/edx-cookiecutters#382 (comment), we should rename |
JS translations will not be shown fetched without directing (gettext) to the correct javascript file Refs: FC-0012 OEP-58
b6827a1
to
dc013ff
Compare
Thank you @brian-smith-tcril , Done |
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.
This looks great!
# edx-sphinx-theme is not compatible with latest Sphinx==6.0.0 version | ||
# Pinning Sphinx version unless the compatibility issue gets resolved | ||
# For details, see issue https://github.com/openedx/edx-sphinx-theme/issues/197 | ||
sphinx<6.0.0 |
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.
This stood out to me when I was looking through this PR so I'm leaving a comment to provide context
- This is the only mention of
sphinx
in this repo https://github.com/search?q=repo%3Aopenedx%2FRecommenderXBlock%20sphinx&type=code edx-sphinx-theme
is deprecated [DEPR]: edx-sphinx-theme public-engineering#200- latest
sphinx
on pypi as of writing is7.2.6
https://pypi.org/project/Sphinx/
Removing this is definitely the right call.
@shadinaif 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
feat: Add
gettext
for JS translationJS translations will not be fetched without directing
gettext
to the correct javascript fileopenedx-translation
fork. https://github.com/Zeit-Labs/openedx-translations/pull/76/files#r1351711701References
This pull request is part of the FC-0012 project which is sparked by the Translation Infrastructure update OEP-58.
Check the links above for full information about the overall project.
Internalization is being rearchitected in Open edX Python, XBlock, Micro-frontend, and other projects. There are a number of immediately visible changes:
.json
,.po
or.mo
files will be committed into the repos.make extract_translations
in all repositoriesBreaking Changes
One of the primary goals of the project is to avoid breaking changes. If you noticed any suspicious code, please raise your concern. But before that, please know the strategy we're following to avoid breaking changes
For XBlocks:
conf/locale
. Therefore, we are creating a link fromconf/locale
totranslations
so Atlas can find the path without disrupting the current way of having translations locally within the XBlocks