mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
P-UI: Adapt translation CI (#5299)
* Fixes up translation for P-UI Closes [FR/P-UI] Translation integration #5282 * ammended crowdin settings
This commit is contained in:
parent
2fc82fd0e3
commit
9fe77b20e4
7
.github/workflows/translations.yml
vendored
7
.github/workflows/translations.yml
vendored
@ -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"
|
||||
|
@ -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%
|
||||
|
13
tasks.py
13
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
|
||||
|
Loading…
Reference in New Issue
Block a user