[PATCH] tree view column header i18n; glade-fixup

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

[PATCH] tree view column header i18n; glade-fixup

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

Re: [PATCH] tree view column header i18n; glade-fixup

Christian Stimming
Hi Andreas,

Andreas Köhler schrieb:
>>tree-column-i18n.patch
>
> this one switches the i18n from column headers in tree views from
> N_() + gettext to just _(). It seems this is a leftover from old
> structures that could not be defined via a function call (or
> something like this).

both patches look good to me, although I don't have time to apply it
this week. I guess David will go ahead here...?

> It also introduces the translatable strings "P" (placeholder) and
> "Q" (quotes) used in toggle column headers.

Hm... of course these need to be translated as well. Thanks for pointing
this out.

Of course a single-letter translation string is pretty much bogus... I
guess this would be the first time to apply our potential
"disambiguating prefix" [1] to these translation strings. In this case
where we use such a disambiguating prefix directly in the source code,
this is achieved by simply using the macro Q_() instead of _() [2].

But since we are not yet in string freeze, this patch can be applied
right away and I'll take care of the potential disambiguating prefix
during the next weeks.

Thank you for your contribution.

Christian


[1]
https://lists.gnucash.org/pipermail/gnucash-devel/2005-October/014236.html
[2] http://www.gtk.org/api/2.6/glib/glib-I18N.html#Q-:CAPS
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] tree view column header i18n; glade-fixup

Derek Atkins
Previously in cases like this we'd dome something like:

  _("placeholder account:P")+20

to represent this.   Then we add a translator note that they only translate
the string to the right of the colon, and leave the left-hand side alone.

-derek

Quoting Christian Stimming <[hidden email]>:

> Hi Andreas,
>
> Andreas Köhler schrieb:
>>> tree-column-i18n.patch
>>
>> this one switches the i18n from column headers in tree views from
>> N_() + gettext to just _(). It seems this is a leftover from old
>> structures that could not be defined via a function call (or
>> something like this).
>
> both patches look good to me, although I don't have time to apply it
> this week. I guess David will go ahead here...?
>
>> It also introduces the translatable strings "P" (placeholder) and
>> "Q" (quotes) used in toggle column headers.
>
> Hm... of course these need to be translated as well. Thanks for
> pointing this out.
>
> Of course a single-letter translation string is pretty much bogus...
> I guess this would be the first time to apply our potential
> "disambiguating prefix" [1] to these translation strings. In this
> case where we use such a disambiguating prefix directly in the source
> code, this is achieved by simply using the macro Q_() instead of _()
> [2].
>
> But since we are not yet in string freeze, this patch can be applied
> right away and I'll take care of the potential disambiguating prefix
> during the next weeks.
>
> Thank you for your contribution.
>
> Christian
>
>
> [1]
> https://lists.gnucash.org/pipermail/gnucash-devel/2005-October/014236.html
> [2] http://www.gtk.org/api/2.6/glib/glib-I18N.html#Q-:CAPS
> _______________________________________________
> gnucash-devel mailing list
> [hidden email]
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>



--
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       [hidden email]                        PGP key available


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

Re: [PATCH] tree view column header i18n; glade-fixup

David Hampton-2
On Wed, 2006-02-01 at 09:58 -0500, Derek Atkins wrote:
> Previously in cases like this we'd dome something like:
>
>   _("placeholder account:P")+20
>
> to represent this.   Then we add a translator note that they only translate
> the string to the right of the colon, and leave the left-hand side alone.

That didn't always work.  I remember having to fix some similar
translation strings at one point because the entire string was
translated.  The "disambiguating prefix" should be a more standard way
to handle this problem.

David


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

Re: [PATCH] tree view column header i18n; glade-fixup

Christian Stimming
In reply to this post by Derek Atkins
Derek Atkins schrieb:
> Previously in cases like this we'd dome something like:
>
>  _("placeholder account:P")+20
>
> to represent this.   Then we add a translator note that they only translate
> the string to the right of the colon, and leave the left-hand side alone.

Yes, we had that, and 80% of the translators messed it up in the first
round, and 40% still in the second round. (I guess if you check the
current po files for these strings, you would immediately find ones
which have messed this up... checking... yeah, look for "frozen:f" in
http://svn.gnucash.org/repo/gnucash/trunk/po/da.po ...)

The point is that we obviously needed this "disambiguating prefix"
already long ago, but there wasn't a standard solution available. Now
(since gtk2.4 to be precise) there is a gnome-wide standard solution
available, so we should better use that instead of yet another
home-brewn solution.

Christian

>> [1]
>> https://lists.gnucash.org/pipermail/gnucash-devel/2005-October/014236.html 
>>
>> [2] http://www.gtk.org/api/2.6/glib/glib-I18N.html#Q-:CAPS
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] tree view column header i18n; glade-fixup

