i18n issues: Markup in glade labels?

David Hampton hampton-gnucash at rainbolthampton.net
Sun Nov 13 21:25:02 EST 2005


On Sat, 2005-11-12 at 10:35 +0100, Christian Stimming wrote:

> One issue that I've encountered now is that in HEAD there are many text labels 
> in glade files where the label text contains Markup. As in:
> 
> #: ../src/business/business-gnome/glade/businessprefs.glade.h:1
> msgid "<b>Bills</b>"
> 
> which is from the glade file 
> src/business/business-gnome/glade/businessprefs.glade. There are 50 other 
> such messages.

Looks like my changes to the preferences dialog.   This is "Pango Text
Attribute Markup Language" [1].  

> The gnome-i18n guide also recommends not to use such messages with markup [1]. 
> Question: Is there any way we could get rid of the markup in the 
> to-be-translated part of the message? If there is any way, then I would 
> kindly ask to implement it...

The Gnome HIG recommends separating sections of a dialog with bold text
instead of using frames. [2]  That's why I added these labels to the
glade files.  Clearly we have a case of conflicting standards here. :-(

I was planning to make a pass over *all* the dialogs in Gnucash and
convert them from using frames (aka gtk1 style) to using bold labels and
spacing (gtk2 style).  Not marking the labels in bold in the glade file
means that I will have to insert additional code in gnucash to find each
section label, extract the translated text, create a new string of the
form "<b>[translated-text]</b>", and then overwrite the text in the
label with the bold version of the text.  Using pango text markup is
clearly easier from my point of view.

David

P.S. I wouldn't have any problem with this suggestion if the strings
were contained in the C source files.


[1] http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html
[2] http://developer.gnome.org/projects/gup/hig/2.0/controls-frames.html




More information about the gnucash-devel mailing list