summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorjan Iversen <jani@documentfoundation.org>2016-05-03 11:07:07 +0000
committerjan Iversen <jani@documentfoundation.org>2016-05-03 11:27:54 +0000
commit6bc720cedbcfb5ccc3f6d8bb5abc987db8445467 (patch)
tree6547fa14b73d179357d108949f4991eb0cf0f4f0 /l10ntools
parentfc5755c062e7116529eb865e51fdaf1d747d1e68 (diff)
genlang .xcu dot handling and level func for .src
.xcu stores a '.' between keys and keys with no name count .src has commands without name (identifier used instead) Change-Id: I135c5f5594c429ebc1b278dbb7d5709b7b8ca119
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/inc/gConvSrc.hxx2
-rw-r--r--l10ntools/source/gConvSrc.cxx6
-rw-r--r--l10ntools/source/gConvXcu.cxx1
-rw-r--r--l10ntools/source/gLexSrc.l4
-rw-r--r--l10ntools/source/gLexXcu.l3
5 files changed, 9 insertions, 7 deletions
diff --git a/l10ntools/inc/gConvSrc.hxx b/l10ntools/inc/gConvSrc.hxx
index 605fffb95d4b..0710f134d69a 100644
--- a/l10ntools/inc/gConvSrc.hxx
+++ b/l10ntools/inc/gConvSrc.hxx
@@ -35,7 +35,7 @@ class convert_src : public convert_gen
void setValue(string& syyText);
bool setLang(string& syyText);
- void setName(string& syyText);
+ void setName(string& syyText, bool revertLevel);
void setCmd(string& syyText);
void startBlock();
void stopBlock();
diff --git a/l10ntools/source/gConvSrc.cxx b/l10ntools/source/gConvSrc.cxx
index 213a3d25434c..d7b57d69d07b 100644
--- a/l10ntools/source/gConvSrc.cxx
+++ b/l10ntools/source/gConvSrc.cxx
@@ -60,7 +60,7 @@ void convert_src::setValue(string& syyText)
{
cout << "test value\n";
for (int i = 0; i < stackSize; i++)
- cout << mcStack[i] << "\n";
+ cout << i << ") " << mcStack[i] << "\n";
}
string subid = (stackSize > 3) ? mcStack[stackSize - 1] : "";
string stringid = mcStack[stackSize - 2];
@@ -82,8 +82,10 @@ bool convert_src::setLang(string& syyText)
-void convert_src::setName(string& syyText)
+void convert_src::setName(string& syyText, bool revertLevel)
{
+ if (revertLevel)
+ mcStack.pop_back();
mcStack.push_back(syyText);
}
diff --git a/l10ntools/source/gConvXcu.cxx b/l10ntools/source/gConvXcu.cxx
index 10653bc379d1..0352e988a470 100644
--- a/l10ntools/source/gConvXcu.cxx
+++ b/l10ntools/source/gConvXcu.cxx
@@ -125,7 +125,6 @@ void convert_xcu::stopCollectData(char *syyText)
if (useText.size()) {
// locate key and extract it
- useKey = ".";
for (nL = 0; nL < (int)mcStack.size() -1; ++nL)
useKey += "." + mcStack[nL];
mcMemory.setSourceKey(miLineNo, msSourceFile, useKey, useText, "", "value", mcStack[nL], mbMergeMode);
diff --git a/l10ntools/source/gLexSrc.l b/l10ntools/source/gLexSrc.l
index a4bf5a7a73bf..f2cedf4e70d6 100644
--- a/l10ntools/source/gLexSrc.l
+++ b/l10ntools/source/gLexSrc.l
@@ -98,7 +98,7 @@ f
<ID>{IDENT} {
- LOCptr->setName(LOCptr->copySource(yytext));
+ LOCptr->setName(LOCptr->copySource(yytext), true);
BEGIN(INITIAL);
}
@@ -178,7 +178,7 @@ f
<CMD>{IDENT} {
- LOCptr->setName(LOCptr->copySource(yytext));
+ LOCptr->setName(LOCptr->copySource(yytext),false);
BEGIN(INITIAL);
}
diff --git a/l10ntools/source/gLexXcu.l b/l10ntools/source/gLexXcu.l
index fb3e1872f319..8cc02c49028b 100644
--- a/l10ntools/source/gLexXcu.l
+++ b/l10ntools/source/gLexXcu.l
@@ -49,7 +49,8 @@ FIN [^/>]*">"
"component-data" {
LOCptr->addLevel();
- LOCptr->copySource(yytext, false);
+ LOCptr->pushKey("");
+// LOCptr->copySource(yytext, false);
}