GNOME Bugzilla – Bug 518642
Custom tags and translatable content
Last modified: 2009-04-06 16:14:22 UTC
GtkBuilder supports GtkListStore, but there's no way of marking data inserted into the model as translatable. The same attributes that are used for properties should be used to make it easier for tools such as gettext/intltool, eg: translatable=yes/no comments=string context=string A review of all custom tags and their translatable content needs to be done.
Doing a quick grep shows that only accessible [in addition to liststore] needs to be marked as translatable. Unfortunately, the accessible content is stored in an attribute, which goes against the property norm.
<col> tags under GtkListStore now accepts translatable/context/comment attributes. Still missing a solution for accessible. 2008-02-29 Johan Dahlin <johan@gnome.org> * demos/gtk-demo/demo.ui: * gtk/gtkbuilderparser.c: * gtk/gtkbuilderprivate.h: * gtk/gtkliststore.c: * tests/buildertest.c: Add translatable/context and comment attributes on <col> tags under a GtkListStore. Refactor parts of the translation api and make it available inside gtk+ itself. Update tests and example. Fixes a part of #518642
What accessible content is stored in an attribute ? " <child internal-child=\"accessible\">" " <object class=\"AtkObject\" id=\"a11y-label1\">" " <property name=\"AtkObject::accessible-name\">A Label</property>" " </object>" " </child>" looks to me like "A Label" is here the accessible content that we want translated.
From gtk/tests/builder.c: " <object class=\"GtkButton\" id=\"button1\">" " <accessibility>" " <action action_name=\"click\" description=\"Click Me\"/>" " </accessibility>" " </object>" The description "Click Me" should be translatable.
How about if we allow <object class="GtkButton" id="button1"> <accessibility> <action action_name="click" translatable="yes">Click Me</action> </accessibility> </object> Of course, we'll have to keep support for the description attribute.
That would be pretty fine to me. We could deprecate the description and use the text instead.
Created attachment 132170 [details] [review] patch