[gtkhtml/gnome-2-30] Bug 615205 - Translations not working in Emoticons and Find/Replace dialogs.



commit 4e61789eb407d5207b76960948181259165b200e
Author: Mario Carrion <mario carrion mx>
Date:   Fri Apr 9 12:20:29 2010 +0530

    Bug 615205 - Translations not working in Emoticons and Find/Replace dialogs.

 components/editor/gtkhtml-editor-private.c    |    2 ++
 components/editor/gtkhtml-face-chooser-menu.c |    6 +++++-
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/components/editor/gtkhtml-editor-private.c b/components/editor/gtkhtml-editor-private.c
index 0fed468..1c420e9 100644
--- a/components/editor/gtkhtml-editor-private.c
+++ b/components/editor/gtkhtml-editor-private.c
@@ -192,6 +192,8 @@ gtkhtml_editor_private_init (GtkhtmlEditor *editor)
 	filename = gtkhtml_editor_find_data_file ("gtkhtml-editor-builder.ui");
 
 	priv->builder = gtk_builder_new ();
+	/* To keep translated strings in subclasses */
+        gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE);
 	if (!gtk_builder_add_from_file (priv->builder, filename, &error)) {
 		g_critical ("Couldn't load builder file: %s\n", error->message);
 		g_clear_error (&error);
diff --git a/components/editor/gtkhtml-face-chooser-menu.c b/components/editor/gtkhtml-face-chooser-menu.c
index 86c2f23..a6aba96 100644
--- a/components/editor/gtkhtml-face-chooser-menu.c
+++ b/components/editor/gtkhtml-face-chooser-menu.c
@@ -18,8 +18,11 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "gtkhtml-face-chooser.h"
 #include "gtkhtml-face-chooser-menu.h"
 
+#include <glib/gi18n-lib.h>
+
 #define GTKHTML_FACE_CHOOSER_MENU_GET_PRIVATE(obj) \
 	(G_TYPE_INSTANCE_GET_PRIVATE \
 	((obj), GTKHTML_TYPE_FACE_CHOOSER_MENU, GtkhtmlFaceChooserMenuPrivate))
@@ -147,7 +150,8 @@ face_chooser_menu_init (GtkhtmlFaceChooserMenu *chooser_menu)
 		GtkhtmlFace *face = iter->data;
 		GtkWidget *item;
 
-		item = gtk_image_menu_item_new_with_mnemonic (face->label);
+		/* To keep translated strings in subclasses */
+		item = gtk_image_menu_item_new_with_mnemonic (_(face->label));
 		gtk_image_menu_item_set_image (
 			GTK_IMAGE_MENU_ITEM (item),
 			gtk_image_new_from_icon_name (



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]