From 67f10ab694aa54d36f50f6c03797ac9abc505be6 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 15 Jul 2019 08:03:50 +0200 Subject: [PATCH] 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. --- StaticMessages.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/StaticMessages.sh b/StaticMessages.sh index 3eea0cf9..4c8fba6a 100644 --- a/StaticMessages.sh +++ b/StaticMessages.sh @@ -17,6 +17,10 @@ function import_po_files # First parameter will be a path that will contain seve podir=$1 # Android doesn't support languages with an @ 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 }