l10n: Update makepot

Go back to Launchpad for translations.

-> No PRs on po/ and the pot file.
-> makepot updates the pot file which is then uploaded to LP.
-> LP translations overwrite what's in po/
-> mo files are generated during the build.
This commit is contained in:
Clement Lefebvre 2022-05-24 13:33:28 +01:00
parent 8353921e79
commit c6ffdc6b7d
5 changed files with 685 additions and 706 deletions

View File

@ -7,9 +7,6 @@ app-gtk:
app-console:
cd src; make app-console
pot:
cd src; make pot
manpage:
cd src; make manpage

View File

@ -1,6 +1,6 @@
find . -name "*.vala" > POTFILES
xgettext --language=Vala --keyword=_ --output=timeshift.pot --files-from=POTFILES
xgettext --language=C --keyword=_ --output=timeshift.pot --files-from=POTFILES --sort-output
xgettext --output=timeshift.pot --join-existing src/share/polkit-1/actions/*.policy
rm POTFILES

View File

@ -1,35 +0,0 @@
#!/bin/bash
backup=`pwd`
DIR="$( cd "$( dirname "$0" )" && pwd )"
cd "$DIR"
. ./BUILD_CONFIG
languages="am ar az bg ca cs da de el en_GB es et eu fi fr he hi hr hu ia id is it ko lt nb ne nl pl pt pt_BR ro ru sk sr sv tr uk vi zh_CN"
echo ""
echo "=========================================================================="
echo " Update PO files in po/ with downloaded translations placed in po-lp/"
echo "=========================================================================="
echo ""
for lang in $languages; do
# remove headers in po-lp/*.po so that msgcat does not create malformed headers
sed -i '/^#/d' po-lp/${app_name}-$lang.po
msgcat -o po/${app_name}-$lang.po po-lp/${app_name}-$lang.po po/${app_name}-$lang.po
sed -i '/#-#-#-#-#/d' po/${app_name}-$lang.po
sed -i '/#, fuzzy/d' po/${app_name}-$lang.po
done
echo ""
echo "=========================================================================="
echo " Update PO files in po/ with latest POT file"
echo "=========================================================================="
echo ""
for lang in $languages; do
msgmerge --update -v po/${app_name}-$lang.po ${app_name}.pot
done
cd "$backup"

View File

@ -45,7 +45,7 @@ endif
symbols=$(shell echo "${vte_symbol} ${gtk3_symbol} ${xapp_symbol}")
all: app-gtk app-console pot
all: app-gtk app-console
app-gtk:
@ -72,24 +72,7 @@ app-console:
manpage:
./${app_name} --help > ../man/${app_name}.1
gzip -f ../man/${app_name}.1
pot:
# update translation template
find . -iname "*.vala" | xargs xgettext \
--from-code=UTF-8 --language=C --keyword=_ \
--copyright-holder='Tony George (teejeetech@gmail.com)' \
--package-name="${app_name}" \
--package-version='18.2' \
--msgid-bugs-address='teejeetech@gmail.com' \
--escape --sort-output \
-o ../${app_name}.pot
# translations
for lang in am ar az bg ca cs da de el en_GB es et eu fi fr he hi hr hu ia id is it ja ko lt nb ne nl pl pt pt_BR ro ru sk sr sv tr uk vi zh_CN zh_TW; do \
msgmerge --update -v ../po/${app_name}-$$lang.po ../${app_name}.pot ; \
done
clean:
rm -rfv ../release/{source,i386,amd64,armel,armhf}
rm -rfv ../release/*.{run,deb}

File diff suppressed because it is too large Load Diff