| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function locale_updateMessageXml { |
| |
| |
| cli_printMessage '-' --as-separator-line |
| |
| |
| |
| local MESSAGES="${L10N_WORKDIR}/messages" |
| |
| |
| |
| |
| |
| |
| |
| |
| local EXTENSION='(svg|docbook)' |
| |
| |
| |
| |
| |
| |
| |
| local FILES=$(cli_getFilesList ${ACTIONVAL} \ |
| --pattern="${FLAG_FILTER}\.${EXTENSION}" \ |
| --maxdepth='1' --type="f" \ |
| | egrep -v '/[[:alpha:]]{2}_[[:alpha:]]{2}/') |
| |
| |
| cli_printMessage "${MESSAGES}.pot" --as-updating-line |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| if [[ $ACTIONVAL =~ '^.+/(branches|trunk)/Manuals/.+$' ]];then |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| if [[ $(echo "$FILES" | wc -l) -eq 1 ]];then |
| |
| xmllint --valid --noent ${FILES} | xml2po -a - \ |
| | msgcat --output=${MESSAGES}.pot --width=70 --no-location - |
| |
| else |
| |
| xml2po -a ${FILES} \ |
| | msgcat --output=${MESSAGES}.pot --width=70 --no-location - |
| |
| fi |
| |
| elif [[ $ACTIONVAL =~ '^.+/(branches|trunk)/Identity/Models/.+$' ]];then |
| |
| xml2po -a ${FILES} \ |
| | msgcat --output=${MESSAGES}.pot --width=70 --no-location - |
| |
| else |
| |
| cli_printMessage "`gettext "The path provided doesn't support localization."`" --as-error-line |
| |
| fi |
| |
| # Verify, initialize or merge portable objects from portable object |
| # templates. |
| locale_updateMessagePObjects "${MESSAGES}" |
| |
| } |
| |