-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Tsinghuax/lms i18n #433
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
Tsinghuax/lms i18n #433
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| { | ||
| "locales" : ["en", "es"], | ||
| "locales" : ["en", "zh_CN"], | ||
| "dummy-locale" : "fr" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| <%namespace name='static' file='static_content.html'/> | ||
| <%! from django.utils.translation import ugettext as _ %> | ||
|
|
||
| <%inherit file="main.html" /> | ||
|
|
||
|
|
@@ -7,7 +8,7 @@ | |
| <section class="basic_stats"> | ||
|
|
||
| <div class="edx_summary"> | ||
| <h2>edX-wide Summary</h2> | ||
| <h2>${_("{platform_name}-wide Summary").format(platform_name=settings.PLATFORM_NAME)}</h2> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @nedbat @chrisndodge: Should this be interpolating the platform name in first, to give the translators the full context of what's being translated (with a comment not to translate the platform name), or is this the right way to do this?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Normally, I would suggest doing it the way it is here. Give the translators the whole string, with slots. This lets users of the code change the platform name without having to re-translate strings. For some constructs, though, it might be difficult to translate well with a slot. For example, would other languages have a gender issue depending on the name of the platform? We might have better luck with "Site-wide Summary" than with "{platform_name}-wide Summary", for example. |
||
| <table style="margin-left:auto;margin-right:auto;width:50%"> | ||
| % for key in results["scalars"]: | ||
| <tr> | ||
|
|
||
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 seems odd to do all of the branding logic to just redirect back to
/. If it's no longer being used, I'd rather just rip all of the branding code out entirely.