use translators if explicitely specified, fall back to the standard translator-credits from message catalog otherwise
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1227,6 +1227,8 @@ static void InitAboutInfoAll(wxAboutDialogInfo& info)
|
||||
"\n"
|
||||
" ...and so on and so forth...\n"
|
||||
));
|
||||
|
||||
info.AddTranslator(_T("Wun Ngo Wen (Martian)"));
|
||||
}
|
||||
|
||||
void MyFrame::ShowSimpleAboutDialog(wxCommandEvent& WXUNUSED(event))
|
||||
|
@@ -116,14 +116,24 @@ void wxAboutBox(const wxAboutDialogInfo& info)
|
||||
gtk_about_dialog_set_documenters(dlg, GtkArray(info.GetDocWriters()));
|
||||
if ( info.HasArtists() )
|
||||
gtk_about_dialog_set_artists(dlg, GtkArray(info.GetArtists()));
|
||||
|
||||
wxString transCredits;
|
||||
if ( info.HasTranslators() )
|
||||
{
|
||||
gtk_about_dialog_set_translator_credits
|
||||
(
|
||||
dlg,
|
||||
GtkStr(_("translator-credits"))
|
||||
);
|
||||
const wxArrayString& translators = info.GetTranslators();
|
||||
const size_t count = translators.size();
|
||||
for ( size_t n = 0; n < count; n++ )
|
||||
{
|
||||
transCredits << translators[n] << _T('\n');
|
||||
}
|
||||
}
|
||||
else // no translators explicitely specified
|
||||
{
|
||||
// maybe we have translator credits in the message catalog?
|
||||
transCredits = _("translator-credits");
|
||||
}
|
||||
|
||||
gtk_about_dialog_set_translator_credits(dlg, GtkStr(transCredits));
|
||||
|
||||
gtk_widget_show(GTK_WIDGET(dlg));
|
||||
return;
|
||||
|
Reference in New Issue
Block a user