mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +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
|
uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # pin@v4.3.0
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
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
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@ -33,8 +37,7 @@ jobs:
|
|||||||
pip3 install invoke
|
pip3 install invoke
|
||||||
invoke install
|
invoke install
|
||||||
- name: Make Translations
|
- name: Make Translations
|
||||||
run: |
|
run: invoke translate
|
||||||
invoke translate --skip-static
|
|
||||||
- name: Commit files
|
- name: Commit files
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
@ -4,3 +4,5 @@
|
|||||||
files:
|
files:
|
||||||
- source: /InvenTree/locale/en/LC_MESSAGES/django.po
|
- source: /InvenTree/locale/en/LC_MESSAGES/django.po
|
||||||
translation: /InvenTree/locale/%two_letters_code%/LC_MESSAGES/%original_file_name%
|
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%
|
||||||
|
3
tasks.py
3
tasks.py
@ -259,7 +259,7 @@ def translate_stats(c):
|
|||||||
|
|
||||||
|
|
||||||
@task(post=[translate_stats])
|
@task(post=[translate_stats])
|
||||||
def translate(c, skip_static=False):
|
def translate(c):
|
||||||
"""Rebuild translation source files. Advanced use only!
|
"""Rebuild translation source files. Advanced use only!
|
||||||
|
|
||||||
Note: This command should not be used on a local install,
|
Note: This command should not be used on a local install,
|
||||||
@ -269,7 +269,6 @@ def translate(c, skip_static=False):
|
|||||||
manage(c, "makemessages --all -e py,html,js --no-wrap")
|
manage(c, "makemessages --all -e py,html,js --no-wrap")
|
||||||
manage(c, "compilemessages")
|
manage(c, "compilemessages")
|
||||||
|
|
||||||
if not skip_static:
|
|
||||||
if node_available():
|
if node_available():
|
||||||
frontend_trans(c)
|
frontend_trans(c)
|
||||||
frontend_build(c)
|
frontend_build(c)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user