From 7031189b9ce472ed908e719be67dd2ca057d5f06 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Tue, 3 May 2016 21:36:57 +0000 Subject: genlang correct xcu filter modified algorithm for adding "." Change-Id: Ibaa59cf5faa7bf211ead222dbb2e5a391929d679 --- l10ntools/source/gConvXcu.cxx | 8 ++++++-- l10ntools/source/gLexXcu.l | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'l10ntools') diff --git a/l10ntools/source/gConvXcu.cxx b/l10ntools/source/gConvXcu.cxx index 0352e988a470..fe5d9214b2cb 100644 --- a/l10ntools/source/gConvXcu.cxx +++ b/l10ntools/source/gConvXcu.cxx @@ -125,8 +125,12 @@ void convert_xcu::stopCollectData(char *syyText) if (useText.size()) { // locate key and extract it - for (nL = 0; nL < (int)mcStack.size() -1; ++nL) - useKey += "." + mcStack[nL]; + int max = (int)mcStack.size() - 1; + for (nL = 0; nL < max; ++nL) { + useKey += mcStack[nL]; + if (nL < max -1) + useKey += "."; + } mcMemory.setSourceKey(miLineNo, msSourceFile, useKey, useText, "", "value", mcStack[nL], mbMergeMode); } diff --git a/l10ntools/source/gLexXcu.l b/l10ntools/source/gLexXcu.l index 8cc02c49028b..5eb55a047e02 100644 --- a/l10ntools/source/gLexXcu.l +++ b/l10ntools/source/gLexXcu.l @@ -50,13 +50,14 @@ FIN [^/>]*">" "component-data" { LOCptr->addLevel(); LOCptr->pushKey(""); -// LOCptr->copySource(yytext, false); + LOCptr->copySource(yytext, false); } "addLevel(); + LOCptr->pushKey(""); LOCptr->pushKey(yytext); } -- cgit