From 02c4a82a7f840290b5717edb567fe0e8375f38ba Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Wed, 17 Jan 2001 07:59:19 +0000 Subject: This fixes translations of library messages compared to application This fixes translations of library messages compared to application messages. 2001-01-17 Miguel de Icaza * po/POTFILES.in: update. * gal/widgets/color-palette.c: use e-i18n.h * gal/util/e-i18n.h: Avoid inclussion of the GNOME i18n file as we provide our own. 2001-01-17 Miguel de Icaza * e-table-header-item.c: Use e-i18n.h here. * e-table.c (et_col_spec_to_col): Use gettext here. (et_real_construct): Use gettext too. (et_col_spec_to_col): Use gettext here. * e-cell-date.c: Use e-i18n.h here. * e-table-config.c (config_sort_info_update): Simplify column grabbing code and drop item layout code. (config_group_info_update): ditto. * e-table-config.c: Get correct translation setup working. 2001-01-17 Miguel de Icaza * e-group-bar.c: Use e-i18n.h svn path=/trunk/; revision=7565 --- e-util/e-i18n.h | 39 +++++++++++++++++++++++++++++++++++++++ e-util/e-xml-utils.c | 1 + 2 files changed, 40 insertions(+) create mode 100644 e-util/e-i18n.h (limited to 'e-util') diff --git a/e-util/e-i18n.h b/e-util/e-i18n.h new file mode 100644 index 0000000000..53e4c17155 --- /dev/null +++ b/e-util/e-i18n.h @@ -0,0 +1,39 @@ +/* + * Copied from gnome-i18nP.h, because this header is typically not installed + * + * This file has to be included before any file from the GNOME libraries + * to have this override the definitions that are pulled from the gnome-i18n.h + * + * the difference is that gnome-i18n.h is used for applications, and this is + * used by libraries (because libraries have to use dcgettext instead of + * gettext and they need to provide the translation domain, unlike apps). + * + * So you can just put this after you include config.h + */ + +#ifndef __E_I18N_H__ +#define __E_I18N_H__ + +#ifdef ENABLE_NLS +# include +# undef _ +# define _(String) dgettext (PACKAGE, String) +# ifdef gettext_noop +# define N_(String) gettext_noop (String) +# else +# define N_(String) (String) +# endif +#else +/* Stubs that do something close enough. */ +# define textdomain(String) (String) +# define gettext(String) (String) +# define dgettext(Domain,Message) (Message) +# define dcgettext(Domain,Message,Type) (Message) +# define bindtextdomain(Domain,Directory) (Domain) +# define _(String) (String) +# define N_(String) (String) +#endif + +#define __GNOME_I18N_H__ 1 + +#endif /* __E_I18N_H__ */ diff --git a/e-util/e-xml-utils.c b/e-util/e-xml-utils.c index 0f5d7d7292..4710c8bced 100644 --- a/e-util/e-xml-utils.c +++ b/e-util/e-xml-utils.c @@ -21,6 +21,7 @@ */ #include +#include "gal/util/e-i18n.h" #include #include #include -- cgit v1.2.3