| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function locale_editMessages { |
| |
| local PO_FILE='' |
| local PO_FILES='' |
| |
| |
| locale_prepareWorkingDirectory |
| |
| |
| |
| if [[ $ACTIONVAL =~ "^$(cli_getRepoTLDir)/(Manuals|Identity/Models)/.*$" ]];then |
| |
| |
| PO_FILES=$(cli_getFilesList ${L10N_WORKDIR} --pattern=".*/messages\.po") |
| |
| |
| FLAG_DONT_CREATE_MO='true' |
| |
| elif [[ $ACTIONVAL =~ "^$(cli_getRepoTLDir)/Scripts/Bash$" ]];then |
| |
| |
| PO_FILES=$(cli_getFilesList ${L10N_WORKDIR} --pattern=".*/${TEXTDOMAIN}\.po") |
| |
| else |
| cli_printMessage "`gettext "The path provided does not support localization."`" --as-error-line |
| fi |
| |
| |
| if [[ $PO_FILES = "" ]];then |
| cli_printMessage "`gettext "The path provided hasn't translations yet."`" --as-error-line |
| else |
| cli_printMessage '-' --as-separator-line |
| fi |
| |
| # Loop through list of PO files to process in order to edit them |
| # one by one using user's default text editor. |
| for PO_FILE in ${PO_FILES};do |
| |
| |
| cli_printMessage "${PO_FILE}" --as-updating-line |
| |
| |
| eval ${EDITOR} ${PO_FILE} |
| |
| |
| |
| |
| |
| |
| |
| locale_updateMessageBinary ${PO_FILE} |
| |
| done |
| |
| } |