Closed pomegranited closed 6 years ago
Can we change from render_template
to render_django_template
while we're at it? The former is deprecated since it's ambiguous in an XBlock context.
Sure thing @bradenmacdonald -- fixed with 87f384f
:+1: Thanks for updating the testing infrastructure!
Thanks @mtyaka ! I've re-added the "WIP" to the title so we don't forget to merge and tag https://github.com/edx/xblock-utils/pull/48 first.
Squashed a92a7be5ef0a38dd999ba991d5ac60dfbeaf9824...2bc51ca0235e91b38704670852f2d199cb2bdea4 into 59d7c6c9c260dfc61b67519e6c71e4c0dbb6da94 to make it cleaner to use this change on the client's fork.
Hi @pomegranited, should we wait for this to merge before bumping the version in requirements?
https://github.com/edx-solutions/edx-platform/blob/integration/requirements/edx/custom.txt#L6
Rebased 59d7c6c on master to resolve conflicts.
@naeem91 It's a bit confusing -- hard to manage this many open PRs and their dependencies!
When https://github.com/edx-solutions/edx-platform/pull/1032 merged to integration
, it used temporary branches named edx-solutions:MCKIN-7023-needs-i18n
to provide the i18n changes made in https://github.com/edx/xblock-utils/pull/48 and here.
Just now, I merged the latest master into
edx-solutions:MCKIN-7023-needs-i18n
, so that it includes the changes from this PR and https://github.com/edx-solutions/xblock-image-explorer/pull/38.
So to bump the version in integration
's requirements.txt
to include the changes for both these PRs now, you can use commit b7febc7a9a214cf4901c9cc864d4fdd56c4224d5.
CC @bradenmacdonald
@pomegranited sure. Thank you for taking care of this!
Redeployed the sandbox server, and ensured that template translations are showing as expected.
Merging now.
FYI @naeem91 -- I've submitted https://github.com/edx-solutions/edx-platform/pull/1073 to use this new version, so once that's merged we won't need to run off the temporary branch anymore.
Once the dependent PRs are merged, this change is all that's required to allow this XBlock to use its own translations for text found in HTML templates.
JIRA tickets: MCKIN-7023
Discussions: WL-230, YONK-879
Dependencies:
Screenshots:
Before these changes, the only text in Image Explorer HTML templates that would appear translated was the text that happened to be translated in edx-platform.
After this change, Image Explorer template translations like this one appear in Studio and LMS:
Sandbox URL: sandbox is being provisioned.
Merge deadline: None
Testing instructions:
"image-explorer"
to the Advanced Settings > Advanced Module List. Add an Image Explorer unit, e.g. Sandbox Image Explorer course./update_lang
appended, and submiteo
as your selected Language Code.trans
template tags are respected, and their strings appear translated.See the updated README and run_test.py for details on running the automated tests.
Reviewers