summaryrefslogtreecommitdiff
path: root/tools/aapt2/ResourceParser.h
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2017-01-06 15:20:04 -0800
committerAdam Lesinski <adamlesinski@google.com>2017-02-08 06:23:45 -0800
commit7542162cb1b1fd2ce8a26dd7f3fedc8de8160d38 (patch)
tree0358684e3551d67eb93cb80ae81ef391ba1a9091 /tools/aapt2/ResourceParser.h
parentc270de85cc0c398d9ce165592908d2740219a708 (diff)
AAPT2: Fix pseudolocalization to respect <xliff:g>
The XLIFF 'g' tag specifies content that should NOT be translated. AAPT2's pseudolocalization process should respect it. Bug:34064599 Test: make libandroidfw_tests Change-Id: Ice437d7f0ff246730ee04896fd035e2d846148fb
Diffstat (limited to 'tools/aapt2/ResourceParser.h')
-rw-r--r--tools/aapt2/ResourceParser.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/aapt2/ResourceParser.h b/tools/aapt2/ResourceParser.h
index cc0fa26f44d5..825801995862 100644
--- a/tools/aapt2/ResourceParser.h
+++ b/tools/aapt2/ResourceParser.h
@@ -60,16 +60,16 @@ class ResourceParser {
private:
DISALLOW_COPY_AND_ASSIGN(ResourceParser);
- /*
- * Parses the XML subtree as a StyleString (flattened XML representation for
- * strings
- * with formatting). If successful, `out_style_string`
- * contains the escaped and whitespace trimmed text, while `out_raw_string`
- * contains the unescaped text. Returns true on success.
- */
- bool FlattenXmlSubtree(xml::XmlPullParser* parser,
- std::string* out_raw_string,
- StyleString* out_style_string);
+ // Parses the XML subtree as a StyleString (flattened XML representation for strings with
+ // formatting). If parsing fails, false is returned and the out parameters are left in an
+ // unspecified state. Otherwise,
+ // `out_style_string` contains the escaped and whitespace trimmed text.
+ // `out_raw_string` contains the un-escaped text.
+ // `out_untranslatable_sections` contains the sections of the string that should not be
+ // translated.
+ bool FlattenXmlSubtree(xml::XmlPullParser* parser, std::string* out_raw_string,
+ StyleString* out_style_string,
+ std::vector<UntranslatableSection>* out_untranslatable_sections);
/*
* Parses the XML subtree and returns an Item.