From c2c5b2273e1e1af99afce4a2142fc1d52be83099 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Feb 24 2011 21:04:26 +0000 Subject: Update `locale' functionality to fix trunk/Locales directory structure, based on trunk/Scripts directory structure and current locale information. --- diff --git a/Scripts/Bash/centos-art/Functions/Locale/locale_editMessages.sh b/Scripts/Bash/centos-art/Functions/Locale/locale_editMessages.sh index 2dfbdf7..40b07ea 100755 --- a/Scripts/Bash/centos-art/Functions/Locale/locale_editMessages.sh +++ b/Scripts/Bash/centos-art/Functions/Locale/locale_editMessages.sh @@ -35,9 +35,9 @@ function locale_editMessages { # specified in the command line), the value entered is used # instead. if [[ $FLAG_FILTER == '.+' ]];then - FILES=$(cli_getFilesList "${WORKDIR}" "$(cli_getCurrentLocale).*\.po") + FILES=$(cli_getFilesList "${WORKDIR}" "${TEXTDOMAIN}\.po") else - FILES=$(cli_getFilesList "${WORKDIR}" "${FLAG_FILTER}.*\.po") + FILES=$(cli_getFilesList "${WORKDIR}" "${FLAG_FILTER}\.po") fi # Set action preamble. diff --git a/Scripts/Bash/centos-art/Functions/Locale/locale_getActions.sh b/Scripts/Bash/centos-art/Functions/Locale/locale_getActions.sh index 25425d0..ca82d9e 100644 --- a/Scripts/Bash/centos-art/Functions/Locale/locale_getActions.sh +++ b/Scripts/Bash/centos-art/Functions/Locale/locale_getActions.sh @@ -98,7 +98,8 @@ function locale_getActions { # a parallel directory under `trunk/Locales' to store its # translation messages. local WORKDIR=$(echo $ACTIONVAL | sed -r \ - -e 's!trunk/(Identity|Manuals|Scripts)!trunk/Locales/\1!') + -e 's!trunk/(Identity|Manuals|Scripts)!trunk/Locales/\1!' \ + -e "s!/${CLI_PROGRAM}!/$(cli_getCurrentLocale)!") # Syncronize changes between the working copy and the central # repository to bring down changes. diff --git a/Scripts/Bash/centos-art/Functions/Locale/locale_updateMessageShell.sh b/Scripts/Bash/centos-art/Functions/Locale/locale_updateMessageShell.sh index e805b26..b1fd359 100755 --- a/Scripts/Bash/centos-art/Functions/Locale/locale_updateMessageShell.sh +++ b/Scripts/Bash/centos-art/Functions/Locale/locale_updateMessageShell.sh @@ -34,13 +34,7 @@ function locale_updateMessageShell { # Define file name used as reference to create portable object # templates (.pot), portable objects (.po) and machine objects # (.mo). - FILE="${WORKDIR}/$(cli_getCurrentLocale)/${TEXTDOMAIN}" - - # Verify directory used to store locale-specific translation - # messages. If it doesn't exist, create it. - if [[ ! -d $(dirname ${FILE}) ]];then - mkdir -p $(dirname ${FILE}) - fi + FILE="${WORKDIR}/${TEXTDOMAIN}" # Build list of files to process. if [[ $ACTIONVAL =~ "^${CLI_BASEDIR}" ]];then