| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function locale_updateMessageShell { |
| |
| local FILE='' |
| local FILES='' |
| |
| |
| |
| |
| FILE="${WORKDIR}/$(cli_getCurrentLocale)/${TEXTDOMAIN}" |
| |
| |
| |
| if [[ ! -d $(dirname ${FILE}) ]];then |
| mkdir -p $(dirname ${FILE}) |
| fi |
| |
| |
| |
| |
| |
| |
| if [[ $ACTIONVAL =~ "^$(cli_getRepoTLDir)/Scripts/Bash" ]];then |
| FLAG_FILTER=".*${FLAG_FILTER}.*\.sh" |
| else |
| cli_printMessage "`gettext "The path provided can't be processed."`" 'AsErrorLine' |
| cli_printMessage "$(caller)" 'AsToKnowMoreLine' |
| fi |
| |
| # Build list of files to process. |
| cli_getFilesList |
| |
| # Print action preamble. |
| cli_printActionPreamble "${FILES}" "doLocale" 'AsResponseLine' |
| |
| # Print action message. |
| cli_printMessage "${FILE}.pot" 'AsUpdatingLine' |
| |
| # Retrive translatable strings from shell script files and create |
| # the portable object template (.pot) from them. |
| /usr/bin/xgettext --output=${FILE}.pot \ |
| --copyright-holder="CentOS Documentation SIG" \ |
| --width=70 --sort-by-file ${FILES} |
| |
| # Verify, initialize or update portable objects from portable |
| # object templates. |
| locale_updateMessagePObjects "${FILE}" |
| |
| } |
| |