From gtk-devel Mon Jan 23 14:22:25 2012 From: Shaun McCance Date: Mon, 23 Jan 2012 14:22:25 +0000 To: gtk-devel Subject: Re: i18n of app menus Message-Id: <1327328545.2185.143.camel () recto> X-MARC-Message: https://marc.info/?l=gtk-devel&m=132732873910581 On Mon, 2012-01-23 at 09:11 -0500, Shaun McCance wrote: > On Mon, 2012-01-23 at 06:36 -0500, Matthias Clasen wrote: > > On Sun, Jan 22, 2012 at 3:13 PM, Olav Vitters wrote: > > > How can those app menus be translated? Is anyone on the gnome-i18n > > > mailing list? > > > > The same way gtkbuilder xml files can be translated. Specify the > > domain when loading the xml file, and put the strings into your mo > > file. > > You can use intltool with the usual _-prefixing convention for attribute names. > > That's not the way GtkBuilder XML files have been translated. The > strings were extracted using intltool's glade mode, not xml mode. > This extracts the contents of any element with translatable="yes". > But now instead of translatable strings being in the contents of > marked elements, they're in attribute values. From epiphany: > > http://git.gnome.org/browse/epiphany/plain/data/ui/epiphany-application-menu.ui So I just read this: http://developer.gnome.org/gio/2.31/gio-GMenu-Markup.html It turns out this: is really shorthand for this: _New Window app.new <Primary>n or presumably this: _New Window And attribute elements can have the translatable attribute, so we really ought to be writing this like this: _New Window And then we can use intltool's glade mode and not do terrible hacks to our XML files. -- Shaun _______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list