| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function locale_getOptions { |
| |
| |
| local ARGSS="q" |
| |
| |
| local ARGSL="quiet,filter:,answer-yes,update,edit,delete,dont-create-mo,is-localizable,sync-changes" |
| |
| |
| cli_parseArguments |
| |
| |
| |
| eval set -- "${ARGUMENTS}" |
| |
| |
| while true; do |
| case "$1" in |
| |
| --filter ) |
| FLAG_FILTER="$2" |
| shift 2 |
| ;; |
| |
| -q | --quiet ) |
| FLAG_QUIET="true" |
| shift 1 |
| ;; |
| |
| --answer-yes ) |
| FLAG_ANSWER="true" |
| shift 1 |
| ;; |
| |
| --update ) |
| ACTIONNAMS="$ACTIONNAMS locale_updateMessages" |
| shift 1 |
| ;; |
| |
| --edit ) |
| ACTIONNAMS="$ACTIONNAMS locale_editMessages" |
| shift 1 |
| ;; |
| |
| --delete ) |
| ACTIONNAMS="$ACTIONNAMS locale_deleteMessages" |
| shift 1 |
| ;; |
| |
| --is-localizable ) |
| ACTIONNAMS="$ACTIONNAMS locale_isLocalizable" |
| shift 1 |
| ;; |
| |
| --dont-create-mo ) |
| FLAG_DONT_CREATE_MO="true" |
| shift 1 |
| ;; |
| |
| --sync-changes ) |
| FLAG_SYNC_CHANGES="true" |
| shift 1 |
| ;; |
| |
| -- ) |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| shift 1 |
| break |
| ;; |
| esac |
| done |
| |
| |
| |
| if [[ $ACTIONNAMS == '' ]];then |
| cli_printMessage "`gettext "You need to provide one action at least."`" --as-error-line |
| fi |
| |
| |
| cli_parseArgumentsReDef "$@" |
| |
| } |