| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function locale_updateMessageShell { |
| |
| local FILE='' |
| local FILES='' |
| |
| |
| |
| |
| FILE="${WORKDIR}/${TEXTDOMAIN}" |
| |
| |
| if [[ $ACTIONVAL =~ "^${CLI_BASEDIR}" ]];then |
| FILES=$(cli_getFilesList "$ACTIONVAL" "${FLAG_FILTER}\.sh") |
| else |
| cli_printMessage "`gettext "The path provided can't be processed."`" 'AsErrorLine' |
| cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' |
| fi |
| |
| # Set action preamble. |
| cli_printActionPreamble "${FILES}" "doLocale" 'AsResponseLine' |
| |
| # Print action message. |
| cli_printMessage "${FILE}.pot" 'AsUpdatingLine' |
| |
| # Prepare directory structure to receive .po files. |
| if [[ ! -d $(dirname ${FILE}) ]];then |
| mkdir -p $(dirname ${FILE}) |
| fi |
| |
| # 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}" |
| |
| } |
| |