From c1006d87e1d120190349e5ba2fdf0b78c53b01dc Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 15 Jul 2019 07:36:59 +0200 Subject: [PATCH] i18n: prune @-langs earlier on translation import As Android does not support languages with @, remove their po files before invoking a2po instead of removing their results afterwards. --- StaticMessages.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/StaticMessages.sh b/StaticMessages.sh index eeb5ec09..3eea0cf9 100644 --- a/StaticMessages.sh +++ b/StaticMessages.sh @@ -15,9 +15,9 @@ function export_pot_file # First parameter will be the path of the pot file we h function import_po_files # First parameter will be a path that will contain several .po files with the format LANG.po { podir=$1 + # Android doesn't support languages with an @ + find "$podir" -type f -name "*@*.po" -delete ANSI_COLORS_DISABLED=1 a2po import --ignore-fuzzy --android res/ --gettext $podir - #Android doesn't support languages with an @ - rm -r res/values-*@* }