Derek Atkins
Quoting Christian Stimming <[hidden email]>:

> Derek Atkins schrieb:
>> Previously in cases like this we'd dome something like:
>>
>>  _("placeholder account:P")+20
>>
>> to represent this.   Then we add a translator note that they only translate
>> the string to the right of the colon, and leave the left-hand side alone.
>
> Yes, we had that, and 80% of the translators messed it up in the
> first round, and 40% still in the second round. (I guess if you check
> the current po files for these strings, you would immediately find
> ones which have messed this up... checking... yeah, look for
> "frozen:f" in http://svn.gnucash.org/repo/gnucash/trunk/po/da.po ...)
>
> The point is that we obviously needed this "disambiguating prefix"
> already long ago, but there wasn't a standard solution available. Now
> (since gtk2.4 to be precise) there is a gnome-wide standard solution
> available, so we should better use that instead of yet another
> home-brewn solution.

I'll note that [2] has the similar restrictions, and we could just
as easily implement it as it currently stands as:

  strchr(_("placeholder account:P"))+1

-derek

> Christian
>
>>> [1]
>>> https://lists.gnucash.org/pipermail/gnucash-devel/2005-October/014236.html 
>>> [2] http://www.gtk.org/api/2.6/glib/glib-I18N.html#Q-:CAPS
>



--
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       [hidden email]                        PGP key available

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

Re: [PATCH] tree view column header i18n; glade-fixup

Christian Stimming
Derek Atkins schrieb:

>>> Previously in cases like this we'd dome something like:
>>>
>>>  _("placeholder account:P")+20
>>>
>>> to represent this.  
>>
>> Yes, we had that, and 80% of the translators messed it up in the first
>> round, and 40% still in the second round.
>>
>
> I'll note that [2] has the similar restrictions, and we could just
> as easily implement it as it currently stands as:
>
>  strchr(_("placeholder account:P"))+1

... except that 1. a ":" does appear in normal string and as such
doesn't indicate something unusual here, whereas "|" doesn't appear in
any normal string (at least not in gnucash -- it was chosen for Q_() for
a reason), so at least it's more obvious that this is not one single
normal string, 2. "|" is the suggested solution to those cases in the
gettext() manual, 3. as I said "|" with Q_() is the suggested solution
from gtk2.4 onwards.

Gee, I fought [3] hard [4] enough [5] during 2001-2003 to convince the
responsible people to include it in gtk, so that there *will* be gnome
standard for this. We shouldn't easily throw away that...

That said, unfortunately I just found this message [6] which says that
gettext will provide a solution for that, but only in yet another
different, incompatible way. That sucks royally.

Christian

>>>> [1]
>>>> https://lists.gnucash.org/pipermail/gnucash-devel/2005-October/014236.html 
>>>> [2] http://www.gtk.org/api/2.6/glib/glib-I18N.html#Q-:CAPS

[3] http://mail.gnome.org/archives/gnome-i18n/2001-September/msg00108.html
[4] http://sourceforge.net/mailarchive/message.php?msg_id=6369594
[5] http://bugzilla.gnome.org/show_bug.cgi?id=97556#c21
[6] http://mail.gnome.org/archives/gnome-i18n/2005-December/msg00087.html

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

Re: [PATCH] tree view column header i18n; glade-fixup

David Hampton-2
In reply to this post by Andreas Köhler
On Wed, 2006-02-01 at 10:34 +0100, Andreas Köhler wrote:

> this one switches the i18n from column headers in tree views from
> N_() + gettext to just _(). It seems this is a leftover from old
> structures that could not be defined via a function call (or
> something like this).
>
> It also introduces the translatable strings "P" (placeholder) and
> "Q" (quotes) used in toggle column headers.

Applied.

> > glade-fixup.patch
>
> according to
>
> http://www.gtk.org/api/2.6/gtk/GtkWindow.html#id2888280
> http://developer.gnome.org/doc/API/2.0/gtk/GtkWindow.html#GtkWindow--urgency-hint
>
> the urgency-hint property of GtkWindows was introduced in Gtk+ 2.8,
> so it should not appear in glade files, right?
>
> The patch adds this property to glade-fixup and removes it
> merge.glade.

Applied yesterday.

David



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