summaryrefslogtreecommitdiff
path: root/l10ntools/source
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2013-11-15 13:10:41 +0100
committerAndras Timar <andras.timar@collabora.com>2013-11-15 13:34:01 +0100
commit1cd032658648b597d7f89b3098a40606f674ce41 (patch)
treea90e5b9d6e5afccd2bea5695b5cea79592cd29ea /l10ntools/source
parentba433c69e658e2edf2832878acae544bcf54133d (diff)
do not merge translatable="false" strings to Android resource
Change-Id: Ie5653d0b03fb5090deaad6c70a9e3e638f6e24e0
Diffstat (limited to 'l10ntools/source')
-rw-r--r--l10ntools/source/stringmerge.cxx24
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 );