diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:22:36 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:22:36 +0200 |
commit | ecb1524f8da7901338b263384fed3c612f117b4c (patch) | |
tree | e7e06423fe27ea5ab45f27fc4b39ae597ba72490 /lib/localization.cpp | |
parent | 5.10 (diff) | |
download | FreeFileSync-ecb1524f8da7901338b263384fed3c612f117b4c.tar.gz FreeFileSync-ecb1524f8da7901338b263384fed3c612f117b4c.tar.bz2 FreeFileSync-ecb1524f8da7901338b263384fed3c612f117b4c.zip |
5.11
Diffstat (limited to 'lib/localization.cpp')
-rw-r--r-- | lib/localization.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/localization.cpp b/lib/localization.cpp index 5792b3d1..47ed1881 100644 --- a/lib/localization.cpp +++ b/lib/localization.cpp @@ -35,21 +35,21 @@ public: virtual std::wstring translate(const std::wstring& text) { //look for translation in buffer table - const Translation::const_iterator iter = transMapping.find(text); - if (iter != transMapping.end()) - return iter->second; + const Translation::const_iterator it = transMapping.find(text); + if (it != transMapping.end()) + return it->second; return text; //fallback } virtual std::wstring translate(const std::wstring& singular, const std::wstring& plural, int n) { - TranslationPlural::const_iterator iter = transMappingPl.find(std::make_pair(singular, plural)); - if (iter != transMappingPl.end()) + TranslationPlural::const_iterator it = transMappingPl.find(std::make_pair(singular, plural)); + if (it != transMappingPl.end()) { const int formNo = pluralParser->getForm(n); - if (0 <= formNo && formNo < static_cast<int>(iter->second.size())) - return iter->second[formNo]; + if (0 <= formNo && formNo < static_cast<int>(it->second.size())) + return it->second[formNo]; } return n == 1 ? singular : plural; //fallback } @@ -72,7 +72,7 @@ FFSLocale::FFSLocale(const wxString& filename, wxLanguage languageId) : langId_( { inputStream = loadStream(filename); //throw XmlFileError } - catch (...) + catch (const XmlFileError&) { throw lngfile::ParsingError(0, 0); } @@ -378,10 +378,10 @@ void zen::setLanguage(int language) //throw FileError //(try to) retrieve language file wxString languageFile; - for (auto iter = ExistingTranslations::get().begin(); iter != ExistingTranslations::get().end(); ++iter) - if (iter->languageID == language) + for (auto it = ExistingTranslations::get().begin(); it != ExistingTranslations::get().end(); ++it) + if (it->languageID == language) { - languageFile = iter->languageFile; + languageFile = it->languageFile; break; } @@ -397,8 +397,8 @@ void zen::setLanguage(int language) //throw FileError { throw FileError(replaceCpy(replaceCpy(replaceCpy(_("Error parsing file %x, row %y, column %z."), L"%x", fmtFileName(toZ(languageFile))), - L"%y", numberTo<std::wstring>(e.row)), - L"%z", numberTo<std::wstring>(e.col))); + L"%y", numberTo<std::wstring>(e.row + 1)), + L"%z", numberTo<std::wstring>(e.col + 1))); } catch (PluralForm::ParsingError&) { |