From 1c49c74cb58cb9c5cf3bbf1071444ce25a2487e4 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jun 14 2013 02:37:53 +0000 Subject: Update locale functionality of centos-art.sh script: - Move cli_expandTMarkers from locale_updateMessageMetadata to locale_updateMessageXmlDocbookWithEntities function. This fixes the problem of duplicated messages id inside PO files. We cannot expand translation markers after PO creation because things like these happen. Instead, expand translation markers in the instance you use to create the PO file. This way no duplicate messages will be created because expanded or non-expanded translation markers issue. --- diff --git a/Scripts/Bash/Functions/Locale/locale_updateMessageMetadata.sh b/Scripts/Bash/Functions/Locale/locale_updateMessageMetadata.sh index 1306be1..a986483 100755 --- a/Scripts/Bash/Functions/Locale/locale_updateMessageMetadata.sh +++ b/Scripts/Bash/Functions/Locale/locale_updateMessageMetadata.sh @@ -83,9 +83,6 @@ function locale_updateMessageMetadata { # first level on. Don't show the variable part of the path. sed -i -r "s,${TCAR_WORKDIR}/,,g" ${FILE} - # Expand translation markers inside file. - cli_expandTMarkers ${FILE} - # Unset array variables to avoid undesired concatenations. unset SRC unset DST diff --git a/Scripts/Bash/Functions/Locale/locale_updateMessageXmlDocbookWithEntities.sh b/Scripts/Bash/Functions/Locale/locale_updateMessageXmlDocbookWithEntities.sh index 9556e6b..e5f6cf1 100755 --- a/Scripts/Bash/Functions/Locale/locale_updateMessageXmlDocbookWithEntities.sh +++ b/Scripts/Bash/Functions/Locale/locale_updateMessageXmlDocbookWithEntities.sh @@ -64,6 +64,9 @@ function locale_updateMessageXmlDocbookWithEntities { | msgcat --output=${MESSAGES}.pot \ --width=70 --no-location - + # Expand translation markers inside file. + cli_expandTMarkers ${INSTANCE} + # Verify, initialize or merge portable objects from portable # object templates. locale_updateMessagePObjects "${MESSAGES}"