mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-03-01 02:23:56 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user