Author: jani
Date: Sun Mar 24 10:29:13 2013
New Revision: 1460307
URL: http://svn.apache.org/r1460307
Log:
xhp merge tested
Modified:
openoffice/branches/l10n/main/l10ntools/source/gCon.cxx
openoffice/branches/l10n/main/l10ntools/source/gCon.hxx
openoffice/branches/l10n/main/l10ntools/source/gConPo.hxx
openoffice/branches/l10n/main/l10ntools/source/gConXhp.hxx
openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx
openoffice/branches/l10n/main/l10ntools/source/gConXhplex.l
openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx
openoffice/branches/l10n/main/l10ntools/source/gL10nMem.hxx
openoffice/branches/l10n/main/l10ntools/source/gL10nMemDB.cxx
openoffice/branches/l10n/main/l10ntools/source/gLang.hxx
Modified: openoffice/branches/l10n/main/l10ntools/source/gCon.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gCon.cxx?rev=1460307&r1=1460306&r2=1460307&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gCon.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gCon.cxx Sun Mar 24 10:29:13
2013
@@ -216,12 +216,12 @@ bool convert_gen_impl::prepareFile()
if (mbMergeMode && !mbLoadMode)
{
// close previous file
- if (outputFile.is_open())
- outputFile.close();
+ if (mcOutputFile.is_open())
+ mcOutputFile.close();
// open output file
- outputFile.open((msTargetPath+msSourceFile).c_str(), std::ios::binary);
- if (!outputFile.is_open())
+ mcOutputFile.open((msTargetPath+msSourceFile).c_str(), std::ios::binary);
+ if (!mcOutputFile.is_open())
throw l10nMem::showError("Cannot open file (" +
msTargetPath+msSourceFile + ") for writing");
}
@@ -266,8 +266,8 @@ void convert_gen_impl::writeSourceFile(c
if (!line.size())
return;
- if (outputFile.is_open())
- outputFile.write(line.c_str(), line.size());
+ if (mcOutputFile.is_open())
+ mcOutputFile.write(line.c_str(), line.size());
}
@@ -278,6 +278,11 @@ std::string& convert_gen_impl::copySourc
int nL;
+ if (!yyText)
+ {
+ msCopyText.clear();
+ return msCopyText;
+ }
msCopyText = yyText;
// write text for merge
Modified: openoffice/branches/l10n/main/l10ntools/source/gCon.hxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gCon.hxx?rev=1460307&r1=1460306&r2=1460307&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gCon.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gCon.hxx Sun Mar 24 10:29:13
2013
@@ -86,7 +86,7 @@ class convert_gen_impl
bool prepareFile();
private:
- std::ofstream outputFile;
+ std::ofstream mcOutputFile;
friend class convert_gen;
};
Modified: openoffice/branches/l10n/main/l10ntools/source/gConPo.hxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConPo.hxx?rev=1460307&r1=1460306&r2=1460307&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConPo.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConPo.hxx Sun Mar 24
10:29:13 2013
@@ -21,8 +21,6 @@
#ifndef GCONPO_HXX
#define GCONPO_HXX
#include "gCon.hxx"
-#include <iostream>
-#include <fstream>
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXhp.hxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXhp.hxx?rev=1460307&r1=1460306&r2=1460307&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXhp.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXhp.hxx Sun Mar 24
10:29:13 2013
@@ -33,20 +33,6 @@
/******************** C L A S S D E F I N I T I O N ********************/
-class lang_container
-{
- public:
- lang_container(const std::string& sLang, const std::string& sFileName);
- lang_container();
- ~lang_container();
-
- std::string msLang;
-// std::ofstream msOutFile;
-};
-
-
-
-/******************** C L A S S D E F I N I T I O N ********************/
class convert_xhp : public convert_gen_impl
{
public:
@@ -67,7 +53,8 @@ class convert_xhp : public convert_gen_i
void handleSpecial(char *yytext);
void handleDataEnd(char *yytext);
void duplicate(char *yytext);
- std::string& copySourceSpecial(char *yytext, int iType = 0);
+ std::string& copySourceSpecial(char *yytext, int iType);
+ void writeSourceFile(std::string& sText, int inx);
private:
typedef enum
@@ -80,8 +67,11 @@ class convert_xhp : public convert_gen_i
} STATE;
STATE meExpectValue, mePushValue;
std::string msKey, msPushCollect;
+ std::string msLine;
- std::vector<lang_container> mbLanguages;
- void execute();
+ std::string *msLangText;
+ std::ofstream *mcOutputFiles;
+ int miCntLanguages;
+ void execute();
};
#endif
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx?rev=1460307&r1=1460306&r2=1460307&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx Sun Mar 24
10:29:13 2013
@@ -18,11 +18,20 @@
* under the License.
*
*************************************************************/
+#include "gConDB.hxx"
+#include "gConPo.hxx"
+#include "gConProp.hxx"
+#include "gConSrc.hxx"
+#include "gConTree.hxx"
+#include "gConUlf.hxx"
+#include "gConXcs.hxx"
+#include "gConXcu.hxx"
+#include "gConXrm.hxx"
#include "gConXhp.hxx"
-#include <algorithm>
-#include <iostream>
-#include <fstream>
-#include <cstdlib>
+//#include <algorithm>
+//#include <iostream>
+//#include <fstream>
+//#include <cstdlib>
@@ -35,37 +44,12 @@
/************ I N T E R F A C E I M P L E M E N T A T I O N ************/
-lang_container::lang_container(const std::string& sLang, const std::string&
sFileName)
-{
- std::string x;
-
- x= sLang;
- x= sFileName;
- // JIX: implement file open
- // JIX: implement lang tag
-}
-
-
-
-/************ I N T E R F A C E I M P L E M E N T A T I O N ************/
-lang_container::lang_container()
-{
-}
-
-
-
-/************ I N T E R F A C E I M P L E M E N T A T I O N ************/
-lang_container::~lang_container()
-{
- // JIX: implement close file
-}
-
-
-
-/************ I N T E R F A C E I M P L E M E N T A T I O N ************/
convert_xhp::convert_xhp(l10nMem& crMemory)
: convert_gen_impl(crMemory),
- meExpectValue(VALUE_NOT_USED)
+ meExpectValue(VALUE_NOT_USED),
+ miCntLanguages(0),
+ mcOutputFiles(NULL),
+ msLangText(NULL)
{
// xhp files are written through a local routine
mbLoadMode = true;
@@ -76,6 +60,14 @@ convert_xhp::convert_xhp(l10nMem& crMemo
/************ I N T E R F A C E I M P L E M E N T A T I O N ************/
convert_xhp::~convert_xhp()
{
+ if (mcOutputFiles)
+ {
+ for (int i = 0; i < miCntLanguages; ++i)
+ mcOutputFiles[i].close();
+ delete[] mcOutputFiles;
+ }
+ if (msLangText)
+ delete[] msLangText;
}
@@ -93,14 +85,27 @@ namespace XhpWrap
void convert_xhp::execute()
{
std::string sLang;
- std::string sFile = msTargetPath+msSourceFile;
// prepare list with languages
- mcMemory.prepareMerge();
- for (; mcMemory.getLangList(sLang); )
- mbLanguages.push_back(lang_container(sLang, sFile));
+ miCntLanguages = mcMemory.prepareMerge();
+ mcOutputFiles = new std::ofstream[miCntLanguages];
+ msLangText = new std::string[miCntLanguages];
+
+ for (int i = 0; mcMemory.getLangList(sLang); ++i)
+ {
+ std::string sFile = msTargetPath + sLang + "/" + msSourceFile;
+ mcOutputFiles[i].open(sFile.c_str(), std::ios::binary);
+ if (!mcOutputFiles[i].is_open())
+ throw l10nMem::showError("Cannot open file (" + sFile + ") for writing");
+
+ msLangText[i] = "xml-lang=\"" + sLang + "\"";
+ }
+ // run analyzer
XhpWrap::yylex();
+
+ // dump last line
+ copySourceSpecial(NULL,3);
}
@@ -108,7 +113,7 @@ void convert_xhp::execute()
/********************** I M P L E M E N T A T I O N **********************/
void convert_xhp::setString(char *yytext)
{
- copySourceSpecial(yytext);
+ copySourceSpecial(yytext, 0);
}
@@ -121,7 +126,7 @@ void convert_xhp::openTag(char *yytext)
meExpectValue = VALUE_IS_VALUE_TAG;
msCollector += "\\";
}
- copySourceSpecial(yytext);
+ copySourceSpecial(yytext, 0);
}
@@ -151,7 +156,7 @@ void convert_xhp::closeTag(char *yytext)
case VALUE_IS_VALUE:
break;
}
- copySourceSpecial(yytext);
+ copySourceSpecial(yytext, 0);
meExpectValue = newState;
}
@@ -161,7 +166,7 @@ void convert_xhp::closeTag(char *yytext)
void convert_xhp::setId(char *yytext)
{
int nL, nE;
- std::string& sText = copySourceSpecial(yytext);
+ std::string& sText = copySourceSpecial(yytext, 0);
nL = sText.find("\"");
@@ -225,7 +230,7 @@ void convert_xhp::setLang(char *yytext)
void convert_xhp::setRef(char *yytext)
{
int nL, nE;
- std::string& sText = copySourceSpecial(yytext);
+ std::string& sText = copySourceSpecial(yytext, 0);
nL = sText.find("\"");
@@ -252,7 +257,7 @@ void convert_xhp::setRef(char *yytext)
/********************** I M P L E M E N T A T I O N **********************/
void convert_xhp::openTransTag(char *yytext)
{
- copySourceSpecial(yytext);
+ copySourceSpecial(yytext, 0);
msKey.clear();
meExpectValue = VALUE_IS_TAG;
}
@@ -262,14 +267,18 @@ void convert_xhp::openTransTag(char *yyt
/********************** I M P L E M E N T A T I O N **********************/
void convert_xhp::closeTransTag(char *yytext)
{
+ int iType = 0;
+
+
if (meExpectValue == VALUE_IS_VALUE || meExpectValue == VALUE_IS_VALUE_TAG)
{
if (msCollector.size() && msCollector != "-")
mcMemory.setSourceKey(miLineNo, msSourceFile, msKey, msCollector);
msKey.clear();
+ iType = 2;
}
meExpectValue = VALUE_NOT_USED;
- copySourceSpecial(yytext, 2);
+ copySourceSpecial(yytext, iType);
}
@@ -277,7 +286,7 @@ void convert_xhp::closeTransTag(char *yy
/********************** I M P L E M E N T A T I O N **********************/
void convert_xhp::stopTransTag(char *yytext)
{
- copySourceSpecial(yytext);
+ copySourceSpecial(yytext, 0);
meExpectValue = VALUE_NOT_USED;
}
@@ -289,7 +298,7 @@ void convert_xhp::startComment(char *yyt
mePushValue = meExpectValue;
msPushCollect = msCollector;
meExpectValue = VALUE_NOT_USED;
- copySourceSpecial(yytext);
+ copySourceSpecial(yytext, 0);
}
@@ -297,7 +306,7 @@ void convert_xhp::startComment(char *yyt
/********************** I M P L E M E N T A T I O N **********************/
void convert_xhp::stopComment(char *yytext)
{
- copySourceSpecial(yytext);
+ copySourceSpecial(yytext, 0);
meExpectValue = mePushValue;
msCollector = msPushCollect;
}
@@ -308,7 +317,7 @@ void convert_xhp::stopComment(char *yyte
void convert_xhp::handleSpecial(char *yytext)
{
int nX = msCollector.size();
- std::string& sText = copySourceSpecial(yytext);
+ std::string& sText = copySourceSpecial(yytext, 0);
if (meExpectValue != VALUE_IS_VALUE || meExpectValue != VALUE_IS_VALUE_TAG)
@@ -331,7 +340,7 @@ void convert_xhp::handleSpecial(char *yy
void convert_xhp::handleDataEnd(char *yytext)
{
int nX = msCollector.size();
- copySourceSpecial(yytext);
+ copySourceSpecial(yytext, 0);
if (meExpectValue == VALUE_IS_VALUE || meExpectValue == VALUE_IS_VALUE_TAG)
msCollector.erase(nX);
@@ -342,7 +351,7 @@ void convert_xhp::handleDataEnd(char *yy
/********************** I M P L E M E N T A T I O N **********************/
void convert_xhp::duplicate(char *yytext)
{
- copySourceSpecial(yytext);
+ copySourceSpecial(yytext, 0);
if (meExpectValue == VALUE_IS_VALUE || meExpectValue == VALUE_IS_VALUE_TAG)
msCollector += msCollector[msCollector.size()-1];
@@ -353,10 +362,63 @@ void convert_xhp::duplicate(char *yytext
/********************** I M P L E M E N T A T I O N **********************/
std::string& convert_xhp::copySourceSpecial(char *yytext, int iType)
{
- iType = 0;
- return copySource(yytext, (meExpectValue != VALUE_IS_VALUE && meExpectValue
!= VALUE_IS_VALUE_TAG));
+ bool doingValue = (meExpectValue == VALUE_IS_VALUE || meExpectValue
== VALUE_IS_VALUE_TAG);
+ std::string& sText = copySource(yytext, !doingValue);
+ std::string sLang;
+ int i;
- // JIX tell copy source not to use outputfile
- // JIX write all languages sources.
+ // Do NOT write data while collecting a value (will be replaced by language
text)
+ if (doingValue)
+ return sText;
+
+ // Handling depends o
+ switch (iType)
+ {
+ case 0: // Used for tokens that are to be copied 1-1,
+ msLine += yytext;
+ if (*yytext == '\n')
+ {
+ for (i = 0; i < miCntLanguages; ++i)
+ writeSourceFile(msLine, i);
+ msLine.clear();
+ }
+ break;
+
+ case 1: // Used for language token, are to replaced with languages
+ for (i = 0; i < miCntLanguages; ++i)
+ {
+ writeSourceFile(msLine, i);
+ writeSourceFile(msLangText[i], i);
+ }
+ msLine.clear();
+ break;
+
+ case 2: // Used for token at end of value, language text are to be
inserted and then token written
+ mcMemory.prepareMerge();
+ for (i = 0; i < miCntLanguages; ++i)
+ {
+ writeSourceFile(msLine, i);
+ mcMemory.getMergeLang(sLang, sText);
+ writeSourceFile(sText,i);
+ writeSourceFile(std::string(yytext), i);
+ }
+ msLine.clear();
+ break;
+
+ case 3: // Used for EOF
+ for (i = 0; i < miCntLanguages; ++i)
+ writeSourceFile(msLine, i);
+ break;
+ }
+ return sText;
+}
+
+
+
+/********************** I M P L E M E N T A T I O N **********************/
+void convert_xhp::writeSourceFile(std::string& sText, int inx)
+{
+ if (sText.size() && mcOutputFiles[inx].is_open())
+ mcOutputFiles[inx].write(sText.c_str(), sText.size());
}
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXhplex.l
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXhplex.l?rev=1460307&r1=1460306&r2=1460307&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXhplex.l (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXhplex.l Sun Mar 24
10:29:13 2013
@@ -154,7 +154,7 @@ IDENT [\.a-zA-Z0-9_-]+
.|\n {
- LOCptr->copySourceSpecial(yytext);
+ LOCptr->copySourceSpecial(yytext, 0);
}
Modified: openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx?rev=1460307&r1=1460306&r2=1460307&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx Sun Mar 24
10:29:13 2013
@@ -95,8 +95,8 @@ void l10nMem::setSourceKey(int iL, const
{ l10nMem_impl::mcImpl->setSourceKey(iL, sF, sK, sT); }
void l10nMem::save(const std::string& sT, bool bK, bool bF)
{ l10nMem_impl::mcImpl->save(*this, sT, bK, bF); }
-void l10nMem::prepareMerge()
- { l10nMem_impl::mcImpl->mcDb.prepareMerge(); }
+int l10nMem::prepareMerge()
+ { return l10nMem_impl::mcImpl->mcDb.prepareMerge(); }
void l10nMem::dumpMem(const std::string& sT)
{ l10nMem_impl::mcImpl->dumpMem(sT); }
bool l10nMem::getMergeLang(std::string& sL, std::string& sT)
@@ -251,7 +251,7 @@ void l10nMem_impl::save(l10nMem& cMem, c
savePo.startSave("en_US", sFileName);
for (iE = 1; iE < iEsize; ++iE)
{
- l10nMem_enus_entry& cE = mcDb.mcENUSlist[iE];
+ l10nMem_enus_entry& cE = mcDb.mcENUSlist[iE];
// remove deleted entries
if (cE.meState == l10nMem::ENTRY_DELETED)
@@ -270,9 +270,9 @@ void l10nMem_impl::save(l10nMem& cMem, c
savePo.startSave(mcDb.mcLangList[iL], sFileName);
for (iE = 1; iE < iEsize; ++iE)
{
- l10nMem_enus_entry& cE = mcDb.mcENUSlist[iE];
- l10nMem_lang_entry& cL = cE.mcLangList[iL];
- bool bF = cL.mbFuzzy;
+ l10nMem_enus_entry& cE = mcDb.mcENUSlist[iE];
+ l10nMem_lang_entry& cL = cE.mcLangText[iL];
+ bool bF = cL.mbFuzzy;
// remove deleted entries
if (cE.meState == l10nMem::ENTRY_DELETED)
@@ -466,7 +466,7 @@ void l10nMem_impl::convEntryKey(int
// update language text
l10nMem_enus_entry& curE = mcDb.mcENUSlist[ivEntryList[i]];
- l10nMem_lang_entry& curL = curE.mcLangList[mcDb.miCurLangInx];
+ l10nMem_lang_entry& curL = curE.mcLangText[mcDb.miCurLangInx];
if (sText != curL.msText)
{
Modified: openoffice/branches/l10n/main/l10ntools/source/gL10nMem.hxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gL10nMem.hxx?rev=1460307&r1=1460306&r2=1460307&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gL10nMem.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gL10nMem.hxx Sun Mar 24
10:29:13 2013
@@ -64,7 +64,7 @@ class l10nMem_enus_entry
l10nMem::ENTRY_STATE meState; // status information
int miFileInx; // index of file name
int miLineNo; // line number
- std::vector<l10nMem_lang_entry> mcLangList; // language texts (index is
languageId)
+ std::vector<l10nMem_lang_entry> mcLangText; // language texts (index is
languageId)
};
@@ -129,7 +129,7 @@ class l10nMem_db
const std::string& sText,
l10nMem::ENTRY_STATE eStat);
- void prepareMerge ();
+ int prepareMerge ();
bool getMergeLang (std::string& sLang,
std::string& sText);
bool getLangList (std::string& sLang);
Modified: openoffice/branches/l10n/main/l10ntools/source/gL10nMemDB.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gL10nMemDB.cxx?rev=1460307&r1=1460306&r2=1460307&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gL10nMemDB.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gL10nMemDB.cxx Sun Mar 24
10:29:13 2013
@@ -73,7 +73,7 @@ l10nMem_enus_entry::l10nMem_enus_entry(c
// add dummy language entries
for (i = 0; i < iLangSize; ++i)
- mcLangList.push_back(l10nMem_lang_entry("", false));
+ mcLangText.push_back(l10nMem_lang_entry("", false));
// convert key to upper case
iSize = sKey.size();
@@ -204,7 +204,7 @@ void l10nMem_db::setLanguage(const std::
// add language to all ENUS entries
iSize = mcENUSlist.size();
for (i = 0; i < iSize; ++i)
- mcENUSlist[i].mcLangList.push_back(l10nMem_lang_entry("", false));
+ mcENUSlist[i].mcLangText.push_back(l10nMem_lang_entry("", false));
}
@@ -245,7 +245,7 @@ void l10nMem_db::loadLangKey(int
if (!locateKey(iLineNo, sSourceFile, sKey, sOrgText, true))
throw l10nMem::showError(".po file contains unknown filename: " +
sSourceFile + " or key: " + sKey);
- l10nMem_lang_entry& xCur = mcENUSlist[miCurENUSinx].mcLangList[miCurLangInx];
+ l10nMem_lang_entry& xCur = mcENUSlist[miCurENUSinx].mcLangText[miCurLangInx];
xCur.msText = sText;
xCur.mbFuzzy = bFuzzy;
}
@@ -360,7 +360,7 @@ void l10nMem_db::addKey(int
// and add entry at the back (no problem since it is a new file)
mcENUSlist.push_back(l10nMem_enus_entry(sKey, sText, iLineNo, miCurFileInx,
- mcLangList.size(), eStat));
+ mcLangList.size(), eStat));
mcFileList[miCurFileInx].miEnd = miCurENUSinx;
}
else
@@ -389,9 +389,10 @@ void l10nMem_db::addKey(int
/********************** I M P L E M E N T A T I O N **********************/
-void l10nMem_db::prepareMerge()
+int l10nMem_db::prepareMerge()
{
miCurLangInx = 0;
+ return mcLangList.size() -1;
}
@@ -406,7 +407,7 @@ bool l10nMem_db::getMergeLang(std::strin
// update pointers
sLang = mcLangList[miCurLangInx];
- sText = mcENUSlist[miCurENUSinx].mcLangList[miCurLangInx].msText;
+ sText = mcENUSlist[miCurENUSinx].mcLangText[miCurLangInx].msText;
return true;
}
Modified: openoffice/branches/l10n/main/l10ntools/source/gLang.hxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gLang.hxx?rev=1460307&r1=1460306&r2=1460307&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gLang.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gLang.hxx Sun Mar 24
10:29:13 2013
@@ -87,7 +87,7 @@ class l10nMem
bool bForce);
void dumpMem (const std::string& sTargetDir);
- void prepareMerge ();
+ int prepareMerge ();
bool getMergeLang (std::string& sLang,
std::string& sText);
bool getLangList (std::string& sLang);