summaryrefslogtreecommitdiff
path: root/lib/localization.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:19:49 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:19:49 +0200
commitc8e0e909b4a8d18319fc65434a10dc446434817c (patch)
treeeee91e7d2ce229dd043811eae8f1e2bd78061916 /lib/localization.cpp
parent5.2 (diff)
downloadFreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.tar.gz
FreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.tar.bz2
FreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.zip
5.3
Diffstat (limited to 'lib/localization.cpp')
-rw-r--r--lib/localization.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/localization.cpp b/lib/localization.cpp
index 3c997074..f056aea0 100644
--- a/lib/localization.cpp
+++ b/lib/localization.cpp
@@ -284,11 +284,16 @@ wxLanguage mapLanguageDialect(wxLanguage language)
case wxLANGUAGE_SWEDISH_FINLAND:
return wxLANGUAGE_SWEDISH;
+ //variants of wxLANGUAGE_NORWEGIAN_BOKMAL
+ case wxLANGUAGE_NORWEGIAN_NYNORSK:
+ return wxLANGUAGE_NORWEGIAN_BOKMAL;
+
//case wxLANGUAGE_CZECH:
//case wxLANGUAGE_DANISH:
//case wxLANGUAGE_FINNISH:
//case wxLANGUAGE_GREEK:
//case wxLANGUAGE_JAPANESE:
+ //case wxLANGUAGE_LITHUANIAN:
//case wxLANGUAGE_POLISH:
//case wxLANGUAGE_SLOVENIAN:
//case wxLANGUAGE_HUNGARIAN:
@@ -384,22 +389,21 @@ void zen::setLanguage(int language)
//load language file into buffer
if (!languageFile.empty()) //if languageFile is empty texts will be english per default
- {
try
{
zen::setTranslator(new FFSLocale(languageFile, static_cast<wxLanguage>(language))); //throw lngfile::ParsingError, PluralForm::ParsingError
}
catch (lngfile::ParsingError& e)
{
- wxMessageBox(wxString(_("Error reading file:")) + wxT(" \"") + languageFile + wxT("\"") + wxT("\n\n") +
- wxT("Row: ") + zen::toStringSep(e.row) + wxT("\n") +
- wxT("Column: ") + zen::toStringSep(e.col) + wxT("\n"), _("Error"), wxOK | wxICON_ERROR);
+ wxMessageBox(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)), _("Error"), wxOK | wxICON_ERROR);
}
catch (PluralForm::ParsingError&)
{
- wxMessageBox(wxT("Invalid Plural Form"), _("Error"), wxOK | wxICON_ERROR);
+ wxMessageBox(L"Invalid Plural Form", _("Error"), wxOK | wxICON_ERROR);
}
- }
}
bgstack15