Re: i18n of app menus



On Mon, Jan 23, 2012 at 3:22 PM, Shaun McCance <shaunm gnome org> wrote:
So I just read this:

http://developer.gnome.org/gio/2.31/gio-GMenu-Markup.html

It turns out this:

 <item label='_New Window' action="" accel='&lt;Primary>n'/>

is really shorthand for this:

 <item>
   <attribute name='label'>_New Window</attribute>
   <attribute name='action'>app.new</attribute>
   <attribute name='accel'>&lt;Primary>n</attribute>
 </item>

or presumably this:

 <item action="" accel='&lt;Primary>n'>
   <attribute name='label'>_New Window</attribute>
 </item>

And attribute elements can have the translatable attribute, so
we really ought to be writing this like this:

 <item action="" accel='&lt;Primary>n'>
   <attribute name='label' translatable='yes'>_New Window</attribute>
 </item>

And then we can use intltool's glade mode and not do terrible hacks
to our XML files.

Thanks for digging this up (it was very well hidden in the... eh... documentation). I'll make this change in epiphany now.

Xan
 


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