Commit 53f4b418 by johnespinosa Committed by John Espinosa

Fixed i18n Problem with xBlock Menu

Addressed bug in the following issue:
https://openedx.atlassian.net/browse/TNL-1296?filter=12810

There were strings that were not i18n in the xblock problem menu. The fix I made seems a little hacky. The yaml files controlled what the titles ended up being in menu. Since yaml has no i18n capabilities, and since mako does not allow for hashtables (unless they are introduced from the function/class that renders them) the commit I made was the best solution I could think of. If you know how to introduce i18n strings into yaml files or where this file is being rendered so I can pass in a hashtable that would be great! More discussion/information on this issue can be found in the issue thread linked above.

Observe bad behavior:
1. Load Studio.
2. Log in as staff@example.com.
3. Click "Content" and go to "Outline" in the dropdown.
4. In Example Week 1 click on "Homework."
5. Click on any question from the dropdown.
6. Click on "Problem."
7. Clicking on both "Common Problem Types" and "Advanced," notice how some options are not i18n.

~Please keep this webpage open after viewing the bad results~

View Correction:
1. Put my code into your edx-platform folder.
2. Kill the studio process.
3. While logged in as edxapp enter the following into your commandline:
paver i18n_extract && paver i18n_dummy && paver i18n_generate && paver devstack studio
4. Reload the studio page and notice how the strings are in the correct i18n format.

Fixed i18n Problem with xBlock Menu

Addressed bug in the following issue:
https://openedx.atlassian.net/browse/TNL-1296?filter=12810

There were strings that were not i18n in the xblock problem menu. The fix I made seems a little hacky. The yaml files controlled what the titles ended up being in menu. Since yaml has no i18n capabilities, and since mako does not allow for hashtables (unless they are introduced from the function/class that renders them) the commit I made was the best solution I could think of. If you know how to introduce i18n strings into yaml files or where this file is being rendered so I can pass in a hashtable that would be great! More discussion/information on this issue can be found in the issue thread linked above.

Observe bad behavior:
1. Load Studio.
2. Log in as staff@example.com.
3. Click "Content" and go to "Outline" in the dropdown.
4. In Example Week 1 click on "Homework."
5. Click on any question from the dropdown.
6. Click on "Problem."
7. Clicking on both "Common Problem Types" and "Advanced," notice how some options are not i18n.

~Please keep this webpage open after viewing the bad results~

View Correction:
1. Put my code into your edx-platform folder.
2. Kill the studio process.
3. While logged in as edxapp enter the following into your commandline:
paver i18n_extract && paver i18n_dummy && paver i18n_generate && paver devstack studio
4. Reload the studio page and notice how the strings are in the correct i18n format.

Update add-xblock-component-menu-problem.underscore

Reverted File

Modified capa_base.py to make Blank Advanced Problem i18n
parent dad4b673
......@@ -94,7 +94,7 @@ class CapaFields(object):
scope=Scope.settings,
# it'd be nice to have a useful default but it screws up other things; so,
# use display_name_with_default for those
default="Blank Advanced Problem"
default=_("Blank Advanced Problem")
)
attempts = Integer(
help=_("Number of attempts taken by the student on this problem"),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment