| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function locale { |
| |
| |
| |
| |
| if [[ $(cli_getCurrentLocale) =~ '^en' ]];then |
| cli_printMessage "`gettext "Cannot locale English language to itself."`" --as-error-line |
| fi |
| |
| local ACTIONNAMS='' |
| local ACTIONNAM='' |
| local ACTIONVAL='' |
| |
| |
| |
| |
| |
| local FLAG_DONT_CREATE_MO='false' |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| L10N_BASEDIR="$(cli_getRepoTLDir)/L10n" |
| |
| |
| ${FUNCNAM}_getOptions |
| |
| |
| |
| |
| eval set -- "$ARGUMENTS" |
| |
| |
| |
| |
| cli_syncroRepoChanges "${L10N_BASEDIR}" |
| |
| |
| |
| for ACTIONVAL in "$@";do |
| |
| |
| |
| |
| ACTIONVAL=$(cli_checkRepoDirSource $ACTIONVAL) |
| |
| |
| |
| if [[ ! $(cli_hasLocalization $ACTIONVAL) == 'true' ]];then |
| cli_printMessage "`gettext "The path provided doesn't support localization."`" --as-error-line |
| fi |
| |
| # Define localization working directory. This is the place |
| # where language-specific directories are stored in. |
| WORKDIR=$(echo ${ACTIONVAL} \ |
| | sed -r -e "s!trunk/(Identity|Scripts|Manuals)!trunk/L10n/\1!") |
| |
| # Redefine localization working directory to include |
| # language-specific directories. This is the place where POT, |
| # PO, and MO files are stored in. |
| WORKDIR=$WORKDIR/$(cli_getCurrentLocale) |
| |
| # Execute action names. |
| for ACTIONNAM in $ACTIONNAMS;do |
| ${ACTIONNAM} |
| done |
| |
| done |
| |
| # Commit changes from working copy to central repository only. At |
| # this point, changes in the repository are not merged in the |
| # working copy, but chages in the working copy do are committed up |
| # to repository. |
| cli_commitRepoChanges "${L10N_BASEDIR}" |
| |
| } |
| |