-
Notifications
You must be signed in to change notification settings - Fork 23
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 atlas support for cookiecutter-django-ida - FC-0012 #409
feat: add atlas support for cookiecutter-django-ida - FC-0012 #409
Conversation
Update cookiecutter-django-ida to support atlas for all new IDA. Doing that behind a feature flag until it's fully implemented Refs: FC-0012 OEP-58
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. |
please review @OmarIthawi @brian-smith-tcril |
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's not clear to me why all non-english languages have been removed here. On the xblock cookiecutter most are commented out but some non-english languages are still in the config. https://github.com/openedx/edx-cookiecutters/blob/master/cookiecutter-xblock/%7B%7Bcookiecutter.repo_name%7D%7D/%7B%7Bcookiecutter.package_name%7D%7D/conf/locale/config.yaml
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.
Good point Brian. That requires some clarification to get it right.
@shadinaif did we try to remove the config.yaml
file? Will the po-file compile
, extract
still work fine?
We know that atlas pull
doesn't need config.yaml
. But what about i18n_tool generate
and i18n_tool extract --no-segment
would any of those rely on the locales:
list that is being modified?
The xblock
cookie-cutter doesn't seem to be needing config.yaml
though.
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.
I believe we should remove those in xblock cookiecutter too. These are templates for new packages. They should contain only English (and maybe dummy for tests). If the developer needs more languages to be used outside atlas, then she must add them manually. But the default is that we're using Atlas which needs only English
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.
Sounds good to me.
Hey @shadinaif, would you mind putting FC-0012 in the PR title when you get a minute? |
@shadinaif Thanks for updating the PR title. Is there anything left for you to do here right now? Or are you just waiting for final approval from @brian-smith-tcril and @OmarIthawi? |
Thank you @itsjeyd , it's ready for final approvals |
Thanks for the ping @itsjeyd, I'll review this again and let you know. |
Sounds good, thanks for the update @shadinaif and @OmarIthawi! |
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.
OPENEDX_ATLAS_PULL=yes make pull_translations
works pretty well.
I think this is ready to merge. Thanks @shadinaif!
@dianakhuang you are marked as "Please inform" for this repo on the spreadsheet. I plan on merging this by EOD tomorrow, please let me know if there is a reason I should hold off. |
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.
Did a quick review as well, and I think this looks good to me.
@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. |
Update cookiecutter-django-ida to support atlas for all new IDA. Doing that behind a feature flag until it's fully implemented
This PR prepares the repository to comply with openedx-translations by doing the following:
Only for
cookiecutter-django-ida
:i18_tool extract
to extract transactionsOPENEDX_ATLAS_PULL
flagHow it was tested?
cookiecutter -o testdir cookiecutter-django-ida
credentials
, because we need to testmake pull_translations
which requires a supported repo namemake upgrade
make requirements
make extract_translations
: everything looks finepython manage.py makemigrations && make validate
: no errorsmake pull_translations
: works fine, we seetx
commandsOPENEDX_ATLAS_PULL=yes make pull_translations
: works fine, we see atlas commands, and other translations being removedmake validate
again: no errorsReferences
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 notice 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