| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function locale_editMessages { |
| |
| |
| cli_printMessage '-' 'AsSeparatorLine' |
| |
| |
| local FILES='' |
| |
| |
| |
| if [[ $ACTIONVAL =~ "^$(cli_getRepoTLDir)/Identity/(Models|Manual|Themes/Models)/.+$" ]];then |
| FILES=$(cli_getFilesList "${WORKDIR}" ".*/messages\.po") |
| 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' |
| fi |
| |
| # Go throguh files, one by one. |
| for FILE in $FILES;do |
| |
| # Print the file we are editing. |
| cli_printMessage "$FILE" 'AsUpdatingLine' |
| |
| # Use default text editor to edit file. |
| eval ${EDITOR} ${FILE} |
| |
| # Update machine object (.mo) from portable object (.po). |
| locale_updateMessageBinary ${FILE} |
| |
| done |
| |
| } |
| |