Re: i18n -vs- strings



On 25 Jan, Tom Tromey shouted:
->  I've noticed a tendency in Gnome programs to use strings like "   Ok   "
->  in buttons and such.  Presumably this is done to make the spacing work
->  out correctly.
->  
->  I think this is a bug.  The problem is, it isn't clear how such
->  strings should be translated (should the number of spaces be
->  preserved?  Should the string length?  What are the other buttons that
->  this is supposed to match?).  Also, since different instances will use
->  different numbers of spaces, this means that a given word will have to
->  be translated several different times.
->  
->  Instead of using this hack, we should just mandate that
->  leading/trailing spaces are unacceptable for button labels.  If the
->  spacing is wrong, we should fix the spacing by doing the geometry
->  management correctly.

I've got another idea.. how about.. instead of people creating buttons:

button=gtk_button_new_with_label("Ok");
lets have:
button=gnome_gtk_button_new_standard("ok");

There is a list of standard strings for buttons (ok, cancel, retry,
abort, help, etc....) and these map to text and/or pixmaps in buttons
(so you could replace all "ok" buttons with green ticks, and all
"cancel" buttons with red crosses, if the user so wants). so
internationalisation of standard buttons could merely mean replacing
the "OK" test with "Ja" or "Oui" or "Da" etc. - or just more generic
icons like ticks, corsses etc. - dependant on the internationalisation/
customisation options the user selects.

Any comments?

->  
->  Does anybody disagree?
->  
->  Tom
->  
->  

-- 
--------------- Codito, ergo sum - "I code, therefore I am" --------------------
raster@rasterman.com       /\___ /\ ___/||\___ ____/|/\___  raster@redhat.com
Carsten Haitzler           | _ //__\\ __||_ __\\ ___|| _ /  Red Hat Advanced
218/21 Conner Drive        || // __ \\_ \ | |   \ _/_|| /   Development Labs
Chapel Hill NC 27514 USA   ||\\\/  \//__/ |_|   /___/||\\   919 547 0012 ext 282
+1 (919) 929 9443, 801 4392   For pure Enlightenmenthttp://www.rasterman.com/ 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]