After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 171393 - use stock items, get translations for free
use stock items, get translations for free
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
5.5.x
Other All
: Normal normal
: ---
Assigned To: Rich Burridge
Rich Burridge
Depends on:
Blocks:
 
 
Reported: 2005-03-23 18:48 UTC by Alan Horkan
Modified: 2005-04-06 21:43 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
patch to let stock translations show through, includes changelog entry (2.22 KB, patch)
2005-04-06 20:08 UTC, Alan Horkan
none Details | Review

Description Alan Horkan 2005-03-23 18:48:22 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.)
Comment 1 Alan Horkan 2005-04-06 19:38:29 UTC
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.  
Comment 2 Alan Horkan 2005-04-06 20:08:39 UTC
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...
Comment 3 Rich Burridge 2005-04-06 21:20:41 UTC
Changes checked into CVS HEAD. Version number in
configure.in bumped to 5.6.7. Thanks Alan.
Comment 4 Alan Horkan 2005-04-06 21:43:52 UTC
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)