Skip to content

Commit

Permalink
Honor translatable attribute for all types
Browse files Browse the repository at this point in the history
This inspects the "translatable" tag for all message types and does
not add it to the catalog if it's set as false. This matches the
format specified in AOSP to indicate translatable strings.
  • Loading branch information
kruton committed Oct 21, 2010
1 parent e126bea commit 3263678
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions android2po/convert.py
Expand Up @@ -276,6 +276,10 @@ def read_xml(file, warnfunc=dummy_warn):
for tag in doc.xpath('/resources/*[self::string or self::string-array or self::plurals]'):
if not 'name' in tag.attrib:
continue
if 'translatable' in tag.attrib:
translatable = tag.attrib['translatable']
if translatable == 'false':
continue
name = tag.attrib['name']
if name in result:
warnfunc('Duplicate resource id found: %s, ignoring.' % name,
Expand Down

0 comments on commit 3263678

Please sign in to comment.