diff --git a/Scripts/Bash/Functions/Locale/locale_updateMessages.sh b/Scripts/Bash/Functions/Locale/locale_updateMessages.sh index 4e8429d..ba8db0a 100755 --- a/Scripts/Bash/Functions/Locale/locale_updateMessages.sh +++ b/Scripts/Bash/Functions/Locale/locale_updateMessages.sh @@ -36,9 +36,21 @@ function locale_updateMessages { 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 + # 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}" + # Evaluate action value to determine whether to use xml2po to # extract translatable strings from XML-based files or to use # xgettext to extract translatable strings from shell script @@ -61,4 +73,9 @@ function locale_updateMessages { cli_printMessage "`gettext "The path provided doesn't support localization."`" --as-error-line fi + # 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}" + }