]> git.saurik.com Git - wxWidgets.git/commitdiff
use translators if explicitely specified, fall back to the standard translator-credit...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 8 Oct 2006 14:23:39 +0000 (14:23 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 8 Oct 2006 14:23:39 +0000 (14:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/dialogs/dialogs.cpp
src/gtk/aboutdlg.cpp

index 70eb2b34886ebdbdee71291ffe8229992422b609..8f39a054abf149ce4e38e72ce5994e73db159eb1 100644 (file)
@@ -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))
index 9c00eb3f575d2025b66c86817587587f9d75a609..7c0c374076361b013a02e9b517c56dd2e8c66440 100644 (file)
@@ -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;