mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-17 20:09:50 +01:00
Automatically generate the qm files, and the translations qrc file
This commit is contained in:
parent
84786c7bc8
commit
0dc1a87781
@ -125,9 +125,30 @@ set(CLEMENTINE-UI
|
||||
# Resource files
|
||||
set(CLEMENTINE-RESOURCES
|
||||
../data/data.qrc
|
||||
translations.qrc
|
||||
)
|
||||
|
||||
# Translations
|
||||
file (GLOB TRANSLATIONS_FILES *.ts)
|
||||
set (FILES_TO_TRANSLATE ${CLEMENTINE-SOURCES} ${CLEMENTINE-UI} ${CLEMENTINE-MOC-HEADERS})
|
||||
|
||||
option (UPDATE_TRANSLATIONS "Update source translation translations/*.ts files
|
||||
(WARNING: make clean will delete the source .ts files! Danger!)")
|
||||
if (UPDATE_TRANSLATIONS)
|
||||
qt4_create_translation(CLEMENTINE-QM-FILES ${FILES_TO_TRANSLATE} ${TRANSLATIONS_FILES})
|
||||
else (UPDATE_TRANSLATIONS)
|
||||
qt4_add_translation(CLEMENTINE-QM-FILES ${TRANSLATIONS_FILES})
|
||||
endif (UPDATE_TRANSLATIONS)
|
||||
|
||||
# Generate a qrc file for the translations
|
||||
set(CLEMENTINE-QM-RESOURCE ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc)
|
||||
file(WRITE ${CLEMENTINE-QM-RESOURCE} "<RCC><qresource prefix=\"/translations\">")
|
||||
foreach(QM-FILE ${CLEMENTINE-QM-FILES})
|
||||
file(RELATIVE_PATH QM-RELATIVE-PATH ${CMAKE_CURRENT_BINARY_DIR} ${QM-FILE})
|
||||
file(APPEND ${CLEMENTINE-QM-RESOURCE} "<file>" ${QM-RELATIVE-PATH} "</file>")
|
||||
endforeach(QM-FILE)
|
||||
file(APPEND ${CLEMENTINE-QM-RESOURCE} "</qresource></RCC>")
|
||||
|
||||
|
||||
if(WIN32)
|
||||
set(CLEMENTINE-SOURCES ${CLEMENTINE-SOURCES} phononengine.cpp osd_win.cpp)
|
||||
set(CLEMENTINE-MOC-HEADERS ${CLEMENTINE-MOC-HEADERS} phononengine.h)
|
||||
@ -144,7 +165,7 @@ endif(APPLE)
|
||||
|
||||
qt4_wrap_cpp(CLEMENTINE-SOURCES-MOC ${CLEMENTINE-MOC-HEADERS})
|
||||
qt4_wrap_ui(CLEMENTINE-SOURCES-UI ${CLEMENTINE-UI})
|
||||
qt4_add_resources(CLEMENTINE-SOURCES-RESOURCE ${CLEMENTINE-RESOURCES})
|
||||
qt4_add_resources(CLEMENTINE-SOURCES-RESOURCE ${CLEMENTINE-RESOURCES} ${CLEMENTINE-QM-RESOURCE})
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
@ -158,6 +179,7 @@ add_library(clementine_lib
|
||||
${CLEMENTINE-SOURCES-MOC}
|
||||
${CLEMENTINE-SOURCES-UI}
|
||||
${CLEMENTINE-SOURCES-RESOURCE}
|
||||
${CLEMENTINE-QM-FILES}
|
||||
)
|
||||
target_link_libraries(clementine_lib
|
||||
${QT_LIBRARIES}
|
||||
|
Binary file not shown.
@ -81,6 +81,25 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CoverManager</name>
|
||||
<message>
|
||||
<source>Cover Manager</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter search terms here</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fetch Missing Covers</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditTagDialog</name>
|
||||
<message>
|
||||
@ -571,6 +590,18 @@ p, li { white-space: pre-wrap; }
|
||||
<source>Configure &Global Shortcuts...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter search terms here</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Tools</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cover Manager</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultiLoadingIndicator</name>
|
||||
@ -843,14 +874,6 @@ p, li { white-space: pre-wrap; }
|
||||
<source>&Defaults</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Shortcut for Selected Action</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
Binary file not shown.
@ -64,6 +64,25 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CoverManager</name>
|
||||
<message>
|
||||
<source>Cover Manager</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter search terms here</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fetch Missing Covers</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditTagDialog</name>
|
||||
<message>
|
||||
@ -554,6 +573,18 @@ p, li { white-space: pre-wrap; }
|
||||
<source>Configure &Global Shortcuts...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter search terms here</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Tools</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cover Manager</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultiLoadingIndicator</name>
|
||||
@ -826,14 +857,6 @@ p, li { white-space: pre-wrap; }
|
||||
<source>&Defaults</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Shortcut for Selected Action</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
Binary file not shown.
@ -63,6 +63,25 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Сохранить поток на вкладке Радио</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CoverManager</name>
|
||||
<message>
|
||||
<source>Cover Manager</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter search terms here</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>View</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fetch Missing Covers</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditTagDialog</name>
|
||||
<message>
|
||||
@ -549,6 +568,18 @@ p, li { white-space: pre-wrap; }
|
||||
<source>Configure &Global Shortcuts...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter search terms here</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Tools</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cover Manager</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MultiLoadingIndicator</name>
|
||||
@ -821,14 +852,6 @@ p, li { white-space: pre-wrap; }
|
||||
<source>&Defaults</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Shortcut for Selected Action</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
1111
src/clementine_sk.ts
Normal file
1111
src/clementine_sk.ts
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,7 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/translations">
|
||||
<file>clementine_el.qm</file>
|
||||
<file>clementine_es.qm</file>
|
||||
<file>clementine_ru.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
Loading…
Reference in New Issue
Block a user