From 425a1df865c8063f3f0bf8f2e0c544cd1d1e4536 Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Wed, 23 Dec 2015 13:29:11 +0100 Subject: [PATCH 1/3] Fixing i18n build and install * removes custom target copy-translations * updating TODO to remove the language list with a nice algorithmus * renaming file to po_file in foreach-loop * etc. --- CMakeLists.txt | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cc4edf79b4..f3edadff74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,9 +24,8 @@ if(NOT ${URANIUM_SCRIPTS_DIR} STREQUAL "") # build directory to the source resources directory. This is mostly a convenience # during development, normally you want to simply use the install target to install # the files along side the rest of the application. - add_custom_target(copy-translations) - #TODO: Properly install the built files. This should be done after we move the applications out of the Uranium repo. + #TODO: Find a way to get a rid of this list of languages. set(languages en x-test @@ -41,19 +40,13 @@ if(NOT ${URANIUM_SCRIPTS_DIR} STREQUAL "") bg ) foreach(lang ${languages}) - file(GLOB po_files resources/i18n/${lang}/*.po) - foreach(file ${po_files}) - string(REGEX REPLACE ".*/(.*).po" "${lang}/\\1.mo" mofile ${file}) - add_custom_command(TARGET translations POST_BUILD COMMAND mkdir ARGS -p ${lang} COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} ARGS ${file} -o ${mofile}) + file(GLOB po_files ${CMAKE_SOURCE_DIR}/resources/i18n/${lang}/*.po) + foreach(po_file ${po_files}) + string(REGEX REPLACE ".*/(.*).po" "${CMAKE_BINARY_DIR}/resources/i18n/${lang}/LC_MESSAGES/\\1.mo" mo_file ${po_file}) + add_custom_command(TARGET translations POST_BUILD COMMAND mkdir ARGS -p ${CMAKE_BINARY_DIR}/resources/i18n/${lang}/LC_MESSAGES/ COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} ARGS ${po_file} -o ${mo_file}) endforeach() - - file(GLOB mo_files ${CMAKE_BINARY_DIR}/${lang}/*.mo) - foreach(file ${mo_files}) - add_custom_command(TARGET copy-translations POST_BUILD COMMAND mkdir ARGS -p ${CMAKE_SOURCE_DIR}/resources/i18n/${lang}/LC_MESSAGES/ COMMAND cp ARGS ${file} ${CMAKE_SOURCE_DIR}/resources/i18n/${lang}/LC_MESSAGES/ COMMENT "Copying ${file}...") - endforeach() - - install(FILES ${mo_files} DESTINATION ${CMAKE_INSTALL_DATADIR}/uranium/resources/i18n/${lang}/LC_MESSAGES/) endforeach() + install(DIRECTORY ${CMAKE_BINARY_DIR}/resources DESTINATION ${CMAKE_INSTALL_DATADIR}/cura) endif() endif() From 7115cd6bc22c0a03ff3b767150095debd57ff021 Mon Sep 17 00:00:00 2001 From: Tamara Hogenhout Date: Thu, 7 Jan 2016 13:32:04 +0100 Subject: [PATCH 2/3] Revert "Removes certain symbols that give problems with the extract-json script" This reverts commit 9f61bff08ff61f58377121899259ffe23a34bb74. --- resources/machines/fdmprinter.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 3929bf3561..49ef7bb0cc 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -591,7 +591,7 @@ }, "material_flow_temp_graph": { "label": "Flow Temperature Graph", - "description": "Data linking material flow (in mm/s) to temperature (degrees Celsius).", + "description": "Data linking material flow (in mm³/s) to temperature (°C).", "unit": "", "type": "string", "default": "[[3.5,200],[7.0,240]]", @@ -1695,7 +1695,7 @@ }, "magic_spiralize": { "label": "Spiralize Outer Contour", - "description": "Spiralize smooths out the Z move of the outer edge. This will create a steady Z increase over the whole print. This feature turns a solid object into a single walled print with a solid bottom. This feature used to be called Joris in older versions.", + "description": "Spiralize smooths out the Z move of the outer edge. This will create a steady Z increase over the whole print. This feature turns a solid object into a single walled print with a solid bottom. This feature used to be called ‘Joris’ in older versions.", "type": "boolean", "default": false, "visible": false From be79358f0b5ff21c34df3b84a7e7dce71298cd9e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 7 Jan 2016 17:28:01 +0100 Subject: [PATCH 3/3] Fixed scale to max (forgot to substract & add skirt size) CURA-435 --- cura/BuildVolume.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index 9879a6209b..c7d5962c77 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -152,10 +152,10 @@ class BuildVolume(SceneNode): # As this works better for UM machines, we only add the dissallowed_area_size for the z direction. # This is probably wrong in all other cases. TODO! - # The +2 and -2 is added as there is always a bit of extra room required to work properly. + # The +1 and -1 is added as there is always a bit of extra room required to work properly. scale_to_max_bounds = AxisAlignedBox( - minimum = Vector(min_w + skirt_size + 2, min_h, min_d + disallowed_area_size), - maximum = Vector(max_w - skirt_size - 2, max_h, max_d - disallowed_area_size) + minimum = Vector(min_w + skirt_size + 1, min_h, min_d + disallowed_area_size - skirt_size + 1), + maximum = Vector(max_w - skirt_size - 1, max_h, max_d - disallowed_area_size + skirt_size - 1) ) Application.getInstance().getController().getScene()._maximum_bounds = scale_to_max_bounds