Skip to content

Commit

Permalink
Merge pull request #266 from open-craft/raul/fal-249-drag-drop-transl…
Browse files Browse the repository at this point in the history
…ation

[FAL-249] add translation support for LX
  • Loading branch information
hasnain-naveed authored Feb 10, 2021
2 parents e80b82d + 9759859 commit 6866be8
Show file tree
Hide file tree
Showing 67 changed files with 9,060 additions and 6,266 deletions.
1 change: 1 addition & 0 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[main]
host = https://www.transifex.com
lang_map = it_IT: it

[xblocks.drag-and-drop-v2]
file_filter = drag_and_drop_v2/translations/<lang>/LC_MESSAGES/text.po
Expand Down
7 changes: 7 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Drag and Drop XBlock changelog
==============================

Version 2.3.1 (2020-08-04)
---------------------------

* Better JS i18n language mapping.
* i18n source file updated in Transifex.
* i18n updated (not complete) support for languages: ar, de, es_419, fr, he, hi, it, ja, ko, nl, pl, pt_BR, ru, tr and zh_CN

Version 2.3 (2020-08-04)
---------------------------

Expand Down
2 changes: 1 addition & 1 deletion drag_and_drop_v2/drag_and_drop_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def _get_statici18n_js_url():
return None
text_js = 'public/js/translations/{lang_code}/text.js'
country_code = lang_code.split('-')[0]
for code in (lang_code, country_code):
for code in (translation.to_locale(lang_code), lang_code, country_code):
if pkg_resources.resource_exists(loader.module_name, text_js.format(lang_code=code)):
return text_js.format(lang_code=code)
return None
Expand Down
443 changes: 222 additions & 221 deletions drag_and_drop_v2/public/js/translations/ar/text.js

Large diffs are not rendered by default.

314 changes: 314 additions & 0 deletions drag_and_drop_v2/public/js/translations/de/text.js

Large diffs are not rendered by default.

231 changes: 203 additions & 28 deletions drag_and_drop_v2/public/js/translations/en/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,181 @@

django.catalog = django.catalog || {};

