From 981b7906ec7b7d935782c219fb88079d0952cbb9 Mon Sep 17 00:00:00 2001 From: Shadi Naif Date: Thu, 27 Apr 2023 17:33:47 +0300 Subject: [PATCH] feat: standardize make extract_translations Refs: FC-0012 OEP-58 --- .gitignore | 3 ++ Makefile | 8 +++--- locale/config.yaml | 72 ---------------------------------------------- 3 files changed, 7 insertions(+), 76 deletions(-) delete mode 100644 locale/config.yaml diff --git a/.gitignore b/.gitignore index 34c1b526..f98a7bfc 100644 --- a/.gitignore +++ b/.gitignore @@ -71,3 +71,6 @@ edx_ace/tests/__init__.py default.db .hypothesis + +# Translation +edx_ace/conf/locale/*/LC_MESSAGES/* diff --git a/Makefile b/Makefile index d858254a..1738f422 100644 --- a/Makefile +++ b/Makefile @@ -88,14 +88,14 @@ write-pylintrc: extract_translations: ## extract strings to be translated, outputting .mo files rm -rf docs/_build - cd edx-ace && ../manage.py makemessages -l en -v1 -d django - cd edx-ace && ../manage.py makemessages -l en -v1 -d djangojs + cd edx_ace && django-admin makemessages -l en -v1 -d django + cd edx_ace && django-admin makemessages -l en -v1 -d djangojs compile_translations: ## compile translation files, outputting .po files for each supported language - cd edx-ace && ../manage.py compilemessages + cd edx_ace && django-admin compilemessages detect_changed_source_translations: - cd edx-ace && i18n_tool changed + cd edx_ace && i18n_tool changed pull_translations: ## pull translations from Transifex tx pull -t -a -f --mode reviewed diff --git a/locale/config.yaml b/locale/config.yaml deleted file mode 100644 index dbfee823..00000000 --- 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