| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function locale_updateMessageXml { |
| |
| local FILE='' |
| local FILES='' |
| |
| |
| |
| FILE="${WORKDIR}/messages" |
| |
| |
| if [[ $ACTIONVAL =~ "^$(cli_getRepoTLDir)/(Identity|Manual)" ]];then |
| FILES=$(cli_getFilesList "$ACTIONVAL" "${FLAG_FILTER}\.(svg|xml|docbook)") |
| 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 XML-based files and |
| # create the portable object template (.pot) from them. |
| /usr/bin/xml2po ${FILES} | msgcat --output=${FILE}.pot --width=70 --sort-by-file - |
| |
| # Verify, initialize or merge portable objects from portable |
| # object templates. |
| locale_updateMessagePObjects "${FILE}" |
| |
| } |
| |