var newcatalog = {
"\n Please provide a description of the image for non-visual users.\n The description should provide sufficient information to allow anyone\n to solve the problem even without seeing the image.\n ": "\n Please provide a description of the image for non-visual users.\n The description should provide sufficient information to allow anyone\n to solve the problem even without seeing the image.\n ",
", draggable": ", draggable",
", draggable, grabbed": ", draggable, grabbed",
", dropzone": ", dropzone",
"Actions": "Actions",
"Add a zone": "Add a zone",
"Add an item": "Add an item",
"An error occurred. Unable to load drag and drop problem.": "An error occurred. Unable to load drag and drop problem.",
"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.": "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.",
"Assessment": "Assessment",
"Background Image": "Background Image",
"Background URL": "Background URL",
"Background description": "Background description",
"Basic Settings": "Basic Settings",
"Cancel": "Cancel",
"Change background": "Change background",
"Close": "Close",
"Continue": "Continue",
"Correct": "Correct",
"Correct! This one belongs to The Bottom Zone.": "Correct! This one belongs to The Bottom Zone.",
"Correct! This one belongs to The Middle Zone.": "Correct! This one belongs to The Middle Zone.",
"Correct! This one belongs to The Top Zone.": "Correct! This one belongs to The Top Zone.",
"Correctly placed in: {zone_title}": "Correctly placed in: {zone_title}",
"Correctly placed {correct_count} item.": [
"Correctly placed {correct_count} item.",
"Correctly placed {correct_count} items."
],
"DEPRECATED. Keeps maximum score achieved by student as a weighted value.": "DEPRECATED. Keeps maximum score achieved by student as a weighted value.",
"Defines the number of points the problem is worth.": "Defines the number of points the problem is worth.",
"Defines the number of times a student can try to answer this problem. If the value is not set, infinite attempts are allowed.": "Defines the number of times a student can try to answer this problem. If the value is not set, infinite attempts are allowed.",
"Did not place {missing_count} required item.": [
"Did not place {missing_count} required item.",
"Did not place {missing_count} required items."
],
"Display label names on the image": "Display label names on the image",
"Display the heading \"Problem\" above the problem text?": "Display the heading \"Problem\" above the problem text?",
"Display the title to the learner?": "Display the title to the learner?",
"Display zone borders on the image": "Display zone borders on the image",
"Drag and Drop": "Drag and Drop",
"Drag and Drop Problem": "Drag and Drop Problem",
"Drag and Drop problems consist of draggable items and dropzones. Users should select a draggable item with their keyboard and then navigate to an appropriate dropzone to drop it.": "Drag and Drop problems consist of draggable items and dropzones. Users should select a draggable item with their keyboard and then navigate to an appropriate dropzone to drop it.",
"Drag the items onto the image above.": "Drag the items onto the image above.",
"Drop Targets": "Drop Targets",
"Feedback": "Feedback",
"Final attempt was used, highest score is {score}": "Final attempt was used, highest score is {score}",
"Final feedback": "Final feedback",
"For example, 'http://example.com/background.png' or '/static/background.png'.": "For example, 'http://example.com/background.png' or '/static/background.png'.",
"Generate image and zones": "Generate image and zones",
"Generate image automatically": "Generate image automatically",
"Go to Beginning": "Go to Beginning",
"Goes anywhere": "Goes anywhere",
"Goes to the bottom": "Goes to the bottom",
"Goes to the middle": "Goes to the middle",
"Goes to the top": "Goes to the top",
"Good work! You have completed this drag and drop problem.": "Good work! You have completed this drag and drop problem.",
"Hints:": "Hints:",
"I don't belong anywhere": "I don't belong anywhere",
"Incorrect": "Incorrect",
"Indicates whether a learner has completed the problem at least once": "Indicates whether a learner has completed the problem at least once",
"Information about current positions of items that a learner has dropped on the target image.": "Information about current positions of items that a learner has dropped on the target image.",
"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.": "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.",
"Introductory feedback": "Introductory feedback",
"Item Bank": "Item Bank",
"Item background color": "Item background color",
"Item definitions": "Item definitions",
"Item text color": "Item text color",
"Items": "Items",
"Items placed here: ": "Items placed here: ",
"Keeps maximum score achieved by student as a raw value between 0 and 1.": "Keeps maximum score achieved by student as a raw value between 0 and 1.",
"Keyboard Help": "Keyboard Help",
"Loading drag and drop problem.": "Loading drag and drop problem.",
"Max number of attempts reached": "Max number of attempts reached",
"Maximum attempts": "Maximum attempts",
"Maximum items per zone": "Maximum items per zone",
"Misplaced {misplaced_count} item.": [
"Misplaced {misplaced_count} item.",
"Misplaced {misplaced_count} items."
],
"Misplaced {misplaced_count} item. Misplaced item was returned to item bank.": [
"Misplaced {misplaced_count} item. Misplaced item was returned to item bank.",
"Misplaced {misplaced_count} items. Misplaced items were returned to item bank."
],
"Mode": "Mode",
"Navigate using TAB and SHIFT+TAB to the appropriate dropzone and press CTRL+M once more to drop it here.": "Navigate using TAB and SHIFT+TAB to the appropriate dropzone and press CTRL+M once more to drop it here.",
"No items placed here": "No items placed here",
"No, this item does not belong here. Try again.": "No, this item does not belong here. Try again.",
"Number of attempts learner used": "Number of attempts learner used",
"Number of columns": "Number of columns",
"Number of columns and rows.": "Number of columns and rows.",
"Number of rows": "Number of rows",
"Of course it goes here! It goes anywhere!": "Of course it goes here! It goes anywhere!",
"Placed in: {zone_title}": "Placed in: {zone_title}",
"Please check over your submission.": "Please check over your submission.",
"Please check the values you entered.": "Please check the values you entered.",
"Press CTRL+M to select a draggable item (effectively picking it up).": "Press CTRL+M to select a draggable item (effectively picking it up).",
"Press ESC if you want to cancel the drop operation (for example, to select a different item).": "Press ESC if you want to cancel the drop operation (for example, to select a different item).",
"Problem": "Problem",
"Problem Weight": "Problem Weight",
"Problem data": "Problem data",
"Problem text": "Problem text",
"Provide custom image": "Provide custom image",
"Reset": "Reset",
"Save": "Save",
"Saving": "Saving",
"Show \"Problem\" heading": "Show \"Problem\" heading",
"Show Answer": "Show Answer",
"Show title": "Show title",
"Size of a single zone in pixels.": "Size of a single zone in pixels.",
"Some of your answers were not correct.": "Some of your answers were not correct.",
"Standard": "Standard",
"Standard mode: the problem provides immediate feedback each time a learner drops an item on a target zone. Assessment mode: the problem provides feedback only after a learner drops all available items on target zones.": "Standard mode: the problem provides immediate feedback each time a learner drops an item on a target zone. Assessment mode: the problem provides feedback only after a learner drops all available items on target zones.",
"Submission deadline has passed.": "Submission deadline has passed.",
"Submit": "Submit",
"Submitting": "Submitting",
"TAB back to the list of draggable items and repeat this process until all of the draggable items have been placed on their respective dropzones.": "TAB back to the list of draggable items and repeat this process until all of the draggable items have been placed on their respective dropzones.",
"Text color to use for draggable items (example: 'white' or '#ffffff').": "Text color to use for draggable items (example: 'white' or '#ffffff').",
"The Bottom Zone": "The Bottom Zone",
"The Middle Zone": "The Middle Zone",
"The Top Zone": "The Top Zone",
"The background color of draggable items in the problem (example: 'blue' or '#0000ff').": "The background color of draggable items in the problem (example: 'blue' or '#0000ff').",
"The description of the problem or instructions shown to the learner.": "The description of the problem or instructions shown to the learner.",
"The title of the drag and drop problem. The title is displayed to learners.": "The title of the drag and drop problem. The title is displayed to learners.",
"There are attempts remaining": "There are attempts remaining",
"There was an error with your form.": "There was an error with your form.",
"This is a screen reader-friendly problem.": "This is a screen reader-friendly problem.",
"This setting limits the number of items that can be dropped into a single zone.": "This setting limits the number of items that can be dropped into a single zone.",
"Title": "Title",
"Unknown DnDv2 mode {mode} - course is misconfigured": "Unknown DnDv2 mode {mode} - course is misconfigured",
"Unknown Zone": "Unknown Zone",
"Use only TAB and SHIFT+TAB to navigate between draggable items and drop zones.": "Use only TAB and SHIFT+TAB to navigate between draggable items and drop zones.",
"Use this zone to associate an item with the bottom layer of the triangle.": "Use this zone to associate an item with the bottom layer of the triangle.",
"Use this zone to associate an item with the middle layer of the triangle.": "Use this zone to associate an item with the middle layer of the triangle.",
"Use this zone to associate an item with the top layer of the triangle.": "Use this zone to associate an item with the top layer of the triangle.",
"You can complete this problem using only your keyboard by following the guidance below:": "You can complete this problem using only your keyboard by following the guidance below:",
"You cannot add any more items to this zone.": "You cannot add any more items to this zone.",
"You have used {used} of {total} attempts.": "You have used {used} of {total} attempts.",
"You silly, there are no zones for this one.": "You silly, there are no zones for this one.",
"Your highest score is {score}": "Your highest score is {score}",
"Zone Layout": "Zone Layout",
"Zone Size": "Zone Size",
"Zone borders": "Zone borders",
"Zone definitions": "Zone definitions",
"Zone height": "Zone height",
"Zone labels": "Zone labels",
"Zone width": "Zone width",
"Zone {num}": [
"Zone {num}",
"Zone {num}"
],
"Zones": "Zones",
"do_attempt handler should only be called for assessment mode": "do_attempt handler should only be called for assessment mode",
"droppable": "droppable",
"show_answer handler should only be called for assessment mode": "show_answer handler should only be called for assessment mode",
"{earned}/{possible} point (graded)": [
"{earned}/{possible} point (graded)",
"{earned}/{possible} points (graded)"
],
"{earned}/{possible} point (ungraded)": [
"{earned}/{possible} point (ungraded)",
"{earned}/{possible} points (ungraded)"
],
"{possible} point possible (graded)": [
"{possible} point possible (graded)",
"{possible} points possible (graded)"
],
"{possible} point possible (ungraded)": [
"{possible} point possible (ungraded)",
"{possible} points possible (ungraded)"
]
};
for (var key in newcatalog) {
django.catalog[key] = newcatalog[key];
}


