diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml index e51d06ba57..a7be8e7886 100644 --- a/.github/workflows/translations.yml +++ b/.github/workflows/translations.yml @@ -26,6 +26,10 @@ jobs: uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # pin@v4.3.0 with: python-version: 3.9 + - name: Set up Node 16 + uses: actions/setup-node@969bd2663942d722d85b6a8626225850c2f7be4b # pin to v3.5.0 + with: + node-version: 16 - name: Install Dependencies run: | sudo apt-get update @@ -33,8 +37,7 @@ jobs: pip3 install invoke invoke install - name: Make Translations - run: | - invoke translate --skip-static + run: invoke translate - name: Commit files run: | git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" diff --git a/crowdin.yml b/crowdin.yml index ad69a576eb..a13e27c5d1 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -4,3 +4,5 @@ files: - source: /InvenTree/locale/en/LC_MESSAGES/django.po translation: /InvenTree/locale/%two_letters_code%/LC_MESSAGES/%original_file_name% + - source: /src/frontend/src/locales/en/messages.po + translation: /src/frontend/src/locales/%two_letters_code%/%original_file_name% diff --git a/tasks.py b/tasks.py index 903ee790de..150f891a65 100644 --- a/tasks.py +++ b/tasks.py @@ -259,7 +259,7 @@ def translate_stats(c): @task(post=[translate_stats]) -def translate(c, skip_static=False): +def translate(c): """Rebuild translation source files. Advanced use only! Note: This command should not be used on a local install, @@ -269,13 +269,12 @@ def translate(c, skip_static=False): manage(c, "makemessages --all -e py,html,js --no-wrap") manage(c, "compilemessages") - if not skip_static: - if node_available(): - frontend_trans(c) - frontend_build(c) + if node_available(): + frontend_trans(c) + frontend_build(c) - # Update static files - static(c) + # Update static files + static(c) @task