-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add
gettext
for JS translation
JS translations will not be shown fetched without directing (gettext) to the correct javascript file Refs: FC-0012 OEP-58
- Loading branch information
Showing
17 changed files
with
346 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
""" | ||
Django settings for xblock-drag-and-drop-v2 project. | ||
For more information on this file, see | ||
https://docs.djangoproject.com/en/1.11/topics/settings/ | ||
For the full list of settings and their values, see | ||
https://docs.djangoproject.com/en/1.11/ref/settings/ | ||
""" | ||
|
||
# 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__)) | ||
|
||
|
||
# Quick-start development settings - unsuitable for production | ||
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ | ||
|
||
# SECURITY WARNING: keep the secret key used in production secret! | ||
# This is just a container for running tests, it's okay to allow it to be | ||
# defaulted here if not present in environment settings | ||
SECRET_KEY = os.environ.get('SECRET_KEY', '&=@m=qyqg#l!f99ouuuinpbsv0ah001unk@q^7)bkr^^n5@q1=') | ||
|
||
# SECURITY WARNING: don't run with debug turned on in production! | ||
# This is just a container for running tests | ||
DEBUG = True | ||
|
||
TEMPLATE_DEBUG = True | ||
|
||
ALLOWED_HOSTS = [] | ||
|
||
|
||
# Application definition | ||
|
||
INSTALLED_APPS = ( | ||
'statici18n', | ||
'recommender', | ||
) | ||
|
||
# Internationalization | ||
# https://docs.djangoproject.com/en/1.11/topics/i18n/ | ||
|
||
LANGUAGE_CODE = 'en' | ||
|
||
TIME_ZONE = 'UTC' | ||
|
||
USE_I18N = True | ||
|
||
USE_L10N = True | ||
|
||
USE_TZ = True | ||
|
||
|
||
# Static files (CSS, JavaScript, Images) | ||
# https://docs.djangoproject.com/en/1.11/howto/static-files/ | ||
|
||
STATIC_URL = '/static/' | ||
|
||
# statici18n | ||
# http://django-statici18n.readthedocs.io/en/latest/settings.html | ||
|
||
LANGUAGES = [ | ||
('ar', 'Arabic'), | ||
('de', 'German'), | ||
('en', 'English - Source Language'), | ||
('eo', 'Esperanto'), | ||
('es_419', 'Spanish (Latin America)'), | ||
('fr', 'French'), | ||
('he', 'Hebrew'), | ||
('hi', 'Hindi'), | ||
('it', 'Italian'), | ||
('ja', 'Japanese'), | ||
('ko', 'Korean (Korea)'), | ||
('nl', 'Dutch'), | ||
('pl', 'Polski'), | ||
('pt_BR', 'Portuguese (Brazil)'), | ||
('pt_PT', 'Portuguese (Portugal)'), | ||
('ru', 'Russian'), | ||
('tr', 'Turkish'), | ||
('zh_CN', 'Chinese (China)'), | ||
] | ||
|
||
LOCALE_PATHS = [os.path.join(BASE_DIR, "locale")] | ||
|
||
STATICI18N_DOMAIN = 'text' | ||
STATICI18N_NAMESPACE = 'RecommenderXBlockI18N' | ||
STATICI18N_PACKAGES = ( | ||
'recommender', | ||
) | ||
STATICI18N_ROOT = 'recommender/public/js' | ||
STATICI18N_OUTPUT_DIR = 'translations' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import sys | ||
from django.core.management import execute_from_command_line | ||
|
||
if __name__ == "__main__": | ||
os.environ.setdefault( | ||
"DJANGO_SETTINGS_MODULE", | ||
"dev_settings" | ||
) | ||
|
||
execute_from_command_line(sys.argv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,6 @@ | |
|
||
locales: | ||
- en # English - Source Language | ||
|
||
ignore_dirs: | ||
- public |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
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 "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ mako | |
simplejson | ||
webob | ||
web_fragments | ||
edx-i18n-tools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.