| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function locale_updateMessageMetadata { |
| |
| local COUNT=0 |
| local -a SRC |
| local -a DST |
| |
| |
| local FILE="$1" |
| |
| |
| local CURRENTLOCALE=$(cli_getCurrentLocale) |
| |
| |
| local LANGNAME=$(cli_getLangName ${CURRENTLOCALE}) |
| |
| |
| cli_checkFiles "${FILE}" 'f' |
| |
| |
| |
| SRC[0]='Project-Id-Version:' |
| SRC[1]='Report-Msgid-Bugs-To:' |
| SRC[2]='Last-Translator:' |
| SRC[3]='Language-Team:' |
| |
| |
| DST[0]="\"Project-Id-Version: ${CLI_PROGRAM} (${CURRENTLOCALE})\\\n\"" |
| DST[1]="\"Report-Msgid-Bugs-To: =MAIL_DOCS=\\\n\"" |
| DST[2]="\"Last-Translator: CentOS Documentation SIG\\\n\"" |
| DST[3]="\"Language-Team: ${LANGNAME}\\\n\"" |
| |
| |
| while [[ $COUNT -lt ${#SRC[*]} ]];do |
| sed -i -r "/${SRC[$COUNT]}/c${DST[$COUNT]}" ${FILE} |
| COUNT=$(($COUNT + 1)) |
| done |
| |
| |
| sed -i -r "s/PACKAGE/${TEXTDOMAIN}/g" ${FILE} |
| |
| |
| unset SRC |
| unset DST |
| |
| } |