multilanguage: compile QM in scons (#25217)

* All in scons

* delete all this

* delete the qm files

* No need to check QM files in test_translations.py anymore

* readme

* add lupdate to third party

* fix

* one line

* update files_common

* readme imp

* add j flag

* add to path

* duplicate scons!

* update readme

* fix path

fix path

fix path

* no path
This commit is contained in:
Shane Smiskol
2022-07-20 18:44:47 -07:00
committed by GitHub
parent c875f540a8
commit c528decd17
12 changed files with 30 additions and 27 deletions

View File

@@ -63,6 +63,13 @@ if GetOption('test'):
qt_env.Program('tests/test_translations', [asset_obj, 'tests/test_runner.cc', 'tests/test_translations.cc'] + qt_src, LIBS=qt_libs)
# build translation files
translation_sources = Glob("#selfdrive/ui/translations/*.ts", strings=True)
translation_targets = [src.replace(".ts", ".qm") for src in translation_sources]
lrelease = 'third_party/qt5/larch64/bin/lrelease' if arch == 'larch64' else 'lrelease'
qt_env.Command(translation_targets, translation_sources, f"{lrelease} $SOURCES")
# setup and factory resetter
if GetOption('extras'):
qt_env.Program("qt/setup/reset", ["qt/setup/reset.cc"], LIBS=qt_libs)