]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/translation.cpp
Create work-around for wxGetEnvMap on OpenVMS (correction)
[wxWidgets.git] / src / common / translation.cpp
index 83b61312942e2f265b50bbb56c6105cdfe7db261..90f02759fc89481e9bdc1d99284baf3619b7f6ba 100644 (file)
@@ -1741,6 +1741,8 @@ wxArrayString wxFileTranslationsLoader::GetAvailableTranslations(const wxString&
           i != prefixes.end();
           ++i )
     {
+        if (i->length() == 0)
+            continue;
         wxDir dir;
         if ( !dir.Open(*i) )
             continue;
@@ -1788,7 +1790,7 @@ wxMsgCatalog *wxResourceTranslationsLoader::LoadCatalog(const wxString& domain,
                              resname,
                              GetResourceType(),
                              GetModule()) )
-        return false;
+        return NULL;
 
     wxLogTrace(TRACE_I18N,
                "Using catalog from Windows resource \"%s\".", resname);
@@ -1798,7 +1800,9 @@ wxMsgCatalog *wxResourceTranslationsLoader::LoadCatalog(const wxString& domain,
         domain);
 
     if ( !cat )
+    {
         wxLogWarning(_("Resource '%s' is not a valid message catalog."), resname);
+    }
 
     return cat;
 }
@@ -1839,13 +1843,15 @@ wxArrayString wxResourceTranslationsLoader::GetAvailableTranslations(const wxStr
     data.prefix.MakeLower(); // resource names are case insensitive
 
     if ( !EnumResourceNames(GetModule(),
-                            GetResourceType(),
+                            GetResourceType().t_str(),
                             EnumTranslations,
                             reinterpret_cast<LONG_PTR>(&data)) )
     {
         const DWORD err = GetLastError();
         if ( err != NO_ERROR && err != ERROR_RESOURCE_TYPE_NOT_FOUND )
+        {
             wxLogSysError(_("Couldn't enumerate translations"));
+        }
     }
 
     return data.langs;