2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-22 01:51:47 +00:00

i18n: drop obsolete messages before merging

Babel (used by android2po) does not support them, warning when trying
to parse them. Since they are not really useful, drop them before
invoking a2po.
This commit is contained in:
Pino Toscano 2019-07-15 08:03:50 +02:00
parent c1006d87e1
commit 67f10ab694

View File

@ -17,6 +17,10 @@ function import_po_files # First parameter will be a path that will contain seve
podir=$1 podir=$1
# Android doesn't support languages with an @ # Android doesn't support languages with an @
find "$podir" -type f -name "*@*.po" -delete find "$podir" -type f -name "*@*.po" -delete
# drop obsolete messages, as Babel cannot parse them -- see:
# https://github.com/python-babel/babel/issues/206
# https://github.com/python-babel/babel/issues/566
find "$podir" -name '*.po' -exec msgattrib --no-obsolete -o {} {} \;
ANSI_COLORS_DISABLED=1 a2po import --ignore-fuzzy --android res/ --gettext $podir ANSI_COLORS_DISABLED=1 a2po import --ignore-fuzzy --android res/ --gettext $podir
} }