From 510fada4c8f895f4919be2207c83e1cd855dddc7 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: May 04 2011 15:45:23 +0000 Subject: Update invocation of cli_printMessage function in the `locale' functionality files. --- diff --git a/Scripts/Functions/Locale/locale.sh b/Scripts/Functions/Locale/locale.sh index 1ba15e8..ef5f714 100644 --- a/Scripts/Functions/Locale/locale.sh +++ b/Scripts/Functions/Locale/locale.sh @@ -29,8 +29,7 @@ function locale { # language is already used as translation pattern and there is no # translation messages for it. if [[ $(cli_getCurrentLocale) =~ '^en' ]];then - cli_printMessage "`gettext "Cannot locale English language to itself."`" 'AsErrorLine' - cli_printMessage "$FUNCDIRNAM" 'AsToKnowMoreLine' + cli_printMessage "`gettext "Cannot locale English language to itself."`" --as-error-line fi local ACTIONNAM='' @@ -88,8 +87,7 @@ function locale { if [[ $ACTIONNAM =~ "^${FUNCNAM}_[A-Za-z]+$" ]];then eval $ACTIONNAM else - cli_printMessage "`gettext "A valid action is required."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`gettext "A valid action is required."`" --as-error-line fi # Commit changes from working copy to central repository only. diff --git a/Scripts/Functions/Locale/locale_editMessages.sh b/Scripts/Functions/Locale/locale_editMessages.sh index 8a0fb61..d242c2b 100755 --- a/Scripts/Functions/Locale/locale_editMessages.sh +++ b/Scripts/Functions/Locale/locale_editMessages.sh @@ -26,7 +26,7 @@ function locale_editMessages { # Print separator line. - cli_printMessage '-' 'AsSeparatorLine' + cli_printMessage '-' --as-separator-line # Initialize local variables. local FILES='' @@ -38,15 +38,14 @@ function locale_editMessages { elif [[ $ACTIONVAL =~ "^$(cli_getRepoTLDir)/Scripts$" ]];then FILES=$(cli_getFilesList "${WORKDIR}" ".*/${TEXTDOMAIN}\.po") else - cli_printMessage "`gettext "The path provided doesn't support localization."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`gettext "The path provided do not support localization."`" --as-error-line fi # Go throguh files, one by one. for FILE in $FILES;do # Print the file we are editing. - cli_printMessage "$FILE" 'AsUpdatingLine' + cli_printMessage "$FILE" --as-updating-line # Use default text editor to edit file. eval ${EDITOR} ${FILE} diff --git a/Scripts/Functions/Locale/locale_updateMessageBinary.sh b/Scripts/Functions/Locale/locale_updateMessageBinary.sh index 8269802..3f976f4 100755 --- a/Scripts/Functions/Locale/locale_updateMessageBinary.sh +++ b/Scripts/Functions/Locale/locale_updateMessageBinary.sh @@ -48,9 +48,9 @@ function locale_updateMessageBinary { # Print action message. if [[ -f ${MO} ]];then - cli_printMessage "${MO}" 'AsUpdatingLine' + cli_printMessage "${MO}" --as-updating-line else - cli_printMessage "${MO}" 'AsCreatingLine' + cli_printMessage "${MO}" --as-creating-line fi # Define directory used to store machine object. diff --git a/Scripts/Functions/Locale/locale_updateMessagePObjects.sh b/Scripts/Functions/Locale/locale_updateMessagePObjects.sh index 0f93f9b..47db479 100755 --- a/Scripts/Functions/Locale/locale_updateMessagePObjects.sh +++ b/Scripts/Functions/Locale/locale_updateMessagePObjects.sh @@ -37,7 +37,7 @@ function locale_updateMessagePObjects { if [[ -f ${FILE}.po ]];then # Print action message. - cli_printMessage "${FILE}.po" 'AsUpdatingLine' + cli_printMessage "${FILE}.po" --as-updating-line # Update portable object merging both portable object and # portable object template. @@ -46,7 +46,7 @@ function locale_updateMessagePObjects { else # Print action message. - cli_printMessage "${FILE}.po" 'AsCreatingLine' + cli_printMessage "${FILE}.po" --as-creating-line # Initiate portable object using portable object template. # Do not print msginit sterr output, use centos-art action diff --git a/Scripts/Functions/Locale/locale_updateMessageShell.sh b/Scripts/Functions/Locale/locale_updateMessageShell.sh index 91a7c0b..f7b5d77 100755 --- a/Scripts/Functions/Locale/locale_updateMessageShell.sh +++ b/Scripts/Functions/Locale/locale_updateMessageShell.sh @@ -28,7 +28,7 @@ function locale_updateMessageShell { # Print separator line. - cli_printMessage '-' 'AsSeparatorLine' + cli_printMessage '-' --as-separator-line # Initialize local variables. local FILE='' @@ -43,12 +43,11 @@ function locale_updateMessageShell { if [[ $ACTIONVAL =~ "^${CLI_BASEDIR}" ]];then FILES=$(cli_getFilesList "$ACTIONVAL" "${FLAG_FILTER}.*\.sh") else - cli_printMessage "`gettext "The path provided can't be processed."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`gettext "The path provided cannot be processed."`" --as-error-line fi # Print action message. - cli_printMessage "${FILE}.pot" 'AsUpdatingLine' + cli_printMessage "${FILE}.pot" --as-updating-line # Prepare directory structure to receive .po files. if [[ ! -d $(dirname ${FILE}) ]];then diff --git a/Scripts/Functions/Locale/locale_updateMessageXml.sh b/Scripts/Functions/Locale/locale_updateMessageXml.sh index d3a2e84..15c19af 100755 --- a/Scripts/Functions/Locale/locale_updateMessageXml.sh +++ b/Scripts/Functions/Locale/locale_updateMessageXml.sh @@ -27,7 +27,7 @@ function locale_updateMessageXml { # Print separator line. - cli_printMessage '-' 'AsSeparatorLine' + cli_printMessage '-' --as-separator-line # Initialize local variables. local FILE='' @@ -45,12 +45,11 @@ function locale_updateMessageXml { if [[ $ACTIONVAL =~ "^$(cli_getRepoTLDir)/Identity/(Models|Manual|Themes/Models)/.+$" ]];then FILES=$(cli_getFilesList "$ACTIONVAL" "${FLAG_FILTER}.*\.${EXTENSION}") else - cli_printMessage "`gettext "The path provided can't be processed."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`gettext "The path provided cannot be processed."`" --as-error-line fi # Print action message. - cli_printMessage "${FILE}.pot" 'AsUpdatingLine' + cli_printMessage "${FILE}.pot" --as-updating-line # Prepare directory structure to receive .po files. if [[ ! -d $(dirname ${FILE}) ]];then diff --git a/Scripts/Functions/Locale/locale_updateMessages.sh b/Scripts/Functions/Locale/locale_updateMessages.sh index 743ad2f..e8fd25c 100755 --- a/Scripts/Functions/Locale/locale_updateMessages.sh +++ b/Scripts/Functions/Locale/locale_updateMessages.sh @@ -48,16 +48,14 @@ function locale_updateMessages { ACTIONNAM="${FUNCNAM}_updateMessageShell" else - cli_printMessage "`gettext "The path provided doesn't support localization."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`gettext "The path provided does not support localization."`" --as-error-line fi # Execute action name. if [[ $ACTIONNAM =~ "^${FUNCNAM}_[A-Za-z]+$" ]];then eval $ACTIONNAM else - cli_printMessage "`gettext "A valid action is required."`" 'AsErrorLine' - cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' + cli_printMessage "`gettext "A valid action is required."`" --as-error-line fi }