Commit 61460f7a by Clinton Blackburn

i18n Cleanup

Line numbers in PO files are noisy in pull requests. This commit updates the Makefile to use edx-i18n-tools to extract translations and remove line numbers.

Additionally, a few uses of `blocktrans` have been updated to use the `trimmed` argument to remove surrounding whitespace.

ECOM-5175
parent 6d8db6b4
......@@ -73,8 +73,9 @@ html_coverage:
coverage html && open htmlcov/index.html
extract_translations:
python manage.py makemessages -l en -v1 -d django --ignore="docs/*" --ignore="course_discovery/assets/*" --ignore="node_modules/*" --ignore="course_discovery/static/bower_components/*" --ignore="course_discovery/static/build/*"
python manage.py makemessages -l en -v1 -d djangojs --ignore="docs/*" --ignore="course_discovery/assets/*" --ignore="node_modules/*" --ignore="course_discovery/static/bower_components/*" --ignore="course_discovery/static/build/*"
# NOTE: We need PYTHONPATH defined to avoid ImportError(s) on Travis CI.
cd course_discovery && PYTHONPATH="..:${PYTHONPATH}" i18n_tool extract --verbose
cd course_discovery && PYTHONPATH="..:${PYTHONPATH}" i18n_tool generate --verbose
dummy_translations:
cd course_discovery && i18n_tool dummy
......
......@@ -83,3 +83,15 @@ locales:
# The locales used for fake-accented English, for testing.
dummy_locales:
- eo
ignore_dirs:
- assets
- static/bower_components
- static/build
# How should the generate step merge files?
generate_merge:
django.po:
- django-partial.po
djangojs.po:
- djangojs-partial.po
......@@ -3,28 +3,27 @@
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-10-23 15:52+0000\n"
"POT-Creation-Date: 2016-10-25 11:39-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: \n"
#: course_discovery/static/js/catalogs-change-form.js:17
#: static/js/catalogs-change-form.js
msgid "Preview"
msgstr ""
#: course_discovery/static/js/publisher/views/navbar.js:33
#: static/js/publisher/views/navbar.js
msgid "OFF"
msgstr ""
#: course_discovery/static/js/publisher/views/navbar.js:46
#: static/js/publisher/views/navbar.js
msgid "ON"
msgstr ""
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-10-23 15:52+0000\n"
"POT-Creation-Date: 2016-10-25 10:56-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -17,14 +17,14 @@ msgstr ""
"Language: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: course_discovery/static/js/catalogs-change-form.js
#: static/js/catalogs-change-form.js
msgid "Preview"
msgstr "Prévïéw Ⱡ'σяєм ιρѕυм #"
#: course_discovery/static/js/publisher/views/navbar.js
#: static/js/publisher/views/navbar.js
msgid "OFF"
msgstr "ÖFF Ⱡ'σяєм#"
#: course_discovery/static/js/publisher/views/navbar.js
#: static/js/publisher/views/navbar.js
msgid "ON"
msgstr "ÖN Ⱡ'σя#"
......@@ -4,7 +4,7 @@
<div class="comments-container">
{% get_comment_count for comment_object as comment_count %}
<h4 class="hd-4">
{% blocktrans with comment_count=comment_count %}
{% blocktrans trimmed with comment_count=comment_count %}
Total Comments {{ comment_count }}
{% endblocktrans %}
</h4>
......
......@@ -25,7 +25,7 @@
<p>
<!--Translators: 'EdX', 'edX', 'Studio', and 'Open edX' are trademarks of 'edX Inc.'. Please do not translate any of these trademarks and company names.-->
{% with link_start='<a data-rel="edx.org" href="https://www.edx.org/">' link_end='</a>' %}
{% blocktrans %}
{% blocktrans trimmed %}
EdX, Open edX, Publisher, and the edX and Open edX logos are registered trademarks or trademarks of {{link_start}}edX Inc.{{link_end}}
{% endblocktrans %}
{% endwith %}
......
......@@ -15,7 +15,7 @@
<p>
{% url 'publisher:publisher_courses_new' as new_course_url %}
{% with link_start='<a href="' link_middle='">' link_end='</a>' %}
{% blocktrans %}
{% blocktrans trimmed %}
Please {{ link_start }}{{ new_course_url }}{{ link_middle }}add a new course{{ link_end }} to create your first run
{% endblocktrans %}
{% endwith %}
......
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