if (!django.jsi18n_initialized) {
django.gettext = function(msgid) {
Expand Down Expand Up @@ -73,40 +248,40 @@
/* formatting library */

django.formats = {
"DATETIME_FORMAT": "N j, Y, P",
"DATETIME_FORMAT": "N j, Y, P",
"DATETIME_INPUT_FORMATS": [
"%Y-%m-%d %H:%M:%S",
"%Y-%m-%d %H:%M:%S.%f",
"%Y-%m-%d %H:%M",
"%Y-%m-%d",
"%m/%d/%Y %H:%M:%S",
"%m/%d/%Y %H:%M:%S.%f",
"%m/%d/%Y %H:%M",
"%m/%d/%Y",
"%m/%d/%y %H:%M:%S",
"%m/%d/%y %H:%M:%S.%f",
"%m/%d/%y %H:%M",
"%Y-%m-%d %H:%M:%S",
"%Y-%m-%d %H:%M:%S.%f",
"%Y-%m-%d %H:%M",
"%Y-%m-%d",
"%m/%d/%Y %H:%M:%S",
"%m/%d/%Y %H:%M:%S.%f",
"%m/%d/%Y %H:%M",
"%m/%d/%Y",
"%m/%d/%y %H:%M:%S",
"%m/%d/%y %H:%M:%S.%f",
"%m/%d/%y %H:%M",
"%m/%d/%y"
],
"DATE_FORMAT": "N j, Y",
],
"DATE_FORMAT": "N j, Y",
"DATE_INPUT_FORMATS": [
"%Y-%m-%d",
"%m/%d/%Y",
"%Y-%m-%d",
"%m/%d/%Y",
"%m/%d/%y"
],
"DECIMAL_SEPARATOR": ".",
"FIRST_DAY_OF_WEEK": "0",
"MONTH_DAY_FORMAT": "F j",
"NUMBER_GROUPING": "3",
"SHORT_DATETIME_FORMAT": "m/d/Y P",
"SHORT_DATE_FORMAT": "m/d/Y",
"THOUSAND_SEPARATOR": ",",
"TIME_FORMAT": "P",
],
"DECIMAL_SEPARATOR": ".",
"FIRST_DAY_OF_WEEK": "0",
"MONTH_DAY_FORMAT": "F j",
"NUMBER_GROUPING": "3",
"SHORT_DATETIME_FORMAT": "m/d/Y P",
"SHORT_DATE_FORMAT": "m/d/Y",
"THOUSAND_SEPARATOR": ",",
"TIME_FORMAT": "P",
"TIME_INPUT_FORMATS": [
"%H:%M:%S",
"%H:%M:%S.%f",
"%H:%M:%S",
"%H:%M:%S.%f",
"%H:%M"
],
],
"YEAR_MONTH_FORMAT": "F Y"
};

Expand Down
Loading

0 comments on commit 6866be8

Please sign in to comment.