From b7ef0bd4e121ebe05a55a78523d17e9490074655 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Wed, 12 Apr 2017 10:03:58 +1000 Subject: [PATCH] Also check for misformated plurals, not just regular strings. The script checks for `` elements which have misformated arguments in them. It Now also checks for `` elements too. closes !472 --- app/tools/check-string-format.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/tools/check-string-format.py b/app/tools/check-string-format.py index 3415ab0c4..625fcfb82 100755 --- a/app/tools/check-string-format.py +++ b/app/tools/check-string-format.py @@ -23,7 +23,10 @@ for d in glob.glob(os.path.join('src', 'main', 'res', 'values-*')): tree = ElementTree.parse(str_path) root = tree.getroot() - for e in root.findall('.//string'): + for e in root.findall('.//string') + root.findall('.//item'): + if e.tag == "item" and e.text is None: + continue + for m in formatRe.finditer(e.text): s = m.group(0) if validFormatRe.match(s):