diff --git a/Scripts/Bash/Functions/Locale/locale_editMessages.sh b/Scripts/Bash/Functions/Locale/locale_editMessages.sh index aa3eb7f..50e97f7 100755 --- a/Scripts/Bash/Functions/Locale/locale_editMessages.sh +++ b/Scripts/Bash/Functions/Locale/locale_editMessages.sh @@ -32,12 +32,24 @@ function locale_editMessages { cli_printMessage "`gettext "The English language cannot be localized to itself."`" --as-error-line fi + # Verify directory passed as non-option argument to be sure it + # supports localization. + locale_isLocalizable "${ACTIONVAL}" + if [[ $? -ne 0 ]];then + cli_printMessage "`gettext "The path provided does not support localization."`" --as-error-line + fi + local PO_FILE='' local PO_FILES='' # Prepare working directory to receive translation files. locale_prepareWorkingDirectory ${L10N_WORKDIR} + # Syncronize changes between repository and working copy. At this + # point, changes in the repository are merged in the working copy + # and changes in the working copy committed up to repository. + ${CLI_NAME} svn --sync "${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)/(Documentation/Models/Docbook|Identity/Models)/.*$" ]];then @@ -84,4 +96,9 @@ function locale_editMessages { # scripts. locale_updateMessageBinary + # Syncronize changes between repository and working copy. At this + # point, changes in the repository are merged in the working copy + # and changes in the working copy committed up to repository. + ${CLI_NAME} svn --sync "${L10N_WORKDIR}" + }