From 1090efd74c351876251047e2c2592f850af38113 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Sep 09 2012 01:27:59 +0000 Subject: Update `trunk/Scripts/Bash/Functions/Locale/locale_editMessages.sh' file. --- diff --git a/Scripts/Bash/Functions/Locale/locale_editMessages.sh b/Scripts/Bash/Functions/Locale/locale_editMessages.sh index fe2495a..553451a 100755 --- a/Scripts/Bash/Functions/Locale/locale_editMessages.sh +++ b/Scripts/Bash/Functions/Locale/locale_editMessages.sh @@ -29,14 +29,14 @@ function locale_editMessages { local PO_FILES='' # Prepare working directory to receive translation files. - locale_prepareWorkingDirectory + locale_prepareWorkingDirectory ${L10N_WORKDIR} # Define list of PO files to process based on paths provided as # non-option arguments through centos-art.sh script command-line. if [[ $ACTIONVAL =~ "^$(cli_getRepoTLDir)/(Manuals|Identity/Models)/.*$" ]];then # Define list of PO files for XML-based files. - PO_FILES=$(cli_getFilesList ${L10N_WORKDIR} --pattern=".*/messages\.po") + PO_FILES=$(cli_getFilesList ${L10N_WORKDIR} --pattern="/${FLAG_FILTER}/messages\.po$") # Do not create MO files for XML-based files. FLAG_DONT_CREATE_MO='true' @@ -44,7 +44,7 @@ function locale_editMessages { elif [[ $ACTIONVAL =~ "^$(cli_getRepoTLDir)/Scripts/Bash$" ]];then # Define list of PO files for script files. - PO_FILES=$(cli_getFilesList ${L10N_WORKDIR} --pattern=".*/${TEXTDOMAIN}\.po") + PO_FILES=$(cli_getFilesList ${L10N_WORKDIR} --pattern="/${FLAG_FILTER}/messages\.po$") else cli_printMessage "`gettext "The path provided does not support localization."`" --as-error-line @@ -67,14 +67,14 @@ function locale_editMessages { # Use default text editor to edit the PO file. eval ${EDITOR} ${PO_FILE} - # At this point some changes might be realized inside the PO - # file, so we need to update the related MO files based on - # recently updated PO files here in order for `centos-art.sh' - # script to print out the most up to date revision of - # localized messages. Notice that this is required only if we - # were localizaing shell scripts. - locale_updateMessageBinary ${PO_FILE} - done + # At this point some changes might be realized inside the PO file, + # so we need to update the related MO file based on recently + # updated PO files here in order for `centos-art.sh' script to + # print out the most up to date revision of localized messages. + # Notice that this is required only if we were localizaing shell + # scripts. + locale_updateMessageBinary + }