r12208 - gnucash/trunk - Mark budget strings for i18n
Christian Stimming
stimming at tuhh.de
Fri Dec 30 14:20:17 EST 2005
Am Freitag, 30. Dezember 2005 17:00 schrieb Chris Shoemaker:
> Author: chris
> Date: 2005-12-30 11:00:05 -0500 (Fri, 30 Dec 2005)
> New Revision: 12208
> Trac: http://svn.gnucash.org/trac/changeset/12208
>
> Log:
> Mark budget strings for i18n
I think in some places you should've used _("...") instead of N_("...").
* The N_("...") is a no-op for the C side -- it only marks the strings for
translation, but doesn't actually call gettext(). This is useful in array
definitions where you can't use a function call, and also in other places
where the strings will be passed through gettext() at a later point in time
(e.g. most of the scheme option dialogs).
* The _("...") OTOH directly calls gettext() and will return a const char*
with the translated string. Use this if you pass a const char* to some
gtk/glib function that will directly use the passed const char*.
In particular,
--- gnucash/trunk/src/gnome/gnc-plugin-budget.c (revision 12207)
+++ gnucash/trunk/src/gnome/gnc-plugin-budget.c (revision 12208)
@@ -216,7 +216,7 @@
gboolean ok;
dlg = GTK_DIALOG(gtk_dialog_new_with_buttons(
- "Select a Budget", NULL, GTK_DIALOG_MODAL,
+ N_("Select a Budget"), NULL, GTK_DIALOG_MODAL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL));
^^ this should probably be a _( ) instead of N_( ), as well as the changes in
gnc-tree-model-budget.c
Regards,
Christian
More information about the gnucash-devel
mailing list