From c9ca88d43bd4e87d5ed0af795c40f4b89459d7e7 Mon Sep 17 00:00:00 2001 From: Shadi Naif Date: Tue, 9 May 2023 17:19:50 +0300 Subject: [PATCH] feat: standardize make extract_translations (#232) * Create translation directory conf/locale. This is the default used one in openedx-translations * Remove locale directory. It's not actually used. It was added when completion is stripped out of edx-platform, there is no local translation, and there is no translation project named completion in transifex * Update make extract_translations to use django-admin instead of manage.py Refs: FC-0012 OEP-58 --- .gitignore | 1 + Makefile | 6 +-- completion/conf/locale/config.yaml | 4 ++ locale/config.yaml | 72 ------------------------------ 4 files changed, 8 insertions(+), 75 deletions(-) create mode 100644 completion/conf/locale/config.yaml delete mode 100644 locale/config.yaml diff --git a/.gitignore b/.gitignore index 4d7cc31..6a97704 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ htmlcov/ # Translations *.mo +completion/conf/locale/*/LC_MESSAGES/* # IDEs and text editors *~ diff --git a/Makefile b/Makefile index 2e89235..5a6c4a3 100644 --- a/Makefile +++ b/Makefile @@ -86,11 +86,11 @@ selfcheck: ## check that the Makefile is well-formed extract_translations: ## extract strings to be translated, outputting .mo files rm -rf docs/_build - cd completion && ../manage.py makemessages -l en -v1 -d django - cd completion && ../manage.py makemessages -l en -v1 -d djangojs + cd completion && django-admin makemessages -l en -v1 -d django + cd completion && django-admin makemessages -l en -v1 -d djangojs compile_translations: ## compile translation files, outputting .po files for each supported language - cd completion && ../manage.py compilemessages + cd completion && django-admin compilemessages detect_changed_source_translations: cd completion && i18n_tool changed diff --git a/completion/conf/locale/config.yaml b/completion/conf/locale/config.yaml new file mode 100644 index 0000000..a968d94 --- /dev/null +++ b/completion/conf/locale/config.yaml @@ -0,0 +1,4 @@ +# Configuration for i18n workflow. + +locales: + - en # English - Source Language diff --git a/locale/config.yaml b/locale/config.yaml deleted file mode 100644 index dbfee82..0000000 --- a/locale/config.yaml +++ /dev/null @@ -1,72 +0,0 @@ -# Configuration for i18n workflow. - -locales: - - en # English - Source Language - - ar # Arabic - - az # Azerbaijani - - bg_BG # Bulgarian (Bulgaria) - - bn_BD # Bengali (Bangladesh) - - bn_IN # Bengali (India) - - bs # Bosnian - - ca # Catalan - - ca@valencia # Catalan (Valencia) - - cs # Czech - - cy # Welsh - - da # Danish - - de_DE # German (Germany) - - el # Greek - - en@lolcat # LOLCAT English - - en@pirate # Pirate English - - es_419 # Spanish (Latin America) - - es_AR # Spanish (Argentina) - - es_EC # Spanish (Ecuador) - - es_ES # Spanish (Spain) - - es_MX # Spanish (Mexico) - - es_PE # Spanish (Peru) - - et_EE # Estonian (Estonia) - - eu_ES # Basque (Spain) - - fa # Persian - - fa_IR # Persian (Iran) - - fi_FI # Finnish (Finland) - - fr # French - - gl # Galician - - gu # Gujarati - - he # Hebrew - - hi # Hindi - - hr # Croatian - - hu # Hungarian - - hy_AM # Armenian (Armenia) - - id # Indonesian - - it_IT # Italian (Italy) - - ja_JP # Japanese (Japan) - - kk_KZ # Kazakh (Kazakhstan) - - km_KH # Khmer (Cambodia) - - kn # Kannada - - ko_KR # Korean (Korea) - - lt_LT # Lithuanian (Lithuania) - - ml # Malayalam - - mn # Mongolian - - ms # Malay - - nb # Norwegian Bokmål - - ne # Nepali - - nl_NL # Dutch (Netherlands) - - or # Oriya - - pl # Polish - - pt_BR # Portuguese (Brazil) - - pt_PT # Portuguese (Portugal) - - ro # Romanian - - ru # Russian - - si # Sinhala - - sk # Slovak - - sl # Slovenian - - th # Thai - - tr_TR # Turkish (Turkey) - - uk # Ukranian - - ur # Urdu - - vi # Vietnamese - - zh_CN # Chinese (China) - - zh_TW # Chinese (Taiwan) - -# The locales used for fake-accented English, for testing. -dummy_locales: - - eo