GNOME Bugzilla – Bug 553385
gtk-builder-convert creates untranslated combobox models
Last modified: 2009-05-04 02:53:30 UTC
gtk-builder-convert converts translatable gtkcombobox items into an untranslated model: E.g. from glade: <widget class="GtkComboBox" id="title-mode-combobox"> <property name="items" translatable="yes">Replace initial title\n Append initial title\n Prepend initial title\n Keep initial title</property> to builder format: <object class="GtkListStore" id="model1"> <columns> <column type="gchararray"/> </columns> <data> <row> <col id="0">Replace initial title</col> </row> <row> <col id="0">Append initial title</col> </row> <row> <col id="0">Prepend initial title</col> </row> <row> <col id="0">Keep initial title</col> </row> </data> </object> which is missing any "translatable" attributes.
2008-09-24 Johan Dahlin <johan@gnome.org> Bug 553385 – gtk-builder-convert creates untranslated combobox models * gtk/gtk-builder-convert: Set the translatable property on col tags for converted combos.
Reopening. There are two problems with the committed patch: - it now adds "translatable" to all combobox models, even those that were NOT translated in glade - it doesn't work with translation context Also could the eventual fix be merged to gtk-2-14 please?
glade marks all as translated anyway, I couldn't find anyone without. context would make sense though, but it's not heavily used anyway.
In glade-2 you can click on the "..." button next to the items entry and (de)select "translatable" and "use context" in the resulting dialogue. It may not be widely used, but g-b-c should still convert correctly.
A question about this since Im implementing the same thing in glade... How would you convert the i18n context exacly ? Libglade: boolean translatable boolean has_context string comment Builder: boolean translatable string context string comment Im sure theres something... but I just dont know about how the libglade has_context works... *cough* I should go file the same bug against glade...
Created attachment 123993 [details] [review] Patch fix the missing translatable.
Comment on attachment 123993 [details] [review] Patch fix the missing translatable. I have a new patch for this. It add translatable="yes" to the rows only if the original combobox is marked as translatable in glade file. Please see the attachment.
(In reply to comment #6) > Created an attachment (id=123993) [edit] > Patch fix the missing translatable. > You still need to handle the context & comment attributes. I'd fetch the 'text' property value and send it in to create_object, see bug 509153.
Hong Jen Yee: Can you come up with an updated patch soon?
Created attachment 130586 [details] [review] Adds translatable, context and comments attributes to col tags when needed
Patch looks good to me.
So... can this get committed, please?
Comment on attachment 130586 [details] [review] Adds translatable, context and comments attributes to col tags when needed Looks good.