TT#115002 Stop updating PO translation files locally

All changes in translatable strings are extracted from the source files
into a Portable Object Template (POT) file. The file is uploaded to our
translation platform and new Portable Object (PO) translation files are
prepared there. No need to update PO files with extract_i18n.sh script.

Change-Id: I630411e52da30c56c4751ebe658997a7630afc5a
mr10.0
Victor Tsvetov 5 years ago
parent 7fe2cefe96
commit e8fe196447

@ -22,13 +22,14 @@ POT="lib/NGCP/Panel/I18N/messages.pot"
echo; echo "Dumping DB and Form strings"; echo
perl -I../sipwise-base/lib -I../ngcp-schema/lib -Ilib script/ngcp_panel_dump_db_strings.pl
echo; echo "Creating ${POT}"; echo
echo; echo "Creating ${POT} Portable Object Template file with a list of all the translatable strings extracted from the sources"; echo
xgettext.pl \
--no-wrap \
--output="${POT}" \
"${I18_DIRS[@]/#/--directory=}" \
-P perl=tt,pm
echo; echo "Normalazing previously created ${POT} file"; echo
msgattrib \
--no-wrap \
--add-location=file \
@ -36,17 +37,18 @@ msgattrib \
--output-file="${POT}" \
"${POT}"
while IFS= read -r -d '' po ; do
echo; echo "Merging ${po}"; echo
msgmerge \
--no-fuzzy-matching \
--no-wrap \
--width=100000 \
--add-location=file \
--update \
"${po}" \
"${POT}"
done < <(find lib/NGCP/Panel/I18N -name "*.po" -print0)
# echo; echo "Updating existing *.po (Portable Object) translation files according to ${POT} file"; echo
# while IFS= read -r -d '' po ; do
# echo; echo "Merging ${po}"; echo
# msgmerge \
# --no-fuzzy-matching \
# --no-wrap \
# --width=100000 \
# --add-location=file \
# --update \
# "${po}" \
# "${POT}"
# done < <(find lib/NGCP/Panel/I18N -name "*.po" -print0)
echo; echo "Removing line numbers"; echo
sed -i -e '/#: /s!\(\(lib\|share\)\S*\):[0-9]*!\1!g' lib/NGCP/Panel/I18N/*

Loading…
Cancel
Save