diff --git a/.gitignore b/.gitignore index 50cd6869f..dabb1d8c4 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ __pycache__ /.idea/ venv/ env/ +transifex_input.yaml diff --git a/.tx/config b/.tx/config deleted file mode 100644 index 7d41c9227..000000000 --- a/.tx/config +++ /dev/null @@ -1,6 +0,0 @@ -[main] -host = https://www.transifex.com - -[o:open-edx:p:edx-platform:r:tutor-contrib-aspects] -source_lang = en -type = KEYVALUEJSON diff --git a/scripts/utils.py b/scripts/utils.py index 0ad860484..256984c89 100644 --- a/scripts/utils.py +++ b/scripts/utils.py @@ -131,9 +131,10 @@ def extract_translations(root_path): An English locale file is created, which openedx-translations will send to Transifex for translation. """ - translation_file = ( - "tutoraspects/templates/aspects/apps/superset/conf/locale/en/locale.yaml" - ) + # The expectation is that this will end up at the site root, which should + # be cwd for make targets. This is a temporary file used only in the Github + # action in openedx-translations. + translation_file = "transifex_input.yaml" print("Gathering text for translations...") STRINGS = set(get_text_for_translations(root_path)) diff --git a/tutoraspects/templates/aspects/apps/superset/conf/README.md b/tutoraspects/templates/aspects/apps/superset/conf/README.md new file mode 100644 index 000000000..182ab3da5 --- /dev/null +++ b/tutoraspects/templates/aspects/apps/superset/conf/README.md @@ -0,0 +1,7 @@ +# Locale Files + +These files are managed via the OEP-58 process and should not be manually edited as they will be overwritten. The process is: + +1. A Github action on `openedx-translations` will pull this repo and run `make extract-translations` on this repo's Makefile. This pulls all translatable strings from the Superset assets. These are then uploaded to Transifex for translation. +2. As translations are updated in Transifex they will be pushed to the correct language's files in `openedx-translations`. +3. A Github action on this repo will run `make pull-translations` periodically. This will run the Atlas tool to synchronize the translation files in this directory with what is stored in `openedx-translations`. Then it will run a command to compile all of the separate translated files into one `locale.yaml` that is used to create the localized dashboard and chart strings during the Tutor init command. It will then automatically merge those changed files.