GNOME Bugzilla – Bug 171393
use stock items, get translations for free
Last modified: 2005-04-06 21:43:52 UTC
I tried running gcalctool in a minority language (Irish) and was disappointed to see that even the stock item were not translated (only the Close button in the About dialog seemed to be translated but from the .po file I can see there is quite a bit more that has been translated. (gcalctool 5.5.41) Looking at the code in gtk.c I could see that although stock icons had been used stock items had not been used and so gcalctool was not benefitting from existing translation work. (I hate to say it but I believe almost all Gnome applications are guilty of this to a greater or lesser extent but I've only checked a few gnome-games and gcaltool so far). the following is a quick list of items that could be probably be replaced with stock items and therefore benefit from stock translations Quit, Edit, Copy Paste (there should probably be a stock item for something like Insert Character/Insert Symbol but unfortunately there isn't) (there should probably be a stock item for View but unfortunately there isn't, yet) Help, Contents About I made a half assed attempt at coming up with a patch but it didn't work and I expect anyone who already knows how to use GtkActionEntry and GtkUIManager would be able to fix this pretty quickly, it might be appropriate to mark it as "gnome-love" (I'd like to figure it out for myself but I really dont have the time, there is other work I'm supposed to be doing.)
The answer is not to use GTK_STOCK_NAME at all and if you want the stock item label to show through to use NULL (thanks to Jody Goldberg/Gnumeric for the tip). Patch should be along in a few minutes hopefully.
Created attachment 39770 [details] [review] patch to let stock translations show through, includes changelog entry That took a little longer than expected but here's a patch including a changelog entry. One down, about a zillion more Gnome programs to go...
Changes checked into CVS HEAD. Version number in configure.in bumped to 5.6.7. Thanks Alan.
My pleasure. If you really want to do me a favour all you need to do is encourage the GTK developers to provide more extensive Stock items and stock lables and encourage other developers to improve the internationalisation of their code. (On another completely different matter I never did get those button colour themes done for gcalctool but now that I have an up to date version I might give it another try and provide you with some alternative colour schemes)