From e85415c0347c0eb042ac21cdbc1c70743a55dd8c Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Oct 20 2013 17:25:16 +0000 Subject: Update locale module of centos-art.sh script. - Previously, when you tried to localize svgz files, locale module didn't recognize svgz as render type. This update changes file processing to use svg as render type of svgz extension. - Previously, the -b option wasn't recognized by the file program inside svg_createSvgInstance function. This update changes the svg_createSvgInstance function to use the absolute path of file program. The -b option works as expected. --- diff --git a/Automation/Modules/Locale/Modules/Actions/Modules/Update/Modules/Svg/svg_createSvgInstance.sh b/Automation/Modules/Locale/Modules/Actions/Modules/Update/Modules/Svg/svg_createSvgInstance.sh index 88358c6..60c9dc3 100755 --- a/Automation/Modules/Locale/Modules/Actions/Modules/Update/Modules/Svg/svg_createSvgInstance.sh +++ b/Automation/Modules/Locale/Modules/Actions/Modules/Update/Modules/Svg/svg_createSvgInstance.sh @@ -28,7 +28,7 @@ function svg_createSvgInstance { - if [[ $(file -b -i ${SVG_FILE}) =~ '^application/x-gzip$' ]];then + if [[ $(/usr/bin/file -b -i ${SVG_FILE}) =~ '^application/x-gzip$' ]];then /bin/zcat ${SVG_FILE} > ${SVG_INSTANCE} else /bin/cat ${SVG_FILE} > ${SVG_INSTANCE} diff --git a/Automation/Modules/Locale/Modules/File/file.sh b/Automation/Modules/Locale/Modules/File/file.sh index f967709..997f7d9 100755 --- a/Automation/Modules/Locale/Modules/File/file.sh +++ b/Automation/Modules/Locale/Modules/File/file.sh @@ -60,7 +60,10 @@ function file { # Define the rendition type you want to perform. local RENDER_TYPE=${FILE_EXTENSION} - + if [[ ${RENDER_TYPE} == 'svgz' ]];then + RENDER_TYPE='svg' + fi + # Define the translation file you want to use. local -a TRANSLATIONS TRANSLATIONS[0]=${PO_FILE}