i18n issues: Markup in glade labels?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

i18n issues: Markup in glade labels?

Christian Stimming
I'm now starting to review the strings marked for translation (i18n =
internationalization) in gnucash. During this process I'll point out
different issues that would require to change the marked strings in the
gnucash source code.

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. The problem here is that the markup contains no relevant
information to the translator. And the words in itself (without the markup)
are also already translated somewhere in the file -- only the fact that here
it is noted with the HTML markup makes them a second msgid. This is rather a
nuisance to the translators...

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...

Christian



[1] http://developer.gnome.org/doc/tutorials/gnome-i18n/developer.html

Section: Avoid markup wherever possible

(...) In this type of messages, the markup contains no relevant information to
the translator, since all the translatable content is embedded in the markup
(in the last example above, the message could just as well have been split
into two separate messages, so this still applies). Instead, these messages
are just an extra source for errors (when the markup gets accidentally
"mistranslated"), a nuisance, and create lots of extra and totally
unnecessary work for the translators. Whenever the markup for a message
should change the slightest, all translations will have to be updated, even
though no translatable content changed. Whenever a new message is added that
has surrounding markup, even if the exact same message without this exact
markup was translated before, the message will have to be "translated" again.
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: i18n issues: Markup in glade labels?

Andreas Köhler
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: i18n issues: Markup in glade labels?

Christian Stimming
Hi,

thanks for pointing to that bug report. *sigh* Unfortunately it seems the
glade/libglade developers were unable to agree on a common technical solution
to this problem. And it's back on the translators to simply put up with that
(albeit small) number of duplicated translations.

As for gnucash, roughly 50 strings are concerned, but only (I just checked)
about 15 of these did appear in the 1-8-branch. So if there were a technical
solution to ignoring this markup, then it would save 15 new translations.

So yes, I have to agree with Andreas: Unfortunately we just have to accept
that limitation of glade/libglade and translate these additional string.

By the way, the translation file itself grew much larger in HEAD: Instead of
the 2800 msgids that we had in gnucash-1.8.12 we now have 3400 msgids, of
which roughly 1100 are untranslated when merging a 100%-translated 1.8 po
file into HEAD. This means there is quite some work ahead for all
translators.

Christian

Am Samstag, 12. November 2005 11:46 schrieb Andreas Köhler:

> Hi,
>
> regarding markup in glade files:
>
> http://bugzilla.gnome.org/show_bug.cgi?id=97061
>
> So I guess it is easier not to spend too much time on discussing how
> this could be solved :)
>
> --andi5
>
> On Saturday, 12 Nov 2005, 10:35 CET, Christian Stimming wrote:
> > I'm now starting to review the strings marked for translation (i18n =
> > internationalization) in gnucash. During this process I'll point out
> > different issues that would require to change the marked strings in the
> > gnucash source code.
> >
> > 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. The problem here is that the markup contains no relevant
> > information to the translator. And the words in itself (without the
> > markup) are also already translated somewhere in the file -- only the
> > fact that here it is noted with the HTML markup makes them a second
> > msgid. This is rather a nuisance to the translators...

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: i18n issues: Markup in glade labels?

David Hampton-2
In reply to this post by Christian Stimming
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


_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel