Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified conf/locale/eo/LC_MESSAGES/django.mo
Binary file not shown.
18 changes: 12 additions & 6 deletions conf/locale/eo/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1a\n"
"Report-Msgid-Bugs-To: openedx-translation@googlegroups.com\n"
"POT-Creation-Date: 2014-04-27 17:15-0400\n"
"PO-Revision-Date: 2014-04-27 21:15:36.951764\n"
"POT-Creation-Date: 2014-04-28 11:26-0400\n"
"PO-Revision-Date: 2014-04-28 15:26:13.087798\n"
"Last-Translator: \n"
"Language-Team: openedx-translation <openedx-translation@googlegroups.com>\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -1481,6 +1481,16 @@ msgstr ""
"À ÝöüTüßé ÛRL ör ä lïnk tö ä fïlé höstéd änýwhéré ön thé wéß. Ⱡ'σяєм ιρѕυм "
"∂σłσя#"

#. Translators: This is a type of file used for captioning in the video
#. player.
#: common/lib/xmodule/xmodule/video_module/video_xfields.py
msgid "SubRip (.srt) file"
msgstr "SüßRïp (.srt) fïlé Ⱡ'σ#"

#: common/lib/xmodule/xmodule/video_module/video_xfields.py
msgid "Text (.txt) file"
msgstr "Téxt (.txt) fïlé Ⱡ'σ#"

#: common/static/js/vendor/mathjax-MathJax-c9db6ac/docs/source/mjtheme/layout.html
msgid "Navigation"
msgstr "Nävïgätïön Ⱡ#"
Expand Down Expand Up @@ -6277,10 +6287,6 @@ msgstr "Döwnlöäd vïdéö Ⱡ'#"
msgid "Download transcript"
msgstr "Döwnlöäd tränsçrïpt Ⱡ'σя#"

#: lms/templates/video.html lms/templates/video.html
msgid "{file_format}"
msgstr "{file_format} Ⱡ'σя#"

#: lms/templates/video.html
msgid "Download Handout"
msgstr "Döwnlöäd Händöüt Ⱡ'σ#"
Expand Down
Binary file modified conf/locale/eo/LC_MESSAGES/djangojs.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions conf/locale/eo/LC_MESSAGES/djangojs.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1a\n"
"Report-Msgid-Bugs-To: openedx-translation@googlegroups.com\n"
"POT-Creation-Date: 2014-04-27 17:14-0400\n"
"PO-Revision-Date: 2014-04-27 21:15:37.413475\n"
"POT-Creation-Date: 2014-04-28 11:25-0400\n"
"PO-Revision-Date: 2014-04-28 15:26:13.632347\n"
"Last-Translator: \n"
"Language-Team: openedx-translation <openedx-translation@googlegroups.com>\n"
"MIME-Version: 1.0\n"
Expand Down
5 changes: 3 additions & 2 deletions lms/templates/video.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ <h3 class="hidden">${_('ERROR: No playable video sources found!')}</h3>
% else:
<li class="a11y-menu-item">
% endif
<a class="a11y-menu-item-link" href="#${item['value']}" title="${_(item['display_name'])}" data-value="${item['value']}">
${_(item['display_name'])}
<% dname = item['display_name'] %>
<a class="a11y-menu-item-link" href="#${item['value']}" title="${_(dname)}" data-value="${item['value']}">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mistake was here - defining _(item['display_name']) resulted in 'display_name' being scraped for translation, which caused obvious error 😓

So lesson learned: anything inside quotes will be scraped. So, to make sure the i18n and l10n works right here, we cannot put the dictionary lookup directly inside the _() call, instead we make it in one place and substitute it in.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, and it looks quite similar to original _('{file_format}'.format(file_format=item['display_name'])?
Thank you for update.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah it does. the problem with the original is, again, that we have to have the quotes in there, so '{file_format}' got scraped as a string. These cases are very tricky.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A-ha, so _('{}').format(item['display_name']) will also work?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you do this, then '{}' will appear in the translation file. I think it is a bad idea, to a translator seeing the string '{}' will be confusing and they very well may mis-translate it, add words, etc.

It is better to do

var = item['thing']
_(var)

because _(var) will look up the value of var in the translation file at runtime, but our static analysis scraper will not scrape anything in this call.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o, you right. Thanks. 👍

${_(dname)}
</a>
</li>
% endfor
Expand Down