Translations plugin for Tutor
Project description
This plugin allows adding or overriding translations strings easily from the config.yml.
Installation
pip install tutor-contrib-translations
Usage
First, enable the plugin with
tutor plugins enable translations
Translations are handled in a different way in the legacy Django HTML pages and and in the MFEs.
Translating DJANGO legacy pages
Add a TRANSLATIONS_OPENEDX entry to the configuration file. Then add a key for each language in lower case. Finally add as many items as needed using the original string in english as key and the translated text as value.
E.g.:
TRANSLATIONS_OPENEDX: es: "Courses": "Cursos" "Certificate": "Certificado"
Translating MFE
Similarly, create an entry named TRANSLATIONS_MFE_<mfe name>. Then add a key for each language in lower case. Finally add as many items as needed using the original string in english as key and the translated text as value.
E.g.:
TRANSLATIONS_MFE_LEARNING: es: "Courses": "Cursos" "Certificate": "Certificado"
Save the configuration to apply the translations. Finally, rebuild the openedx and or mfe images where the translations have changed.
License
This software is licensed under the terms of the AGPLv3.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tutor_contrib_translations-17.0.0.tar.gz
.
File metadata
- Download URL: tutor_contrib_translations-17.0.0.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e36d5efd59db0d54fe52c71f9116a76a3910fb04a1b721d2f767b635093d1503 |
|
MD5 | f21c2dc9d9104f4481bf5c34170a4b1c |
|
BLAKE2b-256 | 4905e24e634ad4f63cf3ba3b08f835cffcb47cf4a23f3029b1cd66a2e5515429 |
File details
Details for the file tutor_contrib_translations-17.0.0-py3-none-any.whl
.
File metadata
- Download URL: tutor_contrib_translations-17.0.0-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bb2c9373510b6189c73fafd6ae60a31d729f2e5a438c7deac7a0f196ad7f227 |
|
MD5 | 119d77756264ac922cc293c047d3b0f1 |
|
BLAKE2b-256 | 05606fcf09aedb6395bbf6589481ac24db865e9005b78d738836022c50c7e3f6 |