summaryrefslogtreecommitdiff
path: root/l10ntools/inc
diff options
context:
space:
mode:
authorjan iversen <jani@documentfoundation.org>2016-03-21 13:38:42 +0100
committerjan iversen <jani@documentfoundation.org>2016-03-22 16:32:19 +0100
commit0d0598fc8f7fffe90b9e14b3825f98770ce1affa (patch)
treeb12f805d0048dde5a993ec84d3618574bc6782f5 /l10ntools/inc
parent3ec0b7ed0d2028517afaee5c3ffa0b9f04a68bd2 (diff)
genlang, PO files contain both comment and resource extra
the .ulf ==> .pot keep the x-comment, therefore the memory db is expanded with sResource and sComment. The memory db API is changed to add the 2 new fields, which causes a change in all callers. Change-Id: I38527c8d2db9d56ecf9ae42550ed5420371b658e
Diffstat (limited to 'l10ntools/inc')
-rw-r--r--l10ntools/inc/gConvPo.hxx3
-rw-r--r--l10ntools/inc/gConvProp.hxx4
-rw-r--r--l10ntools/inc/gConvSrc.hxx2
-rw-r--r--l10ntools/inc/gConvTree.hxx23
-rw-r--r--l10ntools/inc/gConvUlf.hxx4
-rw-r--r--l10ntools/inc/gConvXcs.hxx2
-rw-r--r--l10ntools/inc/gConvXcu.hxx2
-rw-r--r--l10ntools/inc/gConvXrm.hxx2
-rw-r--r--l10ntools/inc/gL10nMem.hxx84
9 files changed, 64 insertions, 62 deletions
diff --git a/l10ntools/inc/gConvPo.hxx b/l10ntools/inc/gConvPo.hxx
index abab7fd8fda2..69c62d025922 100644
--- a/l10ntools/inc/gConvPo.hxx
+++ b/l10ntools/inc/gConvPo.hxx
@@ -31,7 +31,7 @@ class convert_po : public convert_gen
convert_po(l10nMem& crMemory);
- ~convert_po();
+ ~convert_po() {};
void startLook ();
void setValue (char *syyText, int iLineCnt);
@@ -49,6 +49,7 @@ class convert_po : public convert_gen
const string& sKey,
const string& sENUStext,
const string& sText,
+ const string& sComment,
const string& sResource,
bool bFuzzy);
void endSave();
diff --git a/l10ntools/inc/gConvProp.hxx b/l10ntools/inc/gConvProp.hxx
index 819e92597cc9..b9e5b7c7a30f 100644
--- a/l10ntools/inc/gConvProp.hxx
+++ b/l10ntools/inc/gConvProp.hxx
@@ -25,8 +25,8 @@
class convert_prop : public convert_gen
{
public:
- convert_prop(l10nMem& crMemory);
- ~convert_prop();
+ convert_prop(l10nMem& crMemory) : convert_gen(crMemory) {};
+ ~convert_prop() {};
private:
void doExecute() override;
diff --git a/l10ntools/inc/gConvSrc.hxx b/l10ntools/inc/gConvSrc.hxx
index 21fa0f497c98..dd41895b4483 100644
--- a/l10ntools/inc/gConvSrc.hxx
+++ b/l10ntools/inc/gConvSrc.hxx
@@ -28,7 +28,7 @@ class convert_src : public convert_gen
bool mbExpectValue;
convert_src(l10nMem& crMemory);
- ~convert_src();
+ ~convert_src() {};
void setValue (char *syyText, char *sbuildValue);
void setLang (char *syyText, bool bEnUs);
diff --git a/l10ntools/inc/gConvTree.hxx b/l10ntools/inc/gConvTree.hxx
index 90ee86037a50..fff9248d836b 100644
--- a/l10ntools/inc/gConvTree.hxx
+++ b/l10ntools/inc/gConvTree.hxx
@@ -42,20 +42,21 @@ class convert_tree : public convert_gen
convert_tree(l10nMem& crMemory);
~convert_tree();
- void setString (char *yytext);
- void setState (char *yytext, STATE_TAG eNewStateTag, STATE_VAL eNewStateVAL, char *sModule);
- void setValue (char *yytext);
- string& copySourceSpecial (char *yytext, int iType);
- void writeSourceFile (string& sText, int inx);
+ void setString(char *yytext);
+ void setState(char *yytext, STATE_TAG eNewStateTag, STATE_VAL eNewStateVAL, char *sModule);
+ void setValue(char *yytext);
+ void writeSourceFile(string& sText, int inx);
+ string& copySourceSpecial(char *yytext, int iType);
private:
- string msLine;
- string msId;
- string msAppl;
+ string msLine;
+ string msModule;
+ string msId;
+ string msAppl;
ofstream *mcOutputFiles;
- STATE_TAG meStateTag;
- STATE_VAL meStateVal;
- int miCntLanguages;
+ STATE_TAG meStateTag;
+ STATE_VAL meStateVal;
+ int miCntLanguages;
void doExecute() override;
};
diff --git a/l10ntools/inc/gConvUlf.hxx b/l10ntools/inc/gConvUlf.hxx
index 52d415da2613..7053059d1888 100644
--- a/l10ntools/inc/gConvUlf.hxx
+++ b/l10ntools/inc/gConvUlf.hxx
@@ -25,8 +25,8 @@
class convert_ulf : public convert_gen
{
public:
- convert_ulf(l10nMem& crMemory);
- ~convert_ulf();
+ convert_ulf(l10nMem& crMemory) : convert_gen(crMemory) {};
+ ~convert_ulf() {};
void setKey(char *syyText);
void setText(char *syyText, bool bIsEnUs);
diff --git a/l10ntools/inc/gConvXcs.hxx b/l10ntools/inc/gConvXcs.hxx
index 2d65cc3d2dff..c7bedede084a 100644
--- a/l10ntools/inc/gConvXcs.hxx
+++ b/l10ntools/inc/gConvXcs.hxx
@@ -26,7 +26,7 @@ class convert_xcs : public convert_gen
{
public:
convert_xcs(l10nMem& crMemory);
- ~convert_xcs();
+ ~convert_xcs() {};
void setKey(char *syyText);
void unsetKey(char *syyText);
diff --git a/l10ntools/inc/gConvXcu.hxx b/l10ntools/inc/gConvXcu.hxx
index b00b9ba431ce..c222eaca2c43 100644
--- a/l10ntools/inc/gConvXcu.hxx
+++ b/l10ntools/inc/gConvXcu.hxx
@@ -29,7 +29,7 @@ class convert_xcu : public convert_gen
bool mbNoCollectingData;
convert_xcu(l10nMem& crMemory);
- ~convert_xcu();
+ ~convert_xcu() {};
void pushKey(char *syyText);
void popKey(char *syyText);
diff --git a/l10ntools/inc/gConvXrm.hxx b/l10ntools/inc/gConvXrm.hxx
index 4187a848f5e6..60b063f64762 100644
--- a/l10ntools/inc/gConvXrm.hxx
+++ b/l10ntools/inc/gConvXrm.hxx
@@ -27,7 +27,7 @@ class convert_xrm : public convert_gen
public:
bool mbNoCollectingData;
convert_xrm(l10nMem& crMemory);
- ~convert_xrm();
+ ~convert_xrm() {};
void setId(char *yytext);
void setLang(char *yytext);
diff --git a/l10ntools/inc/gL10nMem.hxx b/l10ntools/inc/gL10nMem.hxx
index 141b080047b8..635f4fb64702 100644
--- a/l10ntools/inc/gL10nMem.hxx
+++ b/l10ntools/inc/gL10nMem.hxx
@@ -35,41 +35,42 @@ class l10nMem
ENTRY_NORMAL
} ENTRY_STATE;
- static int showError(const string& sText, int iLineNo = 0);
+ static int showError (const string& sText, int iLineNo = 0);
static void showWarning(const string& sText, int iLineNo = 0);
- static void showDebug(const string& sText, int iLineNo = 0);
+ static void showDebug (const string& sText, int iLineNo = 0);
static void showVerbose(const string& sText, int iLineNo = 0);
- static void keyToUpper(string& sKey);
+ static void keyToUpper (string& sKey);
void setModuleName(const string& sModuleName);
const string& getModuleName(void);
- void setResourceName(const string& sResourceName);
- const string& getResourceName(void);
void setLanguage(const string& sLanguage,
- bool bCreate);
- void setConvert(bool bConvert,
- bool bStrict);
+ bool bCreate);
+ void setConvert(bool bConvert,
+ bool bStrict);
void setVerbose(const bool doVerbose);
void setDebug(const bool doDebug);
- void loadEntryKey(int iLineNo,
+ void loadEntryKey(int iLineNo,
const string& sSourceFile,
const string& sKey,
const string& sOrgText,
const string& sText,
- bool bIsFuzzy);
- void setSourceKey(int iLineNo,
+ const string& sComment,
+ const string& sResource,
+ bool bIsFuzzy);
+ void setSourceKey(int iLineNo,
const string& sFilename,
const string& sKey,
const string& sText,
- bool bMustExist);
+ const string& sComment,
+ const string& sResource,
+ bool bMustExist);
void saveTemplates(const string& sTargetDir,
- bool bKid,
- bool bForce);
- void saveLanguages(l10nMem& cMem,
+ bool bForce);
+ void saveLanguages(l10nMem& cMem,
const string& sTargetDir,
- bool bForce);
+ bool bForce);
void dumpMem(const string& sTargetDir);
int prepareMerge();
bool getMergeLang(string& sLang,
@@ -80,17 +81,16 @@ class l10nMem
void convertFromInetString(string& sText);
private:
- bool mbVerbose;
- bool mbDebug;
- bool mbInError;
+ bool mbVerbose;
+ bool mbDebug;
+ bool mbInError;
string msModuleName;
- string msResourceName;
- int miCurFileInx;
- int miCurLangInx;
- int miCurENUSinx;
- bool mbNeedWrite;
- bool mbConvertMode;
- bool mbStrictMode;
+ int miCurFileInx;
+ int miCurLangInx;
+ int miCurENUSinx;
+ bool mbNeedWrite;
+ bool mbConvertMode;
+ bool mbStrictMode;
vector<l10nMem_enus_entry> mcENUSlist;
vector<l10nMem_file_entry> mcFileList;
vector<l10nMem_lang_list_entry> mcLangList;
@@ -105,31 +105,31 @@ class l10nMem
const string& sKey,
const string& sMsgId,
const string& sMsgStr,
- bool bIsFuzzy);
- void saveTemplates(l10nMem& cMem,
- const string& sTargetDir,
- bool bKid,
- bool bForce);
- void loadENUSkey(int iLineNo,
+ bool bIsFuzzy);
+ void loadENUSkey(int iLineNo,
const string& sSourceFile,
const string& sKey,
- const string& sMsgId);
- void loadLangKey(int iLineNo,
+ const string& sMsgId,
+ const string& sComment,
+ const string& sResource);
+ void loadLangKey(int iLineNo,
const string& sSourceFile,
const string& sKey,
const string& sMsgId,
const string& sMsgStr,
- bool bFuzzy);
- void reorganize(bool bConvert);
- bool locateKey(int iLineNo,
+ bool bFuzzy);
+ void reorganize(bool bConvert);
+ bool locateKey(int iLineNo,
const string& sSourceFile,
const string& sKey,
const string& sMsgId,
- bool bThrow);
- void addKey(int iLineNo,
- const string& sSourceFile,
- const string& sKey,
- const string& sMsgId,
+ bool bThrow);
+ void addKey(int iLineNo,
+ const string& sSourceFile,
+ const string& sKey,
+ const string& sMsgId,
+ const string& sComment,
+ const string& sResource,
l10nMem::ENTRY_STATE eStat);
bool findFileName(const string& sSourceFile);
};