From cd3d3834bedf9bfc795a30c019a42c90ecf0a07b Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 19 Jul 2023 10:43:40 +1000 Subject: [PATCH] Update translate task (#5283) - Allow for skipping of building static files - CI workflow does not have node / etc / installed --- .github/workflows/translations.yml | 2 +- tasks.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml index 52d0398102..e51d06ba57 100644 --- a/.github/workflows/translations.yml +++ b/.github/workflows/translations.yml @@ -34,7 +34,7 @@ jobs: invoke install - name: Make Translations run: | - invoke translate + invoke translate --skip-static - name: Commit files run: | git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" diff --git a/tasks.py b/tasks.py index 9017782261..67ce83ab47 100644 --- a/tasks.py +++ b/tasks.py @@ -223,8 +223,8 @@ def translate_stats(c): c.run(f'python3 {path}') -@task(post=[translate_stats, static]) -def translate(c): +@task(post=[translate_stats]) +def translate(c, skip_static=False): """Rebuild translation source files. Advanced use only! Note: This command should not be used on a local install, @@ -234,6 +234,10 @@ def translate(c): manage(c, "makemessages --all -e py,html,js --no-wrap") manage(c, "compilemessages") + if not skip_static: + # Update static files + static(c) + @task def backup(c):