Kaydet (Commit) 00badb6f authored tarafından Jan Iversen's avatar Jan Iversen

update genLang (l10ntools)

Upgrade gLang to LO standard
Compilation of genLang module is disabled for now
activate manually by adding to Module_l10ntools.mk

Change-Id: Ib82cae6a013d10d158ec5faa81ace512c0096a39
üst 66fee511
......@@ -113,7 +113,7 @@ class convert_gen
~convert_gen();
// do extract/merge
bool execute(const bool bMerge);
bool execute(const bool bMerge, const bool bKid);
// ONLY po should implement these functions
void startSave(const std::string& sLanguage,
......@@ -127,38 +127,4 @@ class convert_gen
static bool checkAccess(std::string& sFile);
static bool createDir(std::string& sDir, std::string& sFile);
};
/******************** C L A S S D E F I N I T I O N ********************/
class handler
{
public:
handler();
~handler();
void checkCommandLine(int argc, char *argv[]);
void run();
private:
enum {DO_CONVERT, DO_CONVERT_POT, DO_EXTRACT, DO_EXTRACT_KID, DO_MERGE} meWorkMode;
l10nMem mcMemory;
std::string msModuleName;
std::string msPoOutDir;
std::string msPoDir;
std::string msSourceDir;
std::string msTargetDir;
bool mbForceSave;
std::vector<std::string> mvSourceFiles;
std::vector<std::string> mvLanguages;
void runConvert(bool bPot);
void runExtract(bool bKid);
void runMerge();
void showUsage(std::string& sErr);
void showManual();
void loadL10MEM(bool onlyTemplates);
void readFileWithSources();
};
#endif
......@@ -103,10 +103,13 @@ convert_gen::~convert_gen()
/********************** I M P L E M E N T A T I O N **********************/
bool convert_gen::execute(const bool bMerge)
bool convert_gen::execute(const bool bMerge, const bool bKid)
{
convert_gen_impl::mcImpl->mbMergeMode = bMerge;
if (bKid)
throw l10nMem::showError("not implemented");
// and load file
if (!convert_gen_impl::mcImpl->prepareFile())
return false;
......
This diff is collapsed.
......@@ -17,14 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
/*****************************************************************************
********************** L E X D E F I N I T I O N **********************
*****************************************************************************
* lex grammar for parsing ressource source files (*.po files)
* file is converted to gConPo_yy.cxx with "flex"
*****************************************************************************/
/*
white-space
# translator-comments
......@@ -167,8 +159,8 @@ SPACE [ \t]*
void dummyJustForCompiler()
{
// char *txt = NULL;
char *txt = NULL;
// yy_flex_strlen(txt);
// yyunput(0, txt);
yyunput(0, txt);
}
......@@ -18,15 +18,6 @@
*/
/*****************************************************************************
********************** L E X D E F I N I T I O N **********************
*****************************************************************************
* lex grammar for parsing ressource source files (*.src)
* file is converted to gConSrc_yy.cxx with "flex"
*****************************************************************************/
/*************** O V E R W R I T I N G F U N C T I O N S ***************/
%top{
#include "gConvSrc.hxx"
......@@ -331,7 +322,7 @@ KEYID [a-zA-Z0-9_-]+
void src_dummyJustForCompiler()
{
// char *txt = NULL;
char *txt = NULL;
// yy_flex_strlen(txt);
// yyunput(0, txt);
yyunput(0, txt);
}
......@@ -18,15 +18,6 @@
*/
/*****************************************************************************
********************** L E X D E F I N I T I O N **********************
*****************************************************************************
* lex grammar for parsing ressource source files (*.tree files)
* file is converted to gConTree_yy.cxx with "flex"
*****************************************************************************/
/*************** O V E R W R I T I N G F U N C T I O N S ***************/
%top{
#include "gConvTree.hxx"
......@@ -159,7 +150,7 @@ IDENT [\.a-zA-Z0-9_-]+
void tree_dummyJustForCompiler()
{
// char *txt = NULL;
char *txt = NULL;
// yy_flex_strlen(txt);
// yyunput(0, txt);
yyunput(0, txt);
}
......@@ -18,15 +18,6 @@
*/
/*****************************************************************************
********************** L E X D E F I N I T I O N **********************
*****************************************************************************
* lex grammar for parsing ressource source files (*.ulf files)
* file is converted to gConUlf_yy.cxx with "flex"
*****************************************************************************/
/*************** O V E R W R I T I N G F U N C T I O N S ***************/
%top{
#include "gConvUlf.hxx"
......@@ -138,7 +129,7 @@ KEYID [a-zA-Z0-9_-]+
void ulf_dummyJustForCompiler()
{
// char *txt = NULL;
char *txt = NULL;
// yy_flex_strlen(txt);
// yyunput(0, txt);
yyunput(0, txt);
}
......@@ -18,15 +18,6 @@
*/
/*****************************************************************************
********************** L E X D E F I N I T I O N **********************
*****************************************************************************
* lex grammar for parsing ressource source files (*.xrm files)
* file is converted to gConXcs_yy.cxx with "flex"
*****************************************************************************/
/*************** O V E R W R I T I N G F U N C T I O N S ***************/
%top{
#include "gConvXcs.hxx"
......@@ -105,7 +96,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
void xcs_dummyJustForCompiler()
{
// char *txt = NULL;
char *txt = NULL;
// yy_flex_strlen(txt);
// yyunput(0, txt);
yyunput(0, txt);
}
......@@ -18,15 +18,6 @@
*/
/*****************************************************************************
********************** L E X D E F I N I T I O N **********************
*****************************************************************************
* lex grammar for parsing ressource source files (*.xrm files)
* file is converted to gConXcu_yy.cxx with "flex"
*****************************************************************************/
/*************** O V E R W R I T I N G F U N C T I O N S ***************/
%top{
#include "gConvXcu.hxx"
......@@ -155,7 +146,7 @@ FIN [^/>]*">"
void xcu_dummyJustForCompiler()
{
// char *txt = NULL;
char *txt = NULL;
// yy_flex_strlen(txt);
// yyunput(0, txt);
yyunput(0, txt);
}
......@@ -18,15 +18,6 @@
*/
/*****************************************************************************
********************** L E X D E F I N I T I O N **********************
*****************************************************************************
* lex grammar for parsing ressource source files (*.xrm files)
* file is converted to gConXrm_yy.cxx with "flex"
*****************************************************************************/
/*************** O V E R W R I T I N G F U N C T I O N S ***************/
%top{
#include "gConvXhp.hxx"
......@@ -191,7 +182,7 @@ IDENT [\.a-zA-Z0-9_-]+
void xhp_dummyJustForCompiler()
{
// char *txt = NULL;
char *txt = NULL;
// yy_flex_strlen(txt);
// yyunput(0, txt);
yyunput(0, txt);
}
......@@ -18,15 +18,6 @@
*/
/*****************************************************************************
********************** L E X D E F I N I T I O N **********************
*****************************************************************************
* lex grammar for parsing ressource source files (*.xrm files)
* file is converted to gConXrm_yy.cxx with "flex"
*****************************************************************************/
/*************** O V E R W R I T I N G F U N C T I O N S ***************/
%top{
#include "gConvXrm.hxx"
......@@ -126,7 +117,7 @@ SP [ \t]*
void xrm_dummyJustForCompiler()
{
// char *txt = NULL;
char *txt = NULL;
// yy_flex_strlen(txt);
// yyunput(0, txt);
yyunput(0, txt);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment