mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge pull request #1978 from matmair/fix-translate
Fix translations stats - task
This commit is contained in:
commit
5bd31f11eb
22
tasks.py
22
tasks.py
@ -173,7 +173,18 @@ def static(c):
|
|||||||
manage(c, "collectstatic --no-input")
|
manage(c, "collectstatic --no-input")
|
||||||
|
|
||||||
|
|
||||||
@task(post=[static])
|
@task
|
||||||
|
def translate_stats(c):
|
||||||
|
"""
|
||||||
|
Collect translation stats.
|
||||||
|
The file generated from this is needed for the UI.
|
||||||
|
"""
|
||||||
|
|
||||||
|
path = os.path.join('InvenTree', 'script', 'translation_stats.py')
|
||||||
|
c.run(f'python3 {path}')
|
||||||
|
|
||||||
|
|
||||||
|
@task(post=[translate_stats, static])
|
||||||
def translate(c):
|
def translate(c):
|
||||||
"""
|
"""
|
||||||
Regenerate translation files.
|
Regenerate translation files.
|
||||||
@ -186,12 +197,8 @@ def translate(c):
|
|||||||
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")
|
||||||
|
|
||||||
path = os.path.join('InvenTree', 'script', 'translation_stats.py')
|
|
||||||
|
|
||||||
c.run(f'python3 {path}')
|
@task(pre=[install, migrate, translate_stats, static, clean_settings])
|
||||||
|
|
||||||
|
|
||||||
@task(pre=[install, migrate, translate, clean_settings])
|
|
||||||
def update(c):
|
def update(c):
|
||||||
"""
|
"""
|
||||||
Update InvenTree installation.
|
Update InvenTree installation.
|
||||||
@ -203,7 +210,8 @@ def update(c):
|
|||||||
|
|
||||||
- install
|
- install
|
||||||
- migrate
|
- migrate
|
||||||
- translate
|
- translate_stats
|
||||||
|
- static
|
||||||
- clean_settings
|
- clean_settings
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user