diff options
author | Andras Timar <andras.timar@collabora.com> | 2013-11-15 13:10:41 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2013-11-15 13:34:01 +0100 |
commit | 1cd032658648b597d7f89b3098a40606f674ce41 (patch) | |
tree | a90e5b9d6e5afccd2bea5695b5cea79592cd29ea /l10ntools | |
parent | do not extract translatable="false" strings from Android resource (diff) | |
download | core-1cd032658648b597d7f89b3098a40606f674ce41.tar.gz core-1cd032658648b597d7f89b3098a40606f674ce41.zip |
do not merge translatable="false" strings to Android resource
Change-Id: Ie5653d0b03fb5090deaad6c70a9e3e638f6e24e0
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/stringmerge.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/l10ntools/source/stringmerge.cxx b/l10ntools/source/stringmerge.cxx index d6ffbc67062f..7cc5d0100c7b 100644 --- a/l10ntools/source/stringmerge.cxx +++ b/l10ntools/source/stringmerge.cxx @@ -159,6 +159,30 @@ void StringParser::Merge( } } + for( xmlNodePtr pCurrent = pRootNode->children; pCurrent; ) + { + if (!xmlStrcmp(pCurrent->name, (const xmlChar*)("string"))) + { + xmlChar* pTranslatable = xmlGetProp(pCurrent, (const xmlChar*)("translatable")); + if (!xmlStrcmp(pTranslatable, (const xmlChar*)("false"))) + { + xmlNodePtr pNonTranslatable = pCurrent; + pCurrent = pCurrent->next; + xmlUnlinkNode( pNonTranslatable ); + xmlFreeNode( pNonTranslatable ); + } + else + { + pCurrent = pCurrent->next; + } + xmlFree( pTranslatable ); + } + else + { + pCurrent = pCurrent->next; + } + } + delete pMergeDataFile; xmlSaveFile( rDestinationFile.getStr(), m_pSource ); xmlFreeDoc( m_pSource ); |