Merge branch '2.1' of https://github.com/Ultimaker/Cura into 2.1

This commit is contained in:
Jaime van Kessel 2016-01-07 17:28:42 +01:00
commit 9c8d997f88
2 changed files with 9 additions and 13 deletions

View File

@ -24,9 +24,8 @@ if(NOT ${URANIUM_SCRIPTS_DIR} STREQUAL "")
# build directory to the source resources directory. This is mostly a convenience # 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 # during development, normally you want to simply use the install target to install
# the files along side the rest of the application. # 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 set(languages
en en
x-test x-test
@ -41,19 +40,13 @@ if(NOT ${URANIUM_SCRIPTS_DIR} STREQUAL "")
bg bg
) )
foreach(lang ${languages}) foreach(lang ${languages})
file(GLOB po_files resources/i18n/${lang}/*.po) file(GLOB po_files ${CMAKE_SOURCE_DIR}/resources/i18n/${lang}/*.po)
foreach(file ${po_files}) foreach(po_file ${po_files})
string(REGEX REPLACE ".*/(.*).po" "${lang}/\\1.mo" mofile ${file}) 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 ${lang} COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} ARGS ${file} -o ${mofile}) 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() 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() endforeach()
install(DIRECTORY ${CMAKE_BINARY_DIR}/resources DESTINATION ${CMAKE_INSTALL_DATADIR}/cura)
endif() endif()
endif() endif()

View File

@ -1388,6 +1388,8 @@
"type": "float", "type": "float",
"unit": "mm", "unit": "mm",
"default": 5.0, "default": 5.0,
"min_value": "0.0",
"max_value_warning": "100.0",
"enabled": "adhesion_type == \"brim\"", "enabled": "adhesion_type == \"brim\"",
"children": { "children": {
"brim_line_count": { "brim_line_count": {
@ -1395,6 +1397,7 @@
"description": "The number of lines used for a brim. More lines means a larger brim which sticks better to the build plate, but this also makes your effective print area smaller.", "description": "The number of lines used for a brim. More lines means a larger brim which sticks better to the build plate, but this also makes your effective print area smaller.",
"type": "int", "type": "int",
"default": 13, "default": 13,
"min_value": "0",
"inherit_function": "math.ceil(parent_value / skirt_line_width)", "inherit_function": "math.ceil(parent_value / skirt_line_width)",
"enabled": "adhesion_type == \"brim\"" "enabled": "adhesion_type == \"brim\""
} }