Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Matena <lukasmatena@seznam.cz>2022-02-24 14:55:53 +0300
committerLukas Matena <lukasmatena@seznam.cz>2022-02-24 15:05:05 +0300
commite058f794d9eb14e89d2d32b8b459438b0854be56 (patch)
treecd0ed4d4929bdec954d12ffbf12e71f6ca792c6f /CMakeLists.txt
parent3cd15ac005287f1d12aa63c6fb072fb8acc3170b (diff)
parent54b2c67e75c9b992c6929b7b32b2f1f98bb38b44 (diff)
Merge branch 'stable'
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt30
1 files changed, 18 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c6afe671..679f2ef1a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -523,21 +523,28 @@ add_custom_target(gettext_make_pot
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Generate pot file from strings in the source tree"
)
-add_custom_target(gettext_merge_po_with_pot
+
+add_custom_target(gettext_merge_community_po_with_pot
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
- COMMENT "Merge localization po with new generted pot file"
+ COMMENT "Merge community po with new generated pot file"
)
file(GLOB L10N_PO_FILES "${L10N_DIR}/*/PrusaSlicer*.po")
+# list of names of directories, which are licalized by PS internally
+list(APPEND PS_L10N_DIRS "cs" "de" "es" "fr" "it" "ja" "pl")
foreach(po_file ${L10N_PO_FILES})
- #GET_FILENAME_COMPONENT(po_dir "${po_file}" DIRECTORY)
- #SET(po_new_file "${po_dir}/PrusaSlicer_.po")
- add_custom_command(
- TARGET gettext_merge_po_with_pot PRE_BUILD
- COMMAND msgmerge -N -o ${po_file} ${po_file} "${L10N_DIR}/PrusaSlicer.pot"
- # delete obsolete lines from resulting PO to avoid conflicts after a merging of it with wxWidgets.po
- COMMAND msgattrib --no-obsolete -o ${po_file} ${po_file}
- DEPENDS ${po_file}
- )
+ GET_FILENAME_COMPONENT(po_dir "${po_file}" DIRECTORY)
+ GET_FILENAME_COMPONENT(po_dir_name "${po_dir}" NAME)
+ list(FIND PS_L10N_DIRS ${po_dir_name} found_dir_id)
+ # found_dir_id==-1 means that po_dir_name wasn't found in PS_L10N_DIRS
+ if(found_dir_id LESS 0)
+ add_custom_command(
+ TARGET gettext_merge_community_po_with_pot PRE_BUILD
+ COMMAND msgmerge -N -o ${po_file} ${po_file} "${L10N_DIR}/PrusaSlicer.pot"
+ # delete obsolete lines from resulting PO to avoid conflicts after a merging of it with wxWidgets.po
+ COMMAND msgattrib --no-obsolete -o ${po_file} ${po_file}
+ DEPENDS ${po_file}
+ )
+ endif()
endforeach()
add_custom_target(gettext_concat_wx_po_with_po
@@ -545,7 +552,6 @@ add_custom_target(gettext_concat_wx_po_with_po
COMMENT "Concatenate and merge wxWidgets localization po with PrusaSlicer po file"
)
file(GLOB L10N_PO_FILES "${L10N_DIR}/*/PrusaSlicer*.po")
-file(GLOB L10N_WX_PO_FILES "${L10N_DIR}/*/PrusaSlicer*.po")
foreach(po_file ${L10N_PO_FILES})
GET_FILENAME_COMPONENT(po_dir "${po_file}" DIRECTORY)
GET_FILENAME_COMPONENT(po_dir_name "${po_dir}" NAME)