aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnu.org>2001-01-17 15:59:19 +0800
committerMiguel de Icaza <miguel@src.gnome.org>2001-01-17 15:59:19 +0800
commit02c4a82a7f840290b5717edb567fe0e8375f38ba (patch)
tree2e82c690577f775b9e4777e9dac047d1a109d919
parent8063555853d12b632539322d0e8b927b4a0d73cf (diff)
downloadgsoc2013-evolution-02c4a82a7f840290b5717edb567fe0e8375f38ba.tar
gsoc2013-evolution-02c4a82a7f840290b5717edb567fe0e8375f38ba.tar.gz
gsoc2013-evolution-02c4a82a7f840290b5717edb567fe0e8375f38ba.tar.bz2
gsoc2013-evolution-02c4a82a7f840290b5717edb567fe0e8375f38ba.tar.lz
gsoc2013-evolution-02c4a82a7f840290b5717edb567fe0e8375f38ba.tar.xz
gsoc2013-evolution-02c4a82a7f840290b5717edb567fe0e8375f38ba.tar.zst
gsoc2013-evolution-02c4a82a7f840290b5717edb567fe0e8375f38ba.zip
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 <miguel@gnu.org> * 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 <miguel@gnu.org> * 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 <miguel@gnu.org> * e-group-bar.c: Use e-i18n.h svn path=/trunk/; revision=7565
-rw-r--r--e-util/e-i18n.h39
-rw-r--r--e-util/e-xml-utils.c1
-rw-r--r--widgets/table/e-cell-date.c1
-rw-r--r--widgets/table/e-table-config.c1
-rw-r--r--widgets/table/e-table-header-item.c1
-rw-r--r--widgets/table/e-table.c7
6 files changed, 47 insertions, 3 deletions
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 <libintl.h>
+# 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 <locale.h>
+#include "gal/util/e-i18n.h"
#include <math.h>
#include <gnome-xml/parser.h>
#include <gnome-xml/xmlmemory.h>
diff --git a/widgets/table/e-cell-date.c b/widgets/table/e-cell-date.c
index e8d9d5a2bd..b59f001d6a 100644
--- a/widgets/table/e-cell-date.c
+++ b/widgets/table/e-cell-date.c
@@ -5,6 +5,7 @@
*/
#include <config.h>
+#include "gal/util/e-i18n.h"
#include "e-cell-date.h"
#include <gnome.h>
#include <sys/time.h>
diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c
index a8c413dd98..e2d96faa56 100644
--- a/widgets/table/e-table-config.c
+++ b/widgets/table/e-table-config.c
@@ -11,6 +11,7 @@
#include <config.h>
#include <stdlib.h>
+#include "gal/util/e-i18n.h"
#include <libgnomeui/gnome-dialog.h>
#include <glade/glade.h>
#include "e-table-config.h"
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 839cb5bce2..dae8d595b5 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -10,6 +10,7 @@
#include <config.h>
#include <gtk/gtksignal.h>
#include <gtk/gtkdnd.h>
+#include "gal/util/e-i18n.h"
#include <libgnomeui/gnome-canvas.h>
#include <libgnomeui/gnome-canvas-util.h>
#include <libgnomeui/gnome-canvas-polygon.h>
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 5e597bdd0c..fafdaf177a 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -16,6 +16,7 @@
#include <alloca.h>
#endif
#include <stdio.h>
+#include "gal/util/e-i18n.h"
#include <libgnomeui/gnome-canvas.h>
#include <gtk/gtksignal.h>
@@ -666,7 +667,7 @@ et_col_spec_to_col (ETable *e_table,
ete, col_spec->pixbuf);
if (pixbuf) {
col = e_table_col_new_with_pixbuf (
- col_spec->model_col, _(col_spec->title),
+ col_spec->model_col, gettext (col_spec->title),
pixbuf, col_spec->expansion,
col_spec->minimum_width,
cell, compare, col_spec->resizable);
@@ -674,7 +675,7 @@ et_col_spec_to_col (ETable *e_table,
}
if (col == NULL && col_spec->title && *col_spec->title) {
col = e_table_col_new (
- col_spec->model_col, _(col_spec->title),
+ col_spec->model_col, gettext (col_spec->title),
col_spec->expansion, col_spec->minimum_width,
cell, compare, col_spec->resizable);
}
@@ -897,7 +898,7 @@ et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
ete = e_table_extras_new();
e_table->use_click_to_add = specification->click_to_add;
- e_table->click_to_add_message = g_strdup (_(specification->click_to_add_message));
+ e_table->click_to_add_message = g_strdup (gettext (specification->click_to_add_message));
e_table->draw_grid = specification->draw_grid;
e_table->cursor_mode = specification->cursor_mode;
e_table->full_header = et_spec_to_full_header(e_table, specification, ete);