Also check for misformated plurals, not just regular strings.

The script checks for `<string/>` elements which have misformated
arguments in them. It Now also checks for `<plural><item /></plural>`
elements too.

closes !472
This commit is contained in:
Peter Serwylo 2017-04-12 10:03:58 +10:00 committed by Hans-Christoph Steiner
parent cfabd2a2c3
commit b7ef0bd4e1

View File

@ -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):