diff --git a/.tx/config b/.tx/config deleted file mode 100644 index 7d389e0..0000000 --- a/.tx/config +++ /dev/null @@ -1,8 +0,0 @@ -[main] -host = https://www.transifex.com - -[o:open-edx:p:xblocks:r:recommender] -file_filter = recommender/translations//LC_MESSAGES/text.po -source_file = recommender/translations/en/LC_MESSAGES/text.po -source_lang = en -type = PO diff --git a/recommender/conf/locale/ar/LC_MESSAGES/text.po b/recommender/conf/locale/ar/LC_MESSAGES/text.po deleted file mode 100644 index 9f6f372..0000000 --- a/recommender/conf/locale/ar/LC_MESSAGES/text.po +++ /dev/null @@ -1,58 +0,0 @@ -# -# Translators: -# shefaa abu jabel , 2016 -msgid "" -msgstr "" -"Project-Id-Version: XBlocks\n" -"POT-Creation-Date: 2016-05-27 11:04+0500\n" -"PO-Revision-Date: 2016-08-24 12:32+0000\n" -"Last-Translator: shefaa abu jabel \n" -"Language-Team: Arabic (http://www.transifex.com/open-edx/xblocks/language/ar/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ar\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" - -#: recommender.py -msgid "The resource you are attempting to provide already exists" -msgstr "المصدر الذي تحاول تقديمه موجود بالفعل" - -#: recommender.py -msgid "" -"The resource you are attempting to provide has been disallowed by the staff." -" Reason: " -msgstr "قام الموظفون برفض المصدر الذي تحاول تقديمه. السبب لذلك: " - -#: recommender.py -msgid "The selected resource does not exist" -msgstr "المصدر المختار غير موجود" - -#: recommender.py -msgid "Size of uploaded file exceeds threshold" -msgstr "حجم الملف الذي تم رفعه يتجاوز الحد" - -#: recommender.py -msgid "The configuration of pyfs is not properly set" -msgstr "لم يتم تحديد ترتيب إعدادات pyfs بشكل صحيح" - -#: recommender.py:729 -msgid "Endorse resource without permission" -msgstr "قبول المصدر بدون تصريح" - -#: recommender.py -msgid "You don't have the permission to remove this resource" -msgstr "ليس لديك التصريح لحذف هذا المصدر" - -#: recommender.py -msgid "Only staff can import resources" -msgstr "يمكن للموظفين فقط استيراد المصادر" - -#: recommender.py -msgid "" -"Please submit the JSON file obtained with the download resources button" -msgstr "الرجاء إرسال ملف JSON الذي تم الحصول عليها باستخدام زر تنزيل المصادر" - -#: recommender.py -msgid "Tried to access flagged resources without staff permission" -msgstr "تمت محاولة الدخول إلى مصادر المعلمة بعلامات بدون تصريح من الموظفين" diff --git a/recommender/conf/locale/en/LC_MESSAGES/text.po b/recommender/conf/locale/en/LC_MESSAGES/text.po deleted file mode 100644 index 4eccdb1..0000000 --- a/recommender/conf/locale/en/LC_MESSAGES/text.po +++ /dev/null @@ -1,54 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: \n" -"POT-Creation-Date: 2016-05-27 11:04+0500\n" -"PO-Revision-Date: 2016-05-27 11:04+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" - -#: recommender.py -msgid "The resource you are attempting to provide already exists" -msgstr "" - -#: recommender.py -msgid "" -"The resource you are attempting to provide has been disallowed by the staff. " -"Reason: " -msgstr "" - -#: recommender.py -msgid "The selected resource does not exist" -msgstr "" - -#: recommender.py -msgid "Size of uploaded file exceeds threshold" -msgstr "" - -#: recommender.py -msgid "The configuration of pyfs is not properly set" -msgstr "" - -#: recommender.py:729 -msgid "Endorse resource without permission" -msgstr "" - -#: recommender.py -msgid "You don't have the permission to remove this resource" -msgstr "" - -#: recommender.py -msgid "Only staff can import resources" -msgstr "" - -#: recommender.py -msgid "Please submit the JSON file obtained with the download resources button" -msgstr "" - -#: recommender.py -msgid "Tried to access flagged resources without staff permission" -msgstr "" diff --git a/recommender/conf/locale/eo/LC_MESSAGES/text.po b/recommender/conf/locale/eo/LC_MESSAGES/text.po deleted file mode 100644 index c5490e1..0000000 --- a/recommender/conf/locale/eo/LC_MESSAGES/text.po +++ /dev/null @@ -1,72 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: \n" -"POT-Creation-Date: 2016-05-27 11:04+0500\n" -"PO-Revision-Date: 2016-05-27 11:04+0500\n" -"Last-Translator: \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: recommender.py -msgid "The resource you are attempting to provide already exists" -msgstr "" -"Thé résöürçé ýöü äré ättémptïng tö prövïdé älréädý éxïsts Ⱡ'σяєм ιρѕυм ∂σłσя" -" ѕιт αмєт, ¢σηѕє¢тєтυя α#" - -#: recommender.py -msgid "" -"The resource you are attempting to provide has been disallowed by the staff." -" Reason: " -msgstr "" -"Thé résöürçé ýöü äré ättémptïng tö prövïdé häs ßéén dïsällöwéd ßý thé stäff." -" Réäsön: Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢#" - -#: recommender.py -msgid "The selected resource does not exist" -msgstr "" -"Thé séléçtéd résöürçé döés nöt éxïst Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, " -"¢σηѕє¢тєтυ#" - -#: recommender.py -msgid "Size of uploaded file exceeds threshold" -msgstr "" -"Sïzé öf üplöädéd fïlé éxçééds thréshöld Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, " -"¢σηѕє¢тєтυя#" - -#: recommender.py -msgid "The configuration of pyfs is not properly set" -msgstr "" -"Thé çönfïgürätïön öf pýfs ïs nöt pröpérlý sét Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, " -"¢σηѕє¢тєтυя #" - -#: recommender.py -msgid "Endorse resource without permission" -msgstr "" -"Éndörsé résöürçé wïthöüt pérmïssïön Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тєт#" - -#: recommender.py -msgid "You don't have the permission to remove this resource" -msgstr "" -"Ýöü dön't hävé thé pérmïssïön tö rémövé thïs résöürçé Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт" -" αмєт, ¢σηѕє¢тєтυя α#" - -#: recommender.py -msgid "Only staff can import resources" -msgstr "Önlý stäff çän ïmpört résöürçés Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢т#" - -#: recommender.py -msgid "" -"Please submit the JSON file obtained with the download resources button" -msgstr "" -"Pléäsé süßmït thé JSÖN fïlé ößtäïnéd wïth thé döwnlöäd résöürçés ßüttön " -"Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя#" - -#: recommender.py -msgid "Tried to access flagged resources without staff permission" -msgstr "" -"Trïéd tö äççéss fläggéd résöürçés wïthöüt stäff pérmïssïön Ⱡ'σяєм ιρѕυм " -"∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя α#" diff --git a/recommender/conf/locale/es_419/LC_MESSAGES/text.po b/recommender/conf/locale/es_419/LC_MESSAGES/text.po deleted file mode 100644 index 4c56616..0000000 --- a/recommender/conf/locale/es_419/LC_MESSAGES/text.po +++ /dev/null @@ -1,58 +0,0 @@ -# -# Translators: -# Lisseth Pacheco , 2016 -msgid "" -msgstr "" -"Project-Id-Version: XBlocks\n" -"POT-Creation-Date: 2016-05-27 11:04+0500\n" -"PO-Revision-Date: 2016-08-09 20:43+0000\n" -"Last-Translator: Lisseth Pacheco \n" -"Language-Team: Spanish (Latin America) (http://www.transifex.com/open-edx/xblocks/language/es_419/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: es_419\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: recommender.py -msgid "The resource you are attempting to provide already exists" -msgstr "" - -#: recommender.py -msgid "" -"The resource you are attempting to provide has been disallowed by the staff." -" Reason: " -msgstr "" - -#: recommender.py -msgid "The selected resource does not exist" -msgstr "" - -#: recommender.py -msgid "Size of uploaded file exceeds threshold" -msgstr "" - -#: recommender.py -msgid "The configuration of pyfs is not properly set" -msgstr "" - -#: recommender.py:729 -msgid "Endorse resource without permission" -msgstr "" - -#: recommender.py -msgid "You don't have the permission to remove this resource" -msgstr "" - -#: recommender.py -msgid "Only staff can import resources" -msgstr "" - -#: recommender.py -msgid "" -"Please submit the JSON file obtained with the download resources button" -msgstr "" - -#: recommender.py -msgid "Tried to access flagged resources without staff permission" -msgstr "" diff --git a/recommender/conf/locale/fr/LC_MESSAGES/text.po b/recommender/conf/locale/fr/LC_MESSAGES/text.po deleted file mode 100644 index 5b14ee4..0000000 --- a/recommender/conf/locale/fr/LC_MESSAGES/text.po +++ /dev/null @@ -1,58 +0,0 @@ -# -# Translators: -# bill jambon , 2016 -msgid "" -msgstr "" -"Project-Id-Version: XBlocks\n" -"POT-Creation-Date: 2016-05-27 11:04+0500\n" -"PO-Revision-Date: 2016-08-09 20:43+0000\n" -"Last-Translator: bill jambon \n" -"Language-Team: French (http://www.transifex.com/open-edx/xblocks/language/fr/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: fr\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: recommender.py -msgid "The resource you are attempting to provide already exists" -msgstr "" - -#: recommender.py -msgid "" -"The resource you are attempting to provide has been disallowed by the staff." -" Reason: " -msgstr "" - -#: recommender.py -msgid "The selected resource does not exist" -msgstr "" - -#: recommender.py -msgid "Size of uploaded file exceeds threshold" -msgstr "" - -#: recommender.py -msgid "The configuration of pyfs is not properly set" -msgstr "" - -#: recommender.py:729 -msgid "Endorse resource without permission" -msgstr "" - -#: recommender.py -msgid "You don't have the permission to remove this resource" -msgstr "" - -#: recommender.py -msgid "Only staff can import resources" -msgstr "" - -#: recommender.py -msgid "" -"Please submit the JSON file obtained with the download resources button" -msgstr "" - -#: recommender.py -msgid "Tried to access flagged resources without staff permission" -msgstr "" diff --git a/recommender/conf/locale/he/LC_MESSAGES/text.po b/recommender/conf/locale/he/LC_MESSAGES/text.po deleted file mode 100644 index e9f279f..0000000 --- a/recommender/conf/locale/he/LC_MESSAGES/text.po +++ /dev/null @@ -1,58 +0,0 @@ -# -# Translators: -# qualityalltext , 2016 -msgid "" -msgstr "" -"Project-Id-Version: XBlocks\n" -"POT-Creation-Date: 2016-05-27 11:04+0500\n" -"PO-Revision-Date: 2016-08-21 07:51+0000\n" -"Last-Translator: qualityalltext \n" -"Language-Team: Hebrew (http://www.transifex.com/open-edx/xblocks/language/he/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: he\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: recommender.py -msgid "The resource you are attempting to provide already exists" -msgstr "המקור שהינך מנסה לספק, קיים כבר" - -#: recommender.py -msgid "" -"The resource you are attempting to provide has been disallowed by the staff." -" Reason: " -msgstr "המקור שהינך מנסה לספק, נפסל בידי הצוות. סיבה: " - -#: recommender.py -msgid "The selected resource does not exist" -msgstr "המקור שנבחר אינו קיים" - -#: recommender.py -msgid "Size of uploaded file exceeds threshold" -msgstr "גודל הקובץ שהועלה חורג מדרישות הסף" - -#: recommender.py -msgid "The configuration of pyfs is not properly set" -msgstr "תצורת ה- pyfs אינה מוגדרת נכון" - -#: recommender.py:729 -msgid "Endorse resource without permission" -msgstr "מקור הוסב ללא אישור" - -#: recommender.py -msgid "You don't have the permission to remove this resource" -msgstr "אין לך אישור להסיר מקור זה." - -#: recommender.py -msgid "Only staff can import resources" -msgstr "רק הצוות יכול לייבא מקורות" - -#: recommender.py -msgid "" -"Please submit the JSON file obtained with the download resources button" -msgstr "שלח את קובץ ה-JSON שהתקבל באמצעות לחצן הורדת מקורות" - -#: recommender.py -msgid "Tried to access flagged resources without staff permission" -msgstr "ניסית להיכנס למקורות מסומנים ללא אישור הצוות" diff --git a/recommender/conf/locale/hi/LC_MESSAGES/text.po b/recommender/conf/locale/hi/LC_MESSAGES/text.po deleted file mode 100644 index ff6f174..0000000 --- a/recommender/conf/locale/hi/LC_MESSAGES/text.po +++ /dev/null @@ -1,57 +0,0 @@ -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: XBlocks\n" -"POT-Creation-Date: 2016-05-27 11:04+0500\n" -"PO-Revision-Date: 2016-06-08 14:35+0000\n" -"Last-Translator: \n" -"Language-Team: Hindi (http://www.transifex.com/open-edx/xblocks/language/hi/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: hi\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: recommender.py -msgid "The resource you are attempting to provide already exists" -msgstr "" - -#: recommender.py -msgid "" -"The resource you are attempting to provide has been disallowed by the staff." -" Reason: " -msgstr "" - -#: recommender.py -msgid "The selected resource does not exist" -msgstr "" - -#: recommender.py -msgid "Size of uploaded file exceeds threshold" -msgstr "" - -#: recommender.py -msgid "The configuration of pyfs is not properly set" -msgstr "" - -#: recommender.py:729 -msgid "Endorse resource without permission" -msgstr "" - -#: recommender.py -msgid "You don't have the permission to remove this resource" -msgstr "" - -#: recommender.py -msgid "Only staff can import resources" -msgstr "" - -#: recommender.py -msgid "" -"Please submit the JSON file obtained with the download resources button" -msgstr "" - -#: recommender.py -msgid "Tried to access flagged resources without staff permission" -msgstr "" diff --git a/recommender/conf/locale/ko_KR/LC_MESSAGES/text.po b/recommender/conf/locale/ko_KR/LC_MESSAGES/text.po deleted file mode 100644 index f5293f2..0000000 --- a/recommender/conf/locale/ko_KR/LC_MESSAGES/text.po +++ /dev/null @@ -1,57 +0,0 @@ -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: XBlocks\n" -"POT-Creation-Date: 2016-05-27 11:04+0500\n" -"PO-Revision-Date: 2016-06-08 14:35+0000\n" -"Last-Translator: \n" -"Language-Team: Korean (Korea) (http://www.transifex.com/open-edx/xblocks/language/ko_KR/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ko_KR\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: recommender.py -msgid "The resource you are attempting to provide already exists" -msgstr "" - -#: recommender.py -msgid "" -"The resource you are attempting to provide has been disallowed by the staff." -" Reason: " -msgstr "" - -#: recommender.py -msgid "The selected resource does not exist" -msgstr "" - -#: recommender.py -msgid "Size of uploaded file exceeds threshold" -msgstr "" - -#: recommender.py -msgid "The configuration of pyfs is not properly set" -msgstr "" - -#: recommender.py:729 -msgid "Endorse resource without permission" -msgstr "" - -#: recommender.py -msgid "You don't have the permission to remove this resource" -msgstr "" - -#: recommender.py -msgid "Only staff can import resources" -msgstr "" - -#: recommender.py -msgid "" -"Please submit the JSON file obtained with the download resources button" -msgstr "" - -#: recommender.py -msgid "Tried to access flagged resources without staff permission" -msgstr "" diff --git a/recommender/conf/locale/pt_BR/LC_MESSAGES/text.po b/recommender/conf/locale/pt_BR/LC_MESSAGES/text.po deleted file mode 100644 index 9f5cae9..0000000 --- a/recommender/conf/locale/pt_BR/LC_MESSAGES/text.po +++ /dev/null @@ -1,60 +0,0 @@ -# -# Translators: -# danielcn , 2016 -# Larissa Azevedo , 2016 -# Renata Barboza-Murray, 2016 -msgid "" -msgstr "" -"Project-Id-Version: XBlocks\n" -"POT-Creation-Date: 2016-05-27 11:04+0500\n" -"PO-Revision-Date: 2016-12-21 19:06+0000\n" -"Last-Translator: Renata Barboza-Murray\n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/open-edx/xblocks/language/pt_BR/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: pt_BR\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: recommender.py -msgid "The resource you are attempting to provide already exists" -msgstr "O recurso que você está tentando fornecer já existe" - -#: recommender.py -msgid "" -"The resource you are attempting to provide has been disallowed by the staff." -" Reason: " -msgstr "O recurso que você está tentando fornecer foi proibido pela equipe. Razão:" - -#: recommender.py -msgid "The selected resource does not exist" -msgstr "O recurso selecionado não existe" - -#: recommender.py -msgid "Size of uploaded file exceeds threshold" -msgstr "O tamanho do arquivo carregado excede o limite estabelecido" - -#: recommender.py -msgid "The configuration of pyfs is not properly set" -msgstr "A configuração de pyfs não está feita corretamente" - -#: recommender.py:729 -msgid "Endorse resource without permission" -msgstr "Recomendar recurso sem permissão" - -#: recommender.py -msgid "You don't have the permission to remove this resource" -msgstr "Você não tem permissão para remover este recurso" - -#: recommender.py -msgid "Only staff can import resources" -msgstr "Apenas a equipe pode importar recursos" - -#: recommender.py -msgid "" -"Please submit the JSON file obtained with the download resources button" -msgstr "Envie o arquivo JSON que você obteve ao baixar os recursos" - -#: recommender.py -msgid "Tried to access flagged resources without staff permission" -msgstr "Tentou acessar recursos marcados sem a permissão da equipe" diff --git a/recommender/conf/locale/ru/LC_MESSAGES/text.po b/recommender/conf/locale/ru/LC_MESSAGES/text.po deleted file mode 100644 index 6ca0c17..0000000 --- a/recommender/conf/locale/ru/LC_MESSAGES/text.po +++ /dev/null @@ -1,57 +0,0 @@ -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: XBlocks\n" -"POT-Creation-Date: 2016-05-27 11:04+0500\n" -"PO-Revision-Date: 2016-06-08 14:35+0000\n" -"Last-Translator: \n" -"Language-Team: Russian (http://www.transifex.com/open-edx/xblocks/language/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#: recommender.py -msgid "The resource you are attempting to provide already exists" -msgstr "" - -#: recommender.py -msgid "" -"The resource you are attempting to provide has been disallowed by the staff." -" Reason: " -msgstr "" - -#: recommender.py -msgid "The selected resource does not exist" -msgstr "" - -#: recommender.py -msgid "Size of uploaded file exceeds threshold" -msgstr "" - -#: recommender.py -msgid "The configuration of pyfs is not properly set" -msgstr "" - -#: recommender.py:729 -msgid "Endorse resource without permission" -msgstr "" - -#: recommender.py -msgid "You don't have the permission to remove this resource" -msgstr "" - -#: recommender.py -msgid "Only staff can import resources" -msgstr "" - -#: recommender.py -msgid "" -"Please submit the JSON file obtained with the download resources button" -msgstr "" - -#: recommender.py -msgid "Tried to access flagged resources without staff permission" -msgstr "" diff --git a/recommender/conf/locale/zh_CN/LC_MESSAGES/text.po b/recommender/conf/locale/zh_CN/LC_MESSAGES/text.po deleted file mode 100644 index 255ca65..0000000 --- a/recommender/conf/locale/zh_CN/LC_MESSAGES/text.po +++ /dev/null @@ -1,58 +0,0 @@ -# -# Translators: -# Iris Zeng , 2016 -msgid "" -msgstr "" -"Project-Id-Version: XBlocks\n" -"POT-Creation-Date: 2016-05-27 11:04+0500\n" -"PO-Revision-Date: 2016-08-16 15:20+0000\n" -"Last-Translator: Natalia Berdnikov \n" -"Language-Team: Chinese (China) (http://www.transifex.com/open-edx/xblocks/language/zh_CN/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: zh_CN\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: recommender.py -msgid "The resource you are attempting to provide already exists" -msgstr "" - -#: recommender.py -msgid "" -"The resource you are attempting to provide has been disallowed by the staff." -" Reason: " -msgstr "" - -#: recommender.py -msgid "The selected resource does not exist" -msgstr "" - -#: recommender.py -msgid "Size of uploaded file exceeds threshold" -msgstr "" - -#: recommender.py -msgid "The configuration of pyfs is not properly set" -msgstr "" - -#: recommender.py:729 -msgid "Endorse resource without permission" -msgstr "" - -#: recommender.py -msgid "You don't have the permission to remove this resource" -msgstr "" - -#: recommender.py -msgid "Only staff can import resources" -msgstr "" - -#: recommender.py -msgid "" -"Please submit the JSON file obtained with the download resources button" -msgstr "" - -#: recommender.py -msgid "Tried to access flagged resources without staff permission" -msgstr "" diff --git a/recommender/recommender.py b/recommender/recommender.py index f4ce74c..38f9157 100644 --- a/recommender/recommender.py +++ b/recommender/recommender.py @@ -18,7 +18,6 @@ import bleach from webob.response import Response -from django.utils import translation from xblock.core import XBlock from xblock.exceptions import JsonHandlerError @@ -278,6 +277,8 @@ class RecommenderXBlock(HelperXBlock): 'url', 'title', 'description', 'descriptionText' ] + i18n_js_namespace = 'RecommenderXBlockI18N' + def _get_onetime_url(self, filename): """ Return one time url for uploaded screenshot @@ -948,19 +949,13 @@ def _construct_view_resource(self, resource): return result - @staticmethod - def _get_statici18n_js_url(): # pragma: no cover - """ - Returns the Javascript translation file for the currently selected language, if any found by `pkg_resources` - """ - lang_code = translation.get_language() - if not lang_code: - return None - text_js = 'public/js/translations/{lang_code}/text.js' - country_code = lang_code.split('-')[0] - for code in (translation.to_locale(lang_code), lang_code, country_code): - if pkg_resources.resource_exists(resource_loader.module_name, text_js.format(lang_code=code)): - return text_js.format(lang_code=code) + def _get_statici18n_js_url(self): + """Return the JavaScript translation file provided by the XBlockI18NService.""" + if i18n_service := self.runtime.service(self, 'i18n'): + if url_getter_func := getattr(i18n_service, 'get_javascript_i18n_catalog_url', None): + if javascript_url := url_getter_func(self): + return javascript_url + return None def student_view(self, _context=None): # pylint: disable=unused-argument @@ -1009,9 +1004,8 @@ def student_view(self, _context=None): # pylint: disable=unused-argument frag.add_css(self.resource_string("static/css/recommender.css")) frag.add_css(self.resource_string("static/css/introjs.css")) frag.add_javascript(self.resource_string("static/js/src/jquery.tooltipster.min.js")) - statici18n_js_url = self._get_statici18n_js_url() - if statici18n_js_url: - frag.add_javascript(self.resource_string(statici18n_js_url)) + if statici18n_js_url := self._get_statici18n_js_url(): + frag.add_javascript(statici18n_js_url) frag.add_javascript(self.resource_string("static/js/src/cats.js")) frag.add_javascript(self.resource_string("static/js/src/recommender.js")) frag.initialize_js('RecommenderXBlock', self.get_client_configuration()) @@ -1029,9 +1023,8 @@ def studio_view(self, _context=None): # pylint: disable=unused-argument )) frag.add_css(load("static/css/recommenderstudio.css")) frag.add_javascript_url("//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js") - statici18n_js_url = self._get_statici18n_js_url() - if statici18n_js_url: - frag.add_javascript(self.resource_string(statici18n_js_url)) + if statici18n_js_url := self._get_statici18n_js_url(): + frag.add_javascript(statici18n_js_url) frag.add_javascript(load("static/js/src/recommenderstudio.js")) frag.initialize_js('RecommenderXBlock') return frag diff --git a/translation_settings.py b/translation_settings.py index acc9d54..1a37f71 100644 --- a/translation_settings.py +++ b/translation_settings.py @@ -11,7 +11,7 @@ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) from __future__ import absolute_import import os -BASE_DIR = os.path.dirname(os.path.dirname(__file__)) +BASE_DIR = os.path.dirname(__file__) # Quick-start development settings - unsuitable for production @@ -81,7 +81,7 @@ ('zh_CN', 'Chinese (China)'), ] -LOCALE_PATHS = [os.path.join(BASE_DIR, "locale")] +LOCALE_PATHS = [os.path.join(BASE_DIR, "recommender", "conf", "locale")] STATICI18N_DOMAIN = 'text' STATICI18N_NAMESPACE = 'RecommenderXBlockI18N'