From c77dbb88bd877e1af727a2e6418fabb14fac3ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Tue, 4 Aug 2009 11:15:20 +0000 Subject: [PATCH] Refactor some CoreApp translation block git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6708 383ad7c9-94d9-4d36-a494-682f7c89f535 --- CoreApp/CMakeLists.txt | 33 ++++++++++++++++----------- CoreApp/translations/CoreApp_de_DE.ts | 8 +++---- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/CoreApp/CMakeLists.txt b/CoreApp/CMakeLists.txt index 554fdca6..2f3899c5 100644 --- a/CoreApp/CMakeLists.txt +++ b/CoreApp/CMakeLists.txt @@ -44,8 +44,6 @@ acg_append_files (headers "*.hh" ${directories}) acg_append_files (sources "*.cc" ${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 acg_drop_templates (sources) @@ -65,17 +63,6 @@ else () acg_add_executable (OpenFlipper ${uic_targets} ${sources} ${headers} ${moc_targets}) 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 OpenMeshCore @@ -104,9 +91,29 @@ if (APPLE) ) 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 of_copy_translations( OpenFlipper ) + + # 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 acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Shaders" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Shaders") diff --git a/CoreApp/translations/CoreApp_de_DE.ts b/CoreApp/translations/CoreApp_de_DE.ts index e79e39d4..5ff4838a 100644 --- a/CoreApp/translations/CoreApp_de_DE.ts +++ b/CoreApp/translations/CoreApp_de_DE.ts @@ -274,7 +274,7 @@ Wollen sie das Plugin dennoch aktivieren? Change View Mode - + Ansicht ändern @@ -928,7 +928,7 @@ You can select multiple modes at the same time. Stereo - + Stereo @@ -1334,7 +1334,7 @@ p, li { white-space: pre-wrap; } Change View Mode - + Ansicht ändern @@ -1344,7 +1344,7 @@ p, li { white-space: pre-wrap; } Remove Mode - + Ansicht entfernen -- GitLab