Translation problems; possible solution
David Hampton
hampton at employees.org
Wed Oct 22 23:48:24 CDT 2003
On Wed, 2003-10-22 at 06:28, Christian Stimming wrote:
> Thinking about it, we might be able to use the prefix_gettext() even for
> glade strings: When a widget is loaded and initialized in glade (using
> gettext()), 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 actually might work. It's a bit confusing for the developer that he
> has one label inside the register.glade file but another one that is
> actually displayed, but since the developers need to know a lot about
> their GUI elements anyway I think they would very well be able to handle
> that. And this could be handled in a graceful upgrade: If one developer
> introduces such a prefix_gettext in some widget, the rest of the program
> isn't affected at all. And for the translators this new kind of
> translatable strings can be explained in lengthy comments right in that
> source file.
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.
David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20031022/4d30165d/attachment.pgp
More information about the gnucash-devel
mailing list