[evolution-patches] gtkhtml: i18n fix (#42277)
- From: Radek Doulík <rodo ximian com>
- To: Patches <evolution-patches ximian com>
- Cc: Larry Ewing <lewing ximian com>, Ettore Perazzoli <ettore ximian com>
- Subject: [evolution-patches] gtkhtml: i18n fix (#42277)
- Date: 08 May 2003 11:59:17 +0200
Attached patch fixes gtkhtml's part of i18n brokenness reported in
http://bugzilla.ximian.com/show_bug.cgi?id=42277
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/ChangeLog,v
retrieving revision 1.400
diff -u -p -r1.400 ChangeLog
--- ChangeLog 6 May 2003 10:58:26 -0000 1.400
+++ ChangeLog 8 May 2003 09:48:52 -0000
@@ -1,3 +1,14 @@
+2003-05-08 Radek Doulik <rodo ximian com>
+
+ * include config.h and gnome-i18n.h everywhere so that we use
+ explicit translation domain
+
+ * editor-control-shlib.c (editor_shlib_init): new helper method,
+ initializes i18n
+
+ * gnome-gtkhtml-editor.c (main): call bind_textdomain_codeset with
+ utf-8
+
2003-05-02 Radek Doulik <rodo ximian com>
* properties.c (gtk_html_edit_properties_dialog_new): remove apply
Index: body.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/body.c,v
retrieving revision 1.37
diff -u -p -r1.37 body.c
--- body.c 2 May 2003 18:10:10 -0000 1.37
+++ body.c 8 May 2003 09:48:52 -0000
@@ -21,6 +21,7 @@
*/
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <string.h>
#include <gal/widgets/widget-color-combo.h>
#include "htmlengine-edit.h"
Index: cell.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/cell.c,v
retrieving revision 1.30
diff -u -p -r1.30 cell.c
--- cell.c 13 Jan 2003 15:55:54 -0000 1.30
+++ cell.c 8 May 2003 09:48:52 -0000
@@ -20,6 +20,8 @@
Boston, MA 02111-1307, USA.
*/
+#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <string.h>
#include <glade/glade.h>
#include <gal/widgets/widget-color-combo.h>
@@ -38,7 +40,6 @@
#include "htmltablecell.h"
#include "htmlsettings.h"
-#include "config.h"
#include "properties.h"
#include "cell.h"
#include "utils.h"
Index: control-data.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/control-data.c,v
retrieving revision 1.19
diff -u -p -r1.19 control-data.c
--- control-data.c 25 Mar 2003 19:30:38 -0000 1.19
+++ control-data.c 8 May 2003 09:48:52 -0000
@@ -22,6 +22,7 @@
*/
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include "control-data.h"
#include "spell.h"
#include "properties.h"
Index: dialog.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/dialog.c,v
retrieving revision 1.7
diff -u -p -r1.7 dialog.c
--- dialog.c 11 Nov 2002 17:09:32 -0000 1.7
+++ dialog.c 8 May 2003 09:48:52 -0000
@@ -21,6 +21,7 @@
*/
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include "dialog.h"
/*
Index: e-html-utils.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/e-html-utils.c,v
retrieving revision 1.3
diff -u -p -r1.3 e-html-utils.c
--- e-html-utils.c 1 Nov 2002 15:06:15 -0000 1.3
+++ e-html-utils.c 8 May 2003 09:48:52 -0000
@@ -18,6 +18,8 @@
* Boston, MA 02111-1307, USA.
*/
+#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <ctype.h>
#include <stdio.h>
#include <string.h>
Index: editor-control-factory.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/editor-control-factory.c,v
retrieving revision 1.127
diff -u -p -r1.127 editor-control-factory.c
--- editor-control-factory.c 9 Apr 2003 20:30:53 -0000 1.127
+++ editor-control-factory.c 8 May 2003 09:48:52 -0000
@@ -27,6 +27,7 @@
#include <config.h>
#endif
+#include <libgnome/gnome-i18n.h>
#include <string.h>
#include <gnome.h>
#include <bonobo.h>
Index: editor-control-shlib.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/editor-control-shlib.c,v
retrieving revision 1.1
diff -u -p -r1.1 editor-control-shlib.c
--- editor-control-shlib.c 3 Apr 2003 17:10:52 -0000 1.1
+++ editor-control-shlib.c 8 May 2003 09:48:52 -0000
@@ -28,7 +28,30 @@
#endif
#include <bonobo/bonobo-shlib-factory.h>
+#include <libgnome/gnome-i18n.h>
#include "editor-control-factory.h"
-BONOBO_ACTIVATION_SHLIB_FACTORY (CONTROL_FACTORY_ID, "GNOME HTML Editor factory", editor_control_factory, NULL);
+static void
+editor_shlib_init (void)
+{
+ static gboolean initialized = FALSE;
+
+ if (!initialized) {
+ initialized = TRUE;
+
+ /* Initialize the i18n support */
+ bindtextdomain (GNOME_EXPLICIT_TRANSLATION_DOMAIN, GNOMELOCALEDIR);
+ bind_textdomain_codeset (GNOME_EXPLICIT_TRANSLATION_DOMAIN, "UTF-8");
+ }
+}
+
+BonoboObject *
+editor_control_shlib_factory (BonoboGenericFactory *factory, const gchar *component_id, gpointer closure)
+{
+ editor_shlib_init ();
+
+ return editor_control_factory (factory, component_id, closure);
+}
+
+BONOBO_ACTIVATION_SHLIB_FACTORY (CONTROL_FACTORY_ID, "GNOME HTML Editor factory", editor_control_shlib_factory, NULL);
Index: engine.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/engine.c,v
retrieving revision 1.22
diff -u -p -r1.22 engine.c
--- engine.c 11 Nov 2002 13:40:35 -0000 1.22
+++ engine.c 8 May 2003 09:48:52 -0000
@@ -21,6 +21,7 @@
*/
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <string.h>
#include <bonobo.h>
Index: gnome-gtkhtml-editor.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/gnome-gtkhtml-editor.c,v
retrieving revision 1.2
diff -u -p -r1.2 gnome-gtkhtml-editor.c
--- gnome-gtkhtml-editor.c 3 Apr 2003 17:10:52 -0000 1.2
+++ gnome-gtkhtml-editor.c 8 May 2003 09:48:52 -0000
@@ -2,6 +2,7 @@
#include <config.h>
#endif
+#include <libgnome/gnome-i18n.h>
#include <string.h>
#include <gnome.h>
#include <bonobo.h>
@@ -59,8 +60,8 @@ main (int argc, char **argv)
#endif
/* Initialize the i18n support */
- bindtextdomain(GTKHTML_RELEASE_STRING, GNOMELOCALEDIR);
- textdomain(GTKHTML_RELEASE_STRING);
+ bindtextdomain (GNOME_EXPLICIT_TRANSLATION_DOMAIN, GNOMELOCALEDIR);
+ bind_textdomain_codeset (GNOME_EXPLICIT_TRANSLATION_DOMAIN, "UTF-8");
gnome_program_init(PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv,
GNOME_PROGRAM_STANDARD_PROPERTIES,
Index: html-stream-mem.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/html-stream-mem.c,v
retrieving revision 1.5
diff -u -p -r1.5 html-stream-mem.c
--- html-stream-mem.c 17 Apr 2003 16:54:57 -0000 1.5
+++ html-stream-mem.c 8 May 2003 09:48:52 -0000
@@ -8,6 +8,7 @@
* Copyright 2001, Ximian, Inc.
*/
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <gtk/gtk.h>
Index: htmlsourceview.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/htmlsourceview.c,v
retrieving revision 1.6
diff -u -p -r1.6 htmlsourceview.c
--- htmlsourceview.c 30 Mar 2003 06:09:15 -0000 1.6
+++ htmlsourceview.c 8 May 2003 09:48:52 -0000
@@ -23,6 +23,7 @@
*/
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <string.h>
#include <fcntl.h>
#include <sys/stat.h>
Index: image.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/image.c,v
retrieving revision 1.50
diff -u -p -r1.50 image.c
--- image.c 1 May 2003 21:26:34 -0000 1.50
+++ image.c 8 May 2003 09:48:53 -0000
@@ -21,6 +21,7 @@
*/
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <unistd.h>
#include <string.h>
#include <glade/glade.h>
Index: link.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/link.c,v
retrieving revision 1.28
diff -u -p -r1.28 link.c
--- link.c 2 May 2003 18:10:10 -0000 1.28
+++ link.c 8 May 2003 09:48:53 -0000
@@ -21,6 +21,7 @@
*/
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <string.h>
#include "htmlcolor.h"
#include "htmlcolorset.h"
Index: menubar.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/menubar.c,v
retrieving revision 1.86
diff -u -p -r1.86 menubar.c
--- menubar.c 2 May 2003 18:10:10 -0000 1.86
+++ menubar.c 8 May 2003 09:48:53 -0000
@@ -22,6 +22,7 @@
*/
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
Index: paragraph.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/paragraph.c,v
retrieving revision 1.19
diff -u -p -r1.19 paragraph.c
--- paragraph.c 2 May 2003 18:10:10 -0000 1.19
+++ paragraph.c 8 May 2003 09:48:53 -0000
@@ -21,6 +21,7 @@
*/
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include "htmlengine-edit-clueflowstyle.h"
#include "htmlengine-save.h"
#include "htmlselection.h"
Index: persist-file-impl.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/persist-file-impl.c,v
retrieving revision 1.7
diff -u -p -r1.7 persist-file-impl.c
--- persist-file-impl.c 6 Jun 2002 14:06:21 -0000 1.7
+++ persist-file-impl.c 8 May 2003 09:48:53 -0000
@@ -25,6 +25,7 @@
control. */
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <gnome.h>
#include <bonobo.h>
Index: persist-file.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/persist-file.c,v
retrieving revision 1.3
diff -u -p -r1.3 persist-file.c
--- persist-file.c 11 Nov 2002 13:40:35 -0000 1.3
+++ persist-file.c 8 May 2003 09:48:53 -0000
@@ -23,6 +23,7 @@
*/
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
Index: persist-stream-impl.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/persist-stream-impl.c,v
retrieving revision 1.17
diff -u -p -r1.17 persist-stream-impl.c
--- persist-stream-impl.c 17 Oct 2001 04:33:58 -0000 1.17
+++ persist-stream-impl.c 8 May 2003 09:48:53 -0000
@@ -25,6 +25,7 @@
control. */
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <gnome.h>
#include <bonobo.h>
Index: persist-stream.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/persist-stream.c,v
retrieving revision 1.3
diff -u -p -r1.3 persist-stream.c
--- persist-stream.c 11 Nov 2002 13:40:35 -0000 1.3
+++ persist-stream.c 8 May 2003 09:48:53 -0000
@@ -23,6 +23,7 @@
*/
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <string.h>
#include "gtkhtml.h"
#include "persist-stream.h"
Index: popup.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/popup.c,v
retrieving revision 1.74
diff -u -p -r1.74 popup.c
--- popup.c 9 Apr 2003 11:10:38 -0000 1.74
+++ popup.c 8 May 2003 09:48:53 -0000
@@ -24,6 +24,7 @@
#include <config.h>
#endif
+#include <libgnome/gnome-i18n.h>
#include "gtkhtml.h"
#include "gtkhtml-private.h"
Index: properties.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/properties.c,v
retrieving revision 1.28
diff -u -p -r1.28 properties.c
--- properties.c 6 May 2003 10:58:26 -0000 1.28
+++ properties.c 8 May 2003 09:48:53 -0000
@@ -22,8 +22,9 @@
#include <config.h>
-#include "dialog.h"
+#include <libgnome/gnome-i18n.h>
#include <libgnomeui/gnome-window-icon.h>
+#include "dialog.h"
#include "properties.h"
#define GTK_HTML_EDIT_IMAGE_BWIDTH 0
Index: replace.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/replace.c,v
retrieving revision 1.17
diff -u -p -r1.17 replace.c
--- replace.c 2 May 2003 18:10:10 -0000 1.17
+++ replace.c 8 May 2003 09:48:53 -0000
@@ -21,6 +21,7 @@
*/
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <gnome.h>
#include <libgnomeui/gnome-window-icon.h>
#include "replace.h"
Index: resolver-progressive-impl.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/resolver-progressive-impl.c,v
retrieving revision 1.2
diff -u -p -r1.2 resolver-progressive-impl.c
--- resolver-progressive-impl.c 6 Oct 2000 18:53:41 -0000 1.2
+++ resolver-progressive-impl.c 8 May 2003 09:48:53 -0000
@@ -25,6 +25,7 @@
#include <config.h>
#include <gnome.h>
+#include <libgnome/gnome-i18n.h>
#include <bonobo.h>
#include "gtkhtml.h"
#include "resolver-progressive-impl.h"
Index: resolver.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/resolver.c,v
retrieving revision 1.9
diff -u -p -r1.9 resolver.c
--- resolver.c 7 Dec 2000 18:55:55 -0000 1.9
+++ resolver.c 8 May 2003 09:48:53 -0000
@@ -23,6 +23,7 @@
*/
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <bonobo.h>
#include <stdio.h>
#include <glib.h>
Index: rule.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/rule.c,v
retrieving revision 1.26
diff -u -p -r1.26 rule.c
--- rule.c 13 Jan 2003 15:55:54 -0000 1.26
+++ rule.c 8 May 2003 09:48:54 -0000
@@ -20,6 +20,8 @@
Boston, MA 02111-1307, USA.
*/
+#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <string.h>
#include <glade/glade.h>
@@ -31,7 +33,6 @@
#include "htmlengine-save.h"
#include "htmlrule.h"
-#include "config.h"
#include "properties.h"
#include "rule.h"
#include "utils.h"
Index: search.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/search.c,v
retrieving revision 1.21
diff -u -p -r1.21 search.c
--- search.c 2 May 2003 18:10:10 -0000 1.21
+++ search.c 8 May 2003 09:48:54 -0000
@@ -21,6 +21,7 @@
*/
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <gnome.h>
#include <libgnomeui/gnome-window-icon.h>
#include "search.h"
Index: table.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/table.c,v
retrieving revision 1.42
diff -u -p -r1.42 table.c
--- table.c 2 May 2003 18:10:10 -0000 1.42
+++ table.c 8 May 2003 09:48:54 -0000
@@ -20,6 +20,8 @@
Boston, MA 02111-1307, USA.
*/
+#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <string.h>
#include <glade/glade.h>
#include <gal/widgets/widget-color-combo.h>
@@ -37,7 +39,6 @@
#include "htmltable.h"
#include "htmlsettings.h"
-#include "config.h"
#include "properties.h"
#include "table.h"
#include "utils.h"
Index: template.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/template.c,v
retrieving revision 1.14
diff -u -p -r1.14 template.c
--- template.c 9 Jan 2003 15:31:05 -0000 1.14
+++ template.c 8 May 2003 09:48:54 -0000
@@ -20,6 +20,8 @@
Boston, MA 02111-1307, USA.
*/
+#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <string.h>
#include <glade/glade.h>
@@ -29,7 +31,6 @@
#include "htmlengine-edit-cut-and-paste.h"
#include "htmlengine-save.h"
-#include "config.h"
#include "properties.h"
#include "template.h"
#include "utils.h"
Index: test-html-editor-control.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/test-html-editor-control.c,v
retrieving revision 1.45
diff -u -p -r1.45 test-html-editor-control.c
--- test-html-editor-control.c 14 Apr 2003 18:51:54 -0000 1.45
+++ test-html-editor-control.c 8 May 2003 09:48:54 -0000
@@ -22,6 +22,7 @@
*/
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <gnome.h>
#include <bonobo.h>
Index: text.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/text.c,v
retrieving revision 1.39
diff -u -p -r1.39 text.c
--- text.c 2 May 2003 18:10:10 -0000 1.39
+++ text.c 8 May 2003 09:48:54 -0000
@@ -21,6 +21,7 @@
*/
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <string.h>
#include <gal/widgets/widget-color-combo.h>
Index: toolbar.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/toolbar.c,v
retrieving revision 1.60
diff -u -p -r1.60 toolbar.c
--- toolbar.c 11 Nov 2002 13:40:35 -0000 1.60
+++ toolbar.c 8 May 2003 09:48:54 -0000
@@ -24,6 +24,7 @@
/* FIXME: Should use BonoboUIHandler. */
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <gnome.h>
#include <bonobo.h>
#include <gal/widgets/widget-color-combo.h>
Index: utils.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/utils.c,v
retrieving revision 1.12
diff -u -p -r1.12 utils.c
--- utils.c 2 May 2003 18:10:10 -0000 1.12
+++ utils.c 8 May 2003 09:48:54 -0000
@@ -21,6 +21,7 @@
*/
#include <config.h>
+#include <libgnome/gnome-i18n.h>
#include <string.h>
#include "gtkhtml-compat.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]