Log match directory in GetAvailableTranslations(). Log search paths
with one directory per line, for better readability when debugging.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74440
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxLogTrace(TRACE_I18N, "%s: [%s]", prefix, wxJoin(arr, ','));
}
wxLogTrace(TRACE_I18N, "%s: [%s]", prefix, wxJoin(arr, ','));
}
+void LogTraceLargeArray(const char *prefix, const wxArrayString& arr)
+{
+ wxLogTrace(TRACE_I18N, "%s:", prefix);
+ for ( wxArrayString::const_iterator i = arr.begin(); i != arr.end(); ++i )
+ wxLogTrace(TRACE_I18N, " %s", *i);
+}
+
// Use locale-based detection as a fallback
wxString GetPreferredUILanguageFallback(const wxArrayString& WXUNUSED(available))
{
// Use locale-based detection as a fallback
wxString GetPreferredUILanguageFallback(const wxArrayString& WXUNUSED(available))
{
{
wxString searchPath = GetFullSearchPath(lang);
{
wxString searchPath = GetFullSearchPath(lang);
- wxLogTrace(TRACE_I18N, wxS("Looking for \"%s.mo\" in search path \"%s\""),
- domain, searchPath);
+ LogTraceLargeArray
+ (
+ wxString::Format("looking for \"%s.mo\" in search path", domain),
+ wxSplit(searchPath, wxPATH_SEP[0])
+ );
wxFileName fn(domain);
fn.SetExt(wxS("mo"));
wxFileName fn(domain);
fn.SetExt(wxS("mo"));
wxArrayString langs;
const wxArrayString prefixes = GetSearchPrefixes();
wxArrayString langs;
const wxArrayString prefixes = GetSearchPrefixes();
- wxLogTrace(TRACE_I18N,
- "looking for available translations of \"%s\" in search path \"%s\"",
- domain, wxJoin(prefixes, wxPATH_SEP[0]));
+ LogTraceLargeArray
+ (
+ wxString::Format("looking for available translations of \"%s\" in search path", domain),
+ prefixes
+ );
for ( wxArrayString::const_iterator i = prefixes.begin();
i != prefixes.end();
for ( wxArrayString::const_iterator i = prefixes.begin();
i != prefixes.end();
#endif // __WXOSX__
wxLogTrace(TRACE_I18N,
#endif // __WXOSX__
wxLogTrace(TRACE_I18N,
- "found %s translation of \"%s\"", lang, domain);
+ "found %s translation of \"%s\" in %s",
+ lang, domain, langdir);
langs.push_back(lang);
}
}
langs.push_back(lang);
}
}