diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 16:58:10 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 16:58:10 +0200 |
commit | fefe20351d0720683990b666584b6879c90bd37d (patch) | |
tree | 8ab90520ae2123ac84293b0f9cec006317e5fc01 /library/localization.cpp | |
parent | 1.18 (diff) | |
download | FreeFileSync-fefe20351d0720683990b666584b6879c90bd37d.tar.gz FreeFileSync-fefe20351d0720683990b666584b6879c90bd37d.tar.bz2 FreeFileSync-fefe20351d0720683990b666584b6879c90bd37d.zip |
1.19
Diffstat (limited to 'library/localization.cpp')
-rw-r--r-- | library/localization.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/library/localization.cpp b/library/localization.cpp index 328f37be..ef433012 100644 --- a/library/localization.cpp +++ b/library/localization.cpp @@ -129,7 +129,7 @@ void CustomLocale::setLanguage(const int language) currentLanguage = wxLANGUAGE_ENGLISH; } - static bool initialized = false; //wxLocale is a global too! + static bool initialized = false; //wxLocale is a static global too! if (!initialized) { initialized = true; @@ -152,7 +152,7 @@ void CustomLocale::setLanguage(const int language) //Linux: 0xa \n //Mac: 0xd \r //Win: 0xd 0xa \r\n <- language files are in Windows format - for (int rowNumber = 0; langFile.getline(temp, bufferSize, 0xd); ++rowNumber) //specify delimiter explicitly + for (int rowNumber = 0; langFile.getline(temp, bufferSize, 0xD); ++rowNumber) //specify delimiter explicitly { langFile.get(); //discard the 0xa character @@ -165,8 +165,11 @@ void CustomLocale::setLanguage(const int language) currentLine.original = formattedString; else { - currentLine.translation = formattedString; - translationDB->insert(currentLine); + if (!formattedString.empty()) + { + currentLine.translation = formattedString; + translationDB->insert(currentLine); + } } } langFile.close(); |