After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 553385 - gtk-builder-convert creates untranslated combobox models
gtk-builder-convert creates untranslated combobox models
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkBuilder
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GtkBuilder maintainers
GtkBuilder maintainers
Depends on:
Blocks: 553357
 
 
Reported: 2008-09-23 11:00 UTC by Christian Persch
Modified: 2009-05-04 02:53 UTC
See Also:
GNOME target: 2.26.x
GNOME version: ---


Attachments
Patch fix the missing translatable. (823 bytes, patch)
2008-12-05 11:03 UTC, Hong Jen Yee
none Details | Review
Adds translatable, context and comments attributes to col tags when needed (1.53 KB, patch)
2009-03-13 14:01 UTC, Simon van der Linden
committed Details | Review

Description Christian Persch 2008-09-23 11:00:29 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.
Comment 1 Johan (not receiving bugmail) Dahlin 2008-09-24 09:59:09 UTC
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.
Comment 2 Christian Persch 2008-09-24 11:31:44 UTC
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?
Comment 3 Johan (not receiving bugmail) Dahlin 2008-09-24 13:41:43 UTC
glade marks all as translated anyway, I couldn't find anyone without.
context would make sense though, but it's not heavily used anyway.
Comment 4 Christian Persch 2008-09-24 13:50:43 UTC
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.
Comment 5 Tristan Van Berkom 2008-10-16 15:41:21 UTC
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...
Comment 6 Hong Jen Yee 2008-12-05 11:03:36 UTC
Created attachment 123993 [details] [review]
Patch fix the missing translatable.
Comment 7 Hong Jen Yee 2008-12-05 11:04:44 UTC
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.
Comment 8 Johan (not receiving bugmail) Dahlin 2008-12-05 11:45:01 UTC
(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.
Comment 9 André Klapper 2009-02-05 18:38:30 UTC
Hong Jen Yee: Can you come up with an updated patch soon?
Comment 10 Simon van der Linden 2009-03-13 14:01:11 UTC
Created attachment 130586 [details] [review]
Adds translatable, context and comments attributes to col tags when needed
Comment 11 Matthias Clasen 2009-03-25 05:39:17 UTC
Patch looks good to me.
Comment 12 André Klapper 2009-04-18 14:14:32 UTC
So... can this get committed, please?
Comment 13 Johan (not receiving bugmail) Dahlin 2009-04-21 21:07:57 UTC
Comment on attachment 130586 [details] [review]
Adds translatable, context and comments attributes to col tags when needed

Looks good.