mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-02-10 19:52:24 +00:00
linux(i18n): add Turkish translations (#361)
* linux(i18n): add Turkish translations - Add Qt Linguist translation infrastructure to CMakeLists.txt - Wrap UI strings with qsTr() in Main.qml - Wrap menu strings with tr() in trayiconmanager.cpp - Add QTranslator loader in main.cpp for automatic locale detection - Create Turkish translation file (librepods_tr.ts) Translations include: - Main window: connection status, noise control modes, settings - Tray menu: all menu items and tooltips - System notifications * fix: allocate QTranslator on heap to ensure lifetime
This commit is contained in:
@@ -4,13 +4,18 @@ project(linux VERSION 0.1 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS Quick Widgets Bluetooth DBus)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Quick Widgets Bluetooth DBus LinguistTools)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(PULSEAUDIO REQUIRED libpulse)
|
||||
|
||||
qt_standard_project_setup()
|
||||
|
||||
# Translation files
|
||||
set(TS_FILES
|
||||
translations/librepods_tr.ts
|
||||
)
|
||||
|
||||
qt_add_executable(librepods
|
||||
main.cpp
|
||||
logger.h
|
||||
@@ -85,3 +90,13 @@ install(FILES assets/me.kavishdevar.librepods.desktop
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
||||
install(FILES assets/librepods.png
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps")
|
||||
|
||||
# Translation support
|
||||
qt_add_translations(librepods
|
||||
TS_FILES ${TS_FILES}
|
||||
QM_FILES_OUTPUT_VARIABLE QM_FILES
|
||||
)
|
||||
|
||||
# Install translation files
|
||||
install(FILES ${QM_FILES}
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/librepods/translations")
|
||||
|
||||
Reference in New Issue
Block a user