From 1d8d113699adea7360355c7cef8ad539825829e0 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Tue, 6 Oct 2009 22:01:15 -0400 Subject: [PATCH] Fixed some gettext problems color-combo-menu.c: - escape "%" in strings so that they are not interpreted as c-format conversions. - call gettext() on color names initialized in table. bc.c: - call gettext() on barcode names initialized in table. property-bar.builder: - moved "Font family" tooltip to correct field for translation. --- data/builder/property-bar.builder | 2 +- src/bc.c | 6 +++--- src/color-combo-menu.c | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/data/builder/property-bar.builder b/data/builder/property-bar.builder index a98e892b..cac827b4 100644 --- a/data/builder/property-bar.builder +++ b/data/builder/property-bar.builder @@ -16,7 +16,7 @@ True - Font family + Font family False diff --git a/src/bc.c b/src/bc.c index 7c35234a..98ca58ee 100644 --- a/src/bc.c +++ b/src/bc.c @@ -199,7 +199,7 @@ name_to_index (const gchar *name) g_return_val_if_fail (name!=NULL, 0); for (i=0; backends[i].id != NULL; i++) { - if (strcmp (name, backends[i].name) == 0) { + if (strcmp (name, gettext (backends[i].name)) == 0) { return i; } } @@ -277,7 +277,7 @@ gl_barcode_get_styles_list (void) GList *list = NULL; for (i=0; backends[i].id != NULL; i++) { - list = g_list_append (list, g_strdup (backends[i].name)); + list = g_list_append (list, g_strdup (gettext (backends[i].name))); } return list; @@ -384,7 +384,7 @@ gl_barcode_get_prefered_n (const gchar *id) const gchar * gl_barcode_id_to_name (const gchar *id) { - return backends[id_to_index (id)].name; + return gettext (backends[id_to_index (id)].name); } diff --git a/src/color-combo-menu.c b/src/color-combo-menu.c index d24a233b..5e72928b 100644 --- a/src/color-combo-menu.c +++ b/src/color-combo-menu.c @@ -113,11 +113,11 @@ static ColorTableEntry color_table[] = { GL_COLOR (216, 191, 216), N_("Thistle") }, { GL_COLOR (255, 255, 255), N_("White") }, - { GL_COLOR (230, 230, 230), N_("10% Gray") }, - { GL_COLOR (192, 192, 192), N_("25% Gray") }, - { GL_COLOR (153, 153, 153), N_("40% Gray") }, - { GL_COLOR (128, 128, 128), N_("50% Gray") }, - { GL_COLOR (102, 102, 102), N_("60% Gray") }, + { GL_COLOR (230, 230, 230), N_("10\% Gray") }, + { GL_COLOR (192, 192, 192), N_("25\% Gray") }, + { GL_COLOR (153, 153, 153), N_("40\% Gray") }, + { GL_COLOR (128, 128, 128), N_("50\% Gray") }, + { GL_COLOR (102, 102, 102), N_("60\% Gray") }, { GL_COLOR ( 0, 0, 0), N_("Black") }, }; @@ -217,7 +217,7 @@ gl_color_combo_menu_init (glColorComboMenu *this) palette_menu_item = gl_color_combo_color_menu_item_new (i, color_table[i].color, - color_table[i].name); + gettext (color_table[i].name)); g_signal_connect (palette_menu_item, "activate", G_CALLBACK (palette_menu_item_activate_cb), this); -- 2.39.2