diff options
author | Andras Timar <andras.timar@collabora.com> | 2013-11-15 11:14:12 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2013-11-15 13:34:01 +0100 |
commit | ba433c69e658e2edf2832878acae544bcf54133d (patch) | |
tree | 48b52dca8e185ac702b02f418f12468a363eab2b /l10ntools | |
parent | 2531d750ed8089e9342c8cb21c0fb48a1b14b4f2 (diff) |
do not extract translatable="false" strings from Android resource
Change-Id: Id00ce654b99426c771b647e0ae6be02bfdc24359
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/stringmerge.cxx | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/l10ntools/source/stringmerge.cxx b/l10ntools/source/stringmerge.cxx index 9e3fa7a270d3..d6ffbc67062f 100644 --- a/l10ntools/source/stringmerge.cxx +++ b/l10ntools/source/stringmerge.cxx @@ -68,17 +68,22 @@ void StringParser::Extract( const OString& rPOFile ) { if (!xmlStrcmp(pCurrent->name, (const xmlChar*)("string"))) { - xmlChar* pID = xmlGetProp(pCurrent, (const xmlChar*)("name")); - xmlChar* pText = xmlNodeGetContent(pCurrent); - const OString sTemp = - helper::unEscapeAll(helper::xmlStrToOString( pText ),"\\n""\\t""\\\"""\\\'","\n""\t""\"""\'"); - common::writePoEntry( - "Stringex", aPOStream, m_pSource->name, "string", - helper::xmlStrToOString( pID ), OString(), OString(), - sTemp); + xmlChar* pTranslatable = xmlGetProp(pCurrent, (const xmlChar*)("translatable")); + if (xmlStrcmp(pTranslatable, (const xmlChar*)("false"))) + { + xmlChar* pID = xmlGetProp(pCurrent, (const xmlChar*)("name")); + xmlChar* pText = xmlNodeGetContent(pCurrent); + const OString sTemp = + helper::unEscapeAll(helper::xmlStrToOString( pText ),"\\n""\\t""\\\"""\\\'","\n""\t""\"""\'"); + common::writePoEntry( + "Stringex", aPOStream, m_pSource->name, "string", + helper::xmlStrToOString( pID ), OString(), OString(), + sTemp); - xmlFree( pID ); - xmlFree( pText ); + xmlFree( pID ); + xmlFree( pText ); + } + xmlFree( pTranslatable ); } } |