Commit c77dbb88 authored by Jan Möbius's avatar Jan Möbius

Refactor some CoreApp translation block

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6708 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 80e8afe8
...@@ -44,8 +44,6 @@ acg_append_files (headers "*.hh" ${directories}) ...@@ -44,8 +44,6 @@ acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories}) acg_append_files (sources "*.cc" ${directories})
acg_append_files (ui "*.ui" ${directories}) acg_append_files (ui "*.ui" ${directories})
set (COREAPP_FILES_TO_TRANSLATE ${COREAPP_FILES_TO_TRANSLATE} ${sources} ${ui} ${headers})
# remove template cc files from source file list # remove template cc files from source file list
acg_drop_templates (sources) acg_drop_templates (sources)
...@@ -65,17 +63,6 @@ else () ...@@ -65,17 +63,6 @@ else ()
acg_add_executable (OpenFlipper ${uic_targets} ${sources} ${headers} ${moc_targets}) acg_add_executable (OpenFlipper ${uic_targets} ${sources} ${headers} ${moc_targets})
endif () endif ()
# generate/use translation files
# run with UPDATE_TRANSLATIONS set to on to build qm files
option (UPDATE_TRANSLATIONS "Update source translation translations/CoreApp_de_DE.ts files (WARNING: make clean will delete the source .ts files! Danger!)")
if (UPDATE_TRANSLATIONS)
qt4_create_translation(QM_FILES ${COREAPP_FILES_TO_TRANSLATE} translations/CoreApp_de_DE.ts )
else (UPDATE_TRANSLATIONS)
qt4_add_translation(QM_FILES translations/CoreApp_de_DE.ts )
endif (UPDATE_TRANSLATIONS)
add_custom_target (translations_target DEPENDS ${QM_FILES})
add_dependencies( OpenFlipper translations_target )
target_link_libraries (OpenFlipper target_link_libraries (OpenFlipper
OpenMeshCore OpenMeshCore
...@@ -104,9 +91,29 @@ if (APPLE) ...@@ -104,9 +91,29 @@ if (APPLE)
) )
endif () endif ()
set (COREAPP_FILES_TO_TRANSLATE ${COREAPP_FILES_TO_TRANSLATE} ${sources} ${ui} ${headers})
# generate/use translation files
# run with UPDATE_TRANSLATIONS set to on to build qm files
option (UPDATE_TRANSLATIONS "Update source translation translations/CoreApp_de_DE.ts files (WARNING: make clean will delete the source .ts files! Danger!)")
if (UPDATE_TRANSLATIONS)
qt4_create_translation(QM_FILES ${COREAPP_FILES_TO_TRANSLATE} translations/CoreApp_de_DE.ts )
else (UPDATE_TRANSLATIONS)
qt4_add_translation(QM_FILES translations/CoreApp_de_DE.ts )
endif (UPDATE_TRANSLATIONS)
# create a target for the translation files ( and object files )
# Use this target, to update only the translations
add_custom_target (translations_target_core DEPENDS ${QM_FILES})
# Build translations with the application
add_dependencies(OpenFlipper translations_target_core )
# Copy all translation files after build # Copy all translation files after build
of_copy_translations( OpenFlipper ) of_copy_translations( OpenFlipper )
# copy all needed files to "Build" directory to allow a direct execution from it # copy all needed files to "Build" directory to allow a direct execution from it
# the copy_after_build macro (common.cmake) copies the whole directory without svn files # the copy_after_build macro (common.cmake) copies the whole directory without svn files
acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Shaders" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Shaders") acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Shaders" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Shaders")
......
...@@ -274,7 +274,7 @@ Wollen sie das Plugin dennoch aktivieren?</translation> ...@@ -274,7 +274,7 @@ Wollen sie das Plugin dennoch aktivieren?</translation>
<message> <message>
<location filename="../../widgets/coreWidget/CoreWidget.cc" line="439"/> <location filename="../../widgets/coreWidget/CoreWidget.cc" line="439"/>
<source>Change View Mode</source> <source>Change View Mode</source>
<translation type="unfinished"></translation> <translation type="unfinished">Ansicht ändern</translation>
</message> </message>
<message> <message>
<location filename="../../widgets/coreWidget/CoreWidget.cc" line="479"/> <location filename="../../widgets/coreWidget/CoreWidget.cc" line="479"/>
...@@ -928,7 +928,7 @@ You can select multiple modes at the same time.</source> ...@@ -928,7 +928,7 @@ You can select multiple modes at the same time.</source>
<message> <message>
<location filename="../../widgets/optionsWidget/optionsWidget.ui" line="517"/> <location filename="../../widgets/optionsWidget/optionsWidget.ui" line="517"/>
<source>Stereo</source> <source>Stereo</source>
<translation type="unfinished"></translation> <translation type="unfinished">Stereo</translation>
</message> </message>
<message> <message>
<location filename="../../widgets/optionsWidget/optionsWidget.ui" line="523"/> <location filename="../../widgets/optionsWidget/optionsWidget.ui" line="523"/>
...@@ -1334,7 +1334,7 @@ p, li { white-space: pre-wrap; } ...@@ -1334,7 +1334,7 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location filename="../../widgets/viewModeWidget/viewMode.ui" line="13"/> <location filename="../../widgets/viewModeWidget/viewMode.ui" line="13"/>
<source>Change View Mode</source> <source>Change View Mode</source>
<translation type="unfinished"></translation> <translation type="unfinished">Ansicht ändern</translation>
</message> </message>
<message> <message>
<location filename="../../widgets/viewModeWidget/viewMode.ui" line="19"/> <location filename="../../widgets/viewModeWidget/viewMode.ui" line="19"/>
...@@ -1344,7 +1344,7 @@ p, li { white-space: pre-wrap; } ...@@ -1344,7 +1344,7 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location filename="../../widgets/viewModeWidget/viewMode.ui" line="32"/> <location filename="../../widgets/viewModeWidget/viewMode.ui" line="32"/>
<source>Remove Mode</source> <source>Remove Mode</source>
<translation type="unfinished"></translation> <translation type="unfinished">Ansicht entfernen</translation>
</message> </message>
<message> <message>
<location filename="../../widgets/viewModeWidget/viewMode.ui" line="42"/> <location filename="../../widgets/viewModeWidget/viewMode.ui" line="42"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment