diff --git a/Automation/Modules/Render/Modules/Asciidoc/asciidoc_setXhtmlRendition.sh b/Automation/Modules/Render/Modules/Asciidoc/asciidoc_setXhtmlRendition.sh index 74378e4..8459aa7 100755 --- a/Automation/Modules/Render/Modules/Asciidoc/asciidoc_setXhtmlRendition.sh +++ b/Automation/Modules/Render/Modules/Asciidoc/asciidoc_setXhtmlRendition.sh @@ -5,8 +5,8 @@ function asciidoc_setXhtmlRendition { local TARGET="${1}" RENDER_PAGES=$(tcar_getConfigValue "${CONFIGURATION}" "${SECTION}" "render-page") - if [[ -z ${RENDER_PAGE} ]];then - RENDER_PAGE='single' + if [[ -z ${RENDER_PAGES} ]];then + RENDER_PAGES='single' fi tcar_checkFiles -m '^(single|chunks)$' "${RENDER_PAGE}" diff --git a/Automation/Modules/Render/render_setLocalizedXml.sh b/Automation/Modules/Render/render_setLocalizedXml.sh index 2347a32..ed60f11 100755 --- a/Automation/Modules/Render/render_setLocalizedXml.sh +++ b/Automation/Modules/Render/render_setLocalizedXml.sh @@ -53,10 +53,19 @@ function render_setLocalizedXml { # Combine translations into the translation instance. msgcat -u -o ${TRANSLATION_INSTANCE} ${TRANSLATIONS[*]} + # Move to translation's directory before processing source + # file in order for relative calls (e.g., image files) inside + # the source files can be found by xml2po and no warning be + # printed from it. + pushd $(dirname ${TRANSLATIONS[0]}) > /dev/null + # Create the translated instance of design model. - ${COMMAND} ${SOURCE} | xml2po -a -l ${TCAR_SCRIPT_LANG_LL} \ + ${COMMAND} ${SOURCE} | xml2po -a -l ${TCAR_SCRIPT_LANG_LC} \ -p ${TRANSLATION_INSTANCE} -o ${TARGET} - + # Return to previous location. + popd > /dev/null + # Remove .xml2po.mo temporal file. if [[ -f ./.xml2po.mo ]];then rm ./.xml2po.mo @@ -68,6 +77,15 @@ function render_setLocalizedXml { rm ${TRANSLATION_INSTANCE} fi + # xml2po bug? For some reason, xml2po is not adding the lang + # attribute to refentry tag, when producing manpages document + # types. This make intrinsic docbook construction for + # manpages like Name and Synopsis to be not localized. This + # doesn't happens with article and book document types. + if [[ ${RENDER_FLOW} == 'manpage' ]];then + sed -i -r "s///" ${TARGET} + fi + else ${COMMAND} ${SOURCE} > ${TARGET} fi