| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function cli_printActionPreamble { |
| |
| local FILE='' |
| local COUNT=0 |
| local FILES="$1" |
| local ACTION="$2" |
| local FORMAT="$3" |
| |
| |
| |
| |
| |
| if [[ "$FILES" == '' ]];then |
| cli_printMessage "`gettext "There is no file to process."`" 'AsErrorLine' |
| cli_printMessage "$(caller)" 'AsToKnowMoreLine' |
| else |
| cli_checkFiles "${FILES}" |
| fi |
| |
| |
| |
| if [[ $# -ne 3 ]];then |
| return |
| fi |
| |
| |
| COUNT=$(echo "$FILES" | sed -r "s! +!\n!g" | wc -l) |
| |
| |
| case $ACTION in |
| |
| 'doCreate' ) |
| ACTION="`ngettext "The following entry will be created" \ |
| "The following entries will be created" $COUNT`:" |
| ;; |
| |
| 'doDelete' ) |
| ACTION="`ngettext "The following entry will be deleted" \ |
| "The following entries will be deleted" $COUNT`:" |
| ;; |
| |
| 'doLocale' ) |
| ACTION="`ngettext "Translatable strings will be retrived from the following entry" \ |
| "Translatable strings will be retrived from the following entries" $COUNT`:" |
| ;; |
| |
| 'doEdit' ) |
| ACTION="`ngettext "The following file will be edited" \ |
| "The following files will be edited" $COUNT`:" |
| ;; |
| |
| esac |
| |
| |
| cli_printMessage "$ACTION" |
| for FILE in $FILES;do |
| cli_printMessage "$FILE" "$FORMAT" |
| done |
| cli_printMessage "`gettext "Do you want to continue"`" 'AsYesOrNoRequestLine' |
| |
| } |