Add language defaults for first-run experience and introduce Qt tool command wrapper

This commit sets default languages to English for the application unless the user specifies a different language, ensuring a consistent first-run experience across different system locales. Additionally, a wrapper for Qt tools is introduced in the CMake configuration for non-Windows platforms to filter out non-actionable output during builds.
This commit is contained in:
2026-01-22 14:48:03 +09:00
parent 49cd7a6210
commit 484ce3f737
3 changed files with 39 additions and 0 deletions

View File

@@ -1530,6 +1530,13 @@ endif()
if(HAVE_TRANSLATIONS)
option(TRANSLATIONS_VERBOSE "Show verbose output while generating .qm translation files" OFF)
# On non-Windows platforms Qt doesn't need a PATH-setup wrapper for tools, but we can
# provide a wrapper to filter non-actionable lrelease noise during normal builds.
if(NOT CMAKE_HOST_WIN32)
set(QT_TOOL_COMMAND_WRAPPER_PATH "${CMAKE_SOURCE_DIR}/cmake/qt_tool_wrapper.sh"
CACHE INTERNAL "Wrapper used when invoking Qt tools from CMake" FORCE
)
endif()
qt_add_lupdate(strawberry_lib TS_FILES "${CMAKE_SOURCE_DIR}/src/translations/strawberry_en_US.ts" OPTIONS -locations none -no-ui-lines -no-obsolete)
file(GLOB_RECURSE ts_files ${CMAKE_SOURCE_DIR}/src/translations/*.ts)
set_source_files_properties(${ts_files} PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/data")