Translation problems; possible solution

Christian Stimming stimming at tuhh.de
Thu Oct 23 11:58:01 CDT 2003


David Hampton schrieb:
> On Wed, 2003-10-22 at 06:28, Christian Stimming wrote:
>>
>>we could afterwards change the labels "manually" from 
>>gnucash again, this time using prefix_gettext(). I.e.
>>
>>   GladeXML *xml = gnc_glade_xml_new ("register.glade",
>>			"Some Register Widget");
>>   GtkWidget *dialog = glade_xml_get_widget (xml, "The widget window");
>>   GtkWidget *some_label = glade_xml_get_widget (xml, "some_label");
>>   gtk_label_set_text (GTK_LABEL (some_label), Q_("new file|New"));
>>   gtk_widget_show_all (dialog);
>>
> 
> This will produce unsupportable code.  I, as a developer, expect that
> the strings put into a glade file are what will appear (translated) on
> the screen when a user runs the program.  I do not expect to have to go
> looking in a C source code file to double check and see if the glade
> string has been overwritten by a C string.  Your time would be better
> spent fixing glade/libglade to use prefix_gettext so that all projects
> could benefit from the change, not just gnucash.

Well, if the developers here don't want this then we won't do this. I'll 
see how the libglade developer thinks about such a change in libglade, 
but in libglade this surely would only happen in their gnome2 branch and 
of course propagating a libglade update into the distros will take ages.

Nevertheless I'm not really sure whether it is that big of a deal. I was 
thinking that the developer himself who writes the GUI also adds these 
additional label change functions. In that case the developer would know 
about his code well enough. And in principle it happens often enough 
that a GtkLabel from glade has its text changed from inside some C code, 
so the fact that such things happen is not that much unusual. Point is 
that this solution would make all translators extreeeemly happy and 
solve this otherwise unsolvable problem. But again, if the developer's 
don't like it then we won't do it.

Christian



More information about the gnucash-devel mailing list