if ( !fileMsg.IsOpened() )
return false;
- // get the file size (assume it is less than 4Gb...)
+ // get the file size (assume it is less than 4GB...)
wxFileOffset lenFile = fileMsg.Length();
if ( lenFile == wxInvalidOffset )
return false;
wxArrayString wxTranslations::GetAvailableTranslations(const wxString& domain) const
{
- wxCHECK_MSG( m_loader, false, "loader can't be NULL" );
+ wxCHECK_MSG( m_loader, wxArrayString(), "loader can't be NULL" );
return m_loader->GetAvailableTranslations(domain);
}
TRACE_I18N,
"string \"%s\"%s not found in %slocale '%s'.",
origString,
- n != UINT_MAX ? wxString::Format("[%ld]", (long)n) : wxString(),
- !domain.empty() ? wxString::Format("domain '%s' ", domain) : wxString(),
+ (n != UINT_MAX ? wxString::Format("[%ld]", (long)n) : wxString()),
+ (!domain.empty() ? wxString::Format("domain '%s' ", domain) : wxString()),
m_lang
);
i != prefixes.end();
++i )
{
+ if ( i->empty() )
+ continue;
wxDir dir;
if ( !dir.Open(*i) )
continue;
resname,
GetResourceType(),
GetModule()) )
- return false;
+ return NULL;
wxLogTrace(TRACE_I18N,
"Using catalog from Windows resource \"%s\".", resname);
domain);
if ( !cat )
+ {
wxLogWarning(_("Resource '%s' is not a valid message catalog."), resname);
+ }
return cat;
}
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;