Skip to content

Commit

Permalink
Merge pull request #25 from edx-solutions/asadiqbal08/WL-367
Browse files Browse the repository at this point in the history
WL-367 18n support: Zooming Image Tool
  • Loading branch information
mattdrayer committed Jun 6, 2016
2 parents 21b9bcc + 81571c6 commit 00d601e
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 6 deletions.
2 changes: 1 addition & 1 deletion image_explorer/image_explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def publish_event(self, data, suffix=''):
try:
event_type = data.pop('event_type')
except KeyError:
return {'result': 'error', 'message': 'Missing event_type in JSON data'}
return {'result': 'error', 'message': self.ugettext('Missing event_type in JSON data')}

data['user_id'] = self.scope_ids.user_id
data['component_id'] = self._get_unique_id()
Expand Down
6 changes: 3 additions & 3 deletions image_explorer/templates/html/image_explorer_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<label class="label setting-label" for="edit_display_name">Title</label>
<input class="input setting-input edit-display-name" id="edit_display_name" value="{{ self.display_name }}" type="text">
</div>
<span class="tip setting-help">The title of the Image Explorer that is displayed to the user</span>
<span class="tip setting-help">{% trans "The title of the Image Explorer that is displayed to the user" %}</span>
</li>
<li class="field comp-setting-entry is-set">
<div class="wrapper-comp-setting">
<label class="label setting-label" for="edit_data">Definition</label>
<span class="tip setting-help">The XML definition for the Image Explorer</span>
<label class="label setting-label" for="edit_data">{% trans "Definition" %}</label>
<span class="tip setting-help">{% trans "The XML definition for the Image Explorer" %}</span>
<div class='codemirror-editor-wrapper'>
<textarea class="block-xml-editor edit-data">{{ self.data }}</textarea>
</div>
Expand Down
16 changes: 16 additions & 0 deletions image_explorer/translations/en/LC_MESSAGES/text.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2016-05-25 15:49+0500\n"
"PO-Revision-Date: 2016-05-25 15:49+0500\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: image_explorer.py:128
msgid "Missing event_type in JSON data"
msgstr ""
16 changes: 16 additions & 0 deletions image_explorer/translations/eo/LC_MESSAGES/text.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2016-05-25 15:49+0500\n"
"PO-Revision-Date: 2016-05-25 15:49+0500\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: eo\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: image_explorer.py:128
msgid "Missing event_type in JSON data"
msgstr "Mïssmïng évént_typé ïn JSÖN dätä Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢#"
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def package_data(pkg, root_list):

setup(
name='xblock-image-explorer',
version='0.1',
version='0.2',
description='XBlock - Image Explorer',
packages=['image_explorer'],
install_requires=[
Expand All @@ -32,5 +32,5 @@ def package_data(pkg, root_list):
entry_points={
'xblock.v1': 'image-explorer = image_explorer:ImageExplorerBlock',
},
package_data=package_data("image_explorer", ["static", "templates", "public"]),
package_data=package_data("image_explorer", ["static", "templates", "public", "translations"]),
)

0 comments on commit 00d601e

Please sign in to comment.