Index: src/libictranslate/ResourceManager.cpp =================================================================== diff -u -ra347fac4097d0504825a93fec5233adade6345a3 -rf1ce2f1e90a5a90b713a998cda2d4cdaf2090fbd --- src/libictranslate/ResourceManager.cpp (.../ResourceManager.cpp) (revision a347fac4097d0504825a93fec5233adade6345a3) +++ src/libictranslate/ResourceManager.cpp (.../ResourceManager.cpp) (revision f1ce2f1e90a5a90b713a998cda2d4cdaf2090fbd) @@ -298,24 +298,12 @@ } -bool CLangData::ReadTranslation(PCTSTR pszFile, bool bReadBase) +bool CLangData::ReadTranslation(PCTSTR pszFile, bool bUpdateTranslation) { try { - // first read the standard language - hard-code english one - const tchar_t* pszBaseName = _t("english.lng"); - if(!bReadBase && _tcsstr(pszFile, pszBaseName) == NULL) - { + if(!bUpdateTranslation) Clear(); - TCHAR szData[512]; - const TCHAR* pszName=_tcsrchr(pszFile, _T('\\')); - if(pszName) - { - _tcsncpy(szData, pszFile, pszName-pszFile+1); - _tcscpy(szData+(pszName-pszFile+1), pszBaseName); - ReadTranslation(szData, true); - } - } // load data from file icpf::config cfg(icpf::config::eIni); @@ -376,7 +364,7 @@ return false; SetVersion(psz); - m_bUpdating = !bReadBase; + m_bUpdating = bUpdateTranslation; m_uiSectionID = 0; if(!cfg.enum_properties(_t("*"), EnumAttributesCallback, this)) { @@ -385,8 +373,7 @@ } m_bUpdating = false; - if(!m_bUpdating) - SetFilename(pszFile); + SetFilename(pszFile); return true; } Index: src/libictranslate/ResourceManager.h =================================================================== diff -u -ra347fac4097d0504825a93fec5233adade6345a3 -rf1ce2f1e90a5a90b713a998cda2d4cdaf2090fbd --- src/libictranslate/ResourceManager.h (.../ResourceManager.h) (revision a347fac4097d0504825a93fec5233adade6345a3) +++ src/libictranslate/ResourceManager.h (.../ResourceManager.h) (revision f1ce2f1e90a5a90b713a998cda2d4cdaf2090fbd) @@ -49,8 +49,8 @@ public: // construction/destruction CLangData(); - ~CLangData(); CLangData(const CLangData& ld); + ~CLangData(); CLangData& operator=(const CLangData& rSrc); @@ -100,7 +100,7 @@ static void EnumAttributesCallback(bool bGroup, const tchar_t* pszName, const tchar_t* pszValue, ptr_t pData); static void UnescapeString(tchar_t* pszData); -public: +protected: TCHAR *m_pszFilename; // file name of the language data (with path) TCHAR *m_pszLngName; // name of the language (ie. Chinese (PRC)) TCHAR *m_pszBaseFile; // file with base language data (wo path)