]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/internat/internat.cpp
rebake after correction typo in wx/generic/headerctrlg.h name
[wxWidgets.git] / samples / internat / internat.cpp
index b2d4113e24b19ee0cd8e43e4adde9c90a6edd4f1..77d62a296d7adb9b785abf04971c49ac46d23bb7 100644 (file)
@@ -194,7 +194,7 @@ bool MyApp::OnCmdLineParsed(wxCmdLineParser& parser)
             return false;
         }
 
-        m_lang = wx_static_cast(wxLanguage, lang->Language);
+        m_lang = static_cast<wxLanguage>(lang->Language);
     }
 
     return true;
@@ -218,16 +218,13 @@ bool MyApp::OnInit()
         m_lang = lng == -1 ? wxLANGUAGE_DEFAULT : langIds[lng];
     }
 
-    if ( m_lang != wxLANGUAGE_DEFAULT )
+    // don't use wxLOCALE_LOAD_DEFAULT flag so that Init() doesn't return
+    // false just because it failed to load wxstd catalog
+    if ( !m_locale.Init(m_lang, wxLOCALE_CONV_ENCODING) )
     {
-        // don't use wxLOCALE_LOAD_DEFAULT flag so that Init() doesn't return
-        // false just because it failed to load wxstd catalog
-        if ( !m_locale.Init(m_lang, wxLOCALE_CONV_ENCODING) )
-        {
-            wxLogWarning(_("This language is not supported by the system."));
+        wxLogWarning(_("This language is not supported by the system."));
 
-            // continue nevertheless
-        }
+        // continue nevertheless
     }
 
     // normally this wouldn't be necessary as the catalog files would be found
@@ -414,7 +411,7 @@ void MyFrame::OnOpen(wxCommandEvent& WXUNUSED(event))
 
 void MyFrame::OnTest1(wxCommandEvent& WXUNUSED(event))
 {
-    const wxChar* title = _("Testing _() (gettext)");
+    const wxString title = _("Testing _() (gettext)");
     wxTextEntryDialog d(this, _("Please enter text to translate"),
         title, wxTRANSLATE("default value"));
     if (d.ShowModal() == wxID_OK)
@@ -429,7 +426,7 @@ void MyFrame::OnTest1(wxCommandEvent& WXUNUSED(event))
 
 void MyFrame::OnTest2(wxCommandEvent& WXUNUSED(event))
 {
-    const wxChar* title = _("Testing _N() (ngettext)");
+    const wxString title = _("Testing _N() (ngettext)");
     wxTextEntryDialog d(this,
         _("Please enter range for plural forms of \"n files deleted\" phrase"),
         title, _T("0-10"));