l10ntools/inc/gConvSrc.hxx | 2 +- l10ntools/source/gConvSrc.cxx | 6 ++++-- l10ntools/source/gConvUlf.cxx | 2 +- l10ntools/source/gConvXcu.cxx | 1 - l10ntools/source/gLexSrc.l | 9 +++++---- l10ntools/source/gLexXcu.l | 3 ++- 6 files changed, 13 insertions(+), 10 deletions(-)
New commits: commit bf95f4f0ce93c793770c3fdbb9e5eec8d22af208 Author: jan Iversen <j...@documentfoundation.org> Date: Tue May 3 11:21:25 2016 +0000 genlang .ulf uses LngText as id. Added fixed subid for .ulf files Change-Id: I9e882e3ab40e334c7d504d583b8e515d9dc36d6b diff --git a/l10ntools/source/gConvUlf.cxx b/l10ntools/source/gConvUlf.cxx index 5b71c77..ee53cf9 100644 --- a/l10ntools/source/gConvUlf.cxx +++ b/l10ntools/source/gConvUlf.cxx @@ -62,7 +62,7 @@ void convert_ulf::setValue(char *syyText) nL = sText.rfind("\""); sText.erase(nL); - mcMemory.setSourceKey(miLineNo, msSourceFile, msKey, sText, "", "", "", mbMergeMode); + mcMemory.setSourceKey(miLineNo, msSourceFile, msKey, sText, "", "LngText", "", mbMergeMode); if (mbMergeMode) { // prepare to read all languages commit 6bc720cedbcfb5ccc3f6d8bb5abc987db8445467 Author: jan Iversen <j...@documentfoundation.org> Date: Tue May 3 11:07:07 2016 +0000 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 diff --git a/l10ntools/inc/gConvSrc.hxx b/l10ntools/inc/gConvSrc.hxx index 605fffb..0710f13 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 213a3d2..d7b57d6 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 10653bc..0352e98 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 a4bf5a7..f2cedf4 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 fb3e187..8cc02c4 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); } commit fc5755c062e7116529eb865e51fdaf1d747d1e68 Author: jan Iversen <j...@documentfoundation.org> Date: Tue May 3 09:36:22 2016 +0000 genlang .src single line macro Macros do not always end with \\ only those for translation added #define exception to the lex layer. Change-Id: I656bb8776d970288c243302cdc74a0afd975975e diff --git a/l10ntools/source/gLexSrc.l b/l10ntools/source/gLexSrc.l index 3c9b2ad..a4bf5a7 100644 --- a/l10ntools/source/gLexSrc.l +++ b/l10ntools/source/gLexSrc.l @@ -210,8 +210,9 @@ f -"#include".* | -. { +"#define".*[^\\][\r]*\n | | +"#include".* | +. { LOCptr->copySource(yytext); // Just to please compiler. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits