Commit d19ed338 by asadiqbal

Trying to make xBlock message catalog files path dynamic

parent afd30bde
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-02-16 12:35+0500\n"
"PO-Revision-Date: 2016-02-16 12:37+0500\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.7\n"
"Last-Translator: \n"
"Plural-Forms: nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5);\n"
"Language: ar\n"
#: default_data.py
msgid ""
"An isosceles triangle with three layers of similar height. It is shown "
"upright, so the widest layer is located at the bottom, and the narrowest "
"layer is located at the top."
msgstr ""
#: default_data.py
msgid "The Top Zone"
msgstr ""
#: default_data.py
msgid "The Middle Zone"
msgstr ""
#: default_data.py
msgid "The Bottom Zone"
msgstr ""
#: default_data.py
msgid "Use this zone to associate an item with the top layer of the triangle."
msgstr ""
#: default_data.py
msgid ""
"Use this zone to associate an item with the middle layer of the triangle."
msgstr ""
#: default_data.py
msgid ""
"Use this zone to associate an item with the bottom layer of the triangle."
msgstr ""
#: default_data.py
msgid "Correct! This one belongs to {zone}."
msgstr ""
#: default_data.py
msgid "No, this item does not belong here. Try again."
msgstr ""
#: default_data.py
msgid "You silly, there are no zones for this one."
msgstr ""
#: default_data.py
msgid "Drag the items onto the image above."
msgstr "اسحب العناصر إلى الصورة أعلاه."
#: default_data.py
msgid "Good work! You have completed this drag and drop problem."
msgstr ""
#: default_data.py
msgid "Goes to the top"
msgstr ""
#: default_data.py
msgid "Goes to the middle"
msgstr ""
#: default_data.py
msgid "Goes to the bottom"
msgstr ""
#: default_data.py
msgid "I don't belong anywhere"
msgstr ""
#: drag_and_drop_v2.py
msgid "Title"
msgstr "العنوان"
#: drag_and_drop_v2.py
msgid ""
"The title of the drag and drop problem. The title is displayed to learners."
msgstr "عنوان مشكلة السحب والإفلات. يتم عرض عنوان للمتعلمين."
#: drag_and_drop_v2.py
msgid "Drag and Drop"
msgstr "سحب و إفلات"
#: drag_and_drop_v2.py
msgid "Show title"
msgstr "حوار"
#: drag_and_drop_v2.py
msgid "Display the title to the learner?"
msgstr "حوار"
#: drag_and_drop_v2.py
msgid "Problem text"
msgstr "النص المشكلة"
#: drag_and_drop_v2.py
msgid "The description of the problem or instructions shown to the learner"
msgstr ""
#: drag_and_drop_v2.py
msgid "Show \"Problem\" heading"
msgstr "مشاهدة “مشكلة” العنوان"
#: drag_and_drop_v2.py
msgid "Display the heading \"Problem\" above the problem text?"
msgstr ""
#: drag_and_drop_v2.py
msgid "Weight"
msgstr ""
#: drag_and_drop_v2.py
msgid "The maximum score the learner can receive for the problem"
msgstr ""
#: drag_and_drop_v2.py
msgid "Item background color"
msgstr ""
#: drag_and_drop_v2.py
msgid "The background color of draggable items in the problem."
msgstr ""
#: drag_and_drop_v2.py
msgid "Item text color"
msgstr "النص المشكلة"
#: drag_and_drop_v2.py
msgid "Text color to use for draggable items."
msgstr ""
#: drag_and_drop_v2.py
msgid "Problem data"
msgstr "النص المشكلة"
#: drag_and_drop_v2.py
msgid ""
"Information about zones, items, feedback, and background image for this "
"problem. This information is derived from the input that a course author "
"provides via the interactive editor when configuring the problem."
msgstr ""
#: drag_and_drop_v2.py
msgid ""
"Information about current positions of items that a learner has dropped on "
"the target image."
msgstr ""
#: drag_and_drop_v2.py
msgid "Indicates whether a learner has completed the problem at least once"
msgstr ""
...@@ -14,6 +14,7 @@ from xblock.fields import Scope, String, Dict, Float, Boolean ...@@ -14,6 +14,7 @@ from xblock.fields import Scope, String, Dict, Float, Boolean
from xblock.fragment import Fragment from xblock.fragment import Fragment
from xblockutils.resources import ResourceLoader from xblockutils.resources import ResourceLoader
from xblockutils.settings import XBlockWithSettingsMixin, ThemableXBlockMixin from xblockutils.settings import XBlockWithSettingsMixin, ThemableXBlockMixin
from path import Path as path
from .utils import _ # pylint: disable=unused-import from .utils import _ # pylint: disable=unused-import
from .default_data import DEFAULT_DATA from .default_data import DEFAULT_DATA
...@@ -22,7 +23,7 @@ from .default_data import DEFAULT_DATA ...@@ -22,7 +23,7 @@ from .default_data import DEFAULT_DATA
# Globals ########################################################### # Globals ###########################################################
loader = ResourceLoader(__name__) loader = ResourceLoader(__name__)
xblock_root = path(__file__).abspath().dirname()
# Classes ########################################################### # Classes ###########################################################
...@@ -111,9 +112,10 @@ class DragAndDropBlock(XBlock, XBlockWithSettingsMixin, ThemableXBlockMixin): ...@@ -111,9 +112,10 @@ class DragAndDropBlock(XBlock, XBlockWithSettingsMixin, ThemableXBlockMixin):
""" """
Hand the translation work off to the runtime's I18N service Hand the translation work off to the runtime's I18N service
""" """
extra_info = {'xblock_root': xblock_root}
runtime_service = self.runtime.service(self, "i18n") runtime_service = self.runtime.service(self, "i18n")
runtime_ugettext = runtime_service.ugettext runtime_ugettext = runtime_service.ugettext
response = runtime_ugettext(text) response = runtime_ugettext(text, **extra_info)
return response return response
@XBlock.supports("multi_device") # Enable this block for use in the mobile app via webview @XBlock.supports("multi_device") # Enable this block for use in the mobile app via webview
......
...@@ -35,5 +35,5 @@ setup( ...@@ -35,5 +35,5 @@ setup(
entry_points={ entry_points={
'xblock.v1': 'drag-and-drop-v2 = drag_and_drop_v2:DragAndDropBlock', 'xblock.v1': 'drag-and-drop-v2 = drag_and_drop_v2:DragAndDropBlock',
}, },
package_data=package_data("drag_and_drop_v2", ["static", "templates", "public"]), package_data=package_data("drag_and_drop_v2", ["static", "templates", "public", "conf"]),
) )
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