GNOME Bugzilla – Bug 418434
About dialog title can't be properly translated
Last modified: 2007-07-11 05:18:52 UTC
I'm working on a translation of parts of GNOME into Irish and I've come upon an issue with the translation process. The preposition necessary for saying "about" ("faoi") causes certain mutations on the following words in certain situations, and itself changes sometimes. With the string "An Painéal GNOME" ("The GNOME Panel") the title would have to read "Eolas faoin bPainéal GNOME" rather than "Eolas faoi An Painéal GNOME". Removing the first word of "The GNOME Panel" would require entirely different mutations. Unfortunately, as it stands, I don't see any way to translate the title of the about dialogs when using two separate strings to do the translation. I realize that this would require somewhat extensive changes, but is necessary in this instance for a proper translation.
Fixing this is actually very simple and doesn't require any GTK+ changes at all. While GtkAboutDialog sets the "title" property of GtkWindow to _("About %s") (and fills in the name property), you can simply directly set the title: gtk_show_about_dialog (GTK_WINDOW (window), "name", "GTK+ Code Demos", "version", PACKAGE_VERSION, "copyright", "(C) 1997-2005 The GTK+ Team", "license", license, "website", "http://www.gtk.org", "comments", "Program to demonstrate GTK+ functions.", "authors", authors, "documenters", documentors, "logo", transparent, "title", "foobie doobie", NULL); works as one would hope.
This is a workable solution on a small scale, but unfortunately this is a problem that can apply unpredictably to virtually any gtk+ application and most developers won't even think of it. It seems to me like the only solution that will be able to solve the problem in the large scale is a way for a translator to override the string without having to edit the code itself. It seems like it should be possible to do this without breaking the API or requiring that every package change this part of the code, but I suppose that I'm just not really sure. I don't know what the Right Thing to do here is, but the proposed solution doesn't quite seem like it.
I can't think of any good solutions unfortunately. GTK+ doesn't know the gettext domain used by the application, and looking up "About FOO" in the gtk translation domain won't yield any results... So I think this needs to be fixed in apps. What we can do in GTK+ is updating the documentation to point out best practise. You could bring it up on desktop-devel-list and maybe make this a Gnome Goal.
I suppose this will have to do for the moment. Perhaps in the future, however, it would be a good idea to make this a stronger requirement somehow, by perhaps making it a required argument to the creating function. This would, of course, break API and as such would have to be done quite some time from now, but perhaps it could be noted somewhere as something to consider when the time comes.
I've added a paragraph about setting the title to the GtkAboutDialog documentation and examples now.