From ae653e56493826003454cb5b7ce18b129bcbf604 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 29 Jun 2025 22:06:52 +1000 Subject: [PATCH] Fix for invoke dev.translate task (#9900) - This task is used for syncing translations with crowdin - However, it has been broken for some time, and does not *extract* translations - Thus, no *new* translations have been uploaded to crowdin recently --- tasks.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tasks.py b/tasks.py index 670e9e8b5b..ab9af72bd7 100644 --- a/tasks.py +++ b/tasks.py @@ -640,7 +640,7 @@ def translate(c, ignore_static=False, no_frontend=False): manage(c, 'compilemessages') if not no_frontend and node_available(): - frontend_compile(c) + frontend_compile(c, extract=True) # Update static files if not ignore_static: @@ -1525,17 +1525,18 @@ def frontend_check(c): print(node_available()) -@task +@task(help={'extract': 'Extract translation strings. Default: False'}) @state_logger('TASK06') -def frontend_compile(c): +def frontend_compile(c, extract: bool = False): """Generate react frontend. - Args: + Arguments: c: Context variable + extract (bool): Whether to extract translations from source code. Defaults to False. """ info('Compiling frontend code...') frontend_install(c) - frontend_trans(c, extract=False) + frontend_trans(c, extract=extract) frontend_build(c) success('Frontend compilation complete')