diff --git a/Scripts/Bash/Functions/Locale/locale_combineLicenseMessages.sh b/Scripts/Bash/Functions/Locale/locale_combineLicenseMessages.sh index b9569da..2e9868d 100755 --- a/Scripts/Bash/Functions/Locale/locale_combineLicenseMessages.sh +++ b/Scripts/Bash/Functions/Locale/locale_combineLicenseMessages.sh @@ -33,11 +33,11 @@ function locale_combineLicenseMessages { local TRANSLATION_TEMPLATE=$2 local DOCBOOK_LOCALES=$(echo $DOCBOOK_MODELS \ - | sed -r 's!^!Locales/!') + | sed -r "s!${TCAR_WORKDIR}/!${TCAR_WORKDIR}/Locales/!") # Define list of all files you want to combine. - local FILES="${DOCBOOK_LOCALES}/Gpl/${CLI_LANG_LC}/messages.po \ - ${DOCBOOK_LOCALES}/Gfdl/${CLI_LANG_LC}/messages.po \ + local FILES="${DOCBOOK_LOCALES}/${CLI_LANG_LC}/messages.po \ + ${DOCBOOK_LOCALES}/${CLI_LANG_LC}/messages.po \ ${TRANSLATION_TEMPLATE}" # Be sure the files we want to combine do exist. diff --git a/Scripts/Bash/Functions/Render/Docbook/docbook.sh b/Scripts/Bash/Functions/Render/Docbook/docbook.sh index 04af8b4..c78c431 100755 --- a/Scripts/Bash/Functions/Render/Docbook/docbook.sh +++ b/Scripts/Bash/Functions/Render/Docbook/docbook.sh @@ -29,8 +29,10 @@ function docbook { # into other formats. local DOCBOOK_XSL="${TCAR_WORKDIR}/Identity/Webenv/Themes/Default/Docbook/1.69.1/Xsl" - # Define absolute path to DocBook models. - local DOCBOOK_MODELS="${TCAR_WORKDIR}/Documentation/Models/Docbook" + # Define absolute path to DocBook models. This path must take + # until the directory which holds the main documentation docbook + # file. + local DOCBOOK_MODELS="$(dirname ${TEMPLATE})" # Verify absolute path to DocBook models. cli_checkFiles ${DOCBOOK_MODELS} -d diff --git a/Scripts/Bash/Functions/Render/Docbook/docbook_doTranslation.sh b/Scripts/Bash/Functions/Render/Docbook/docbook_doTranslation.sh index b33a433..f0e9ce8 100755 --- a/Scripts/Bash/Functions/Render/Docbook/docbook_doTranslation.sh +++ b/Scripts/Bash/Functions/Render/Docbook/docbook_doTranslation.sh @@ -58,15 +58,18 @@ function docbook_doTranslation { # Create translation instance to combine both template # translation and licenses translations. - local TRANSLATION_INSTANCE=${TMPDIR}/message.po + local TRANSLATION_INSTANCE=${TMPDIR}/messages.po # Define path to DocBook locales using models as reference. - local DOCBOOK_LOCALES=$(echo $DOCBOOK_MODELS \ - | sed "s!${TCAR_WORKDIR}/!${TCAR_WORKDIR}/Locales/!") - - # Define list of all locale files you want to combine. - local DOCBOOK_PO_FILES="${DOCBOOK_LOCALES}/Gpl/${CLI_LANG_LC}/messages.po \ - ${DOCBOOK_LOCALES}/Gfdl/${CLI_LANG_LC}/messages.po \ + local DOCBOOK_LOCALES=$(cli_getLocalizationDir "$DOCBOOK_MODELS") + + # Define list of all locale files you want to combine. This + # include the localization files related to all different kind + # of licenses you want to use in the main documentation file + # and the localization file of the main documentation file, as + # well. + local DOCBOOK_PO_FILES="${TCAR_WORKDIR}/Locales/Documentation/Models/Docbook/Default/Licenses/Gfdl/${CLI_LANG_LC}/messages.po \ + ${TCAR_WORKDIR}/Locales/Documentation/Models/Docbook/Default/Licenses/Gpl/${CLI_LANG_LC}/messages.po \ ${TRANSLATION}" # Be sure the files we want to combine do exist. diff --git a/Scripts/Bash/Functions/Render/Docbook/docbook_expandLicenses.sh b/Scripts/Bash/Functions/Render/Docbook/docbook_expandLicenses.sh index 277f8fc..e7192c6 100755 --- a/Scripts/Bash/Functions/Render/Docbook/docbook_expandLicenses.sh +++ b/Scripts/Bash/Functions/Render/Docbook/docbook_expandLicenses.sh @@ -42,8 +42,8 @@ function docbook_expandLicenses { # itself, they are connected with it. The files holding license # information does contain id information used inside the # documentation structure at cross references. - local LICENSES="${DOCBOOK_MODELS}/Default/Licenses/gpl.docbook \ - ${DOCBOOK_MODELS}/Default/Licenses/gfdl.docbook" + local LICENSES="${DOCBOOK_MODELS}/Default/Licenses/Gpl/gpl.docbook \ + ${DOCBOOK_MODELS}/Default/Licenses/Gfdl/gfdl.docbook" # Define top level structure in the instance. This is the tag # defined in the second field of DOCTYPE definition.