From 0a9bafb949e411cbc6f3eeb2d3f1901f1273adf5 Mon Sep 17 00:00:00 2001 From: Gediminas Paulauskas Date: Tue, 8 May 2001 00:26:58 +0000 Subject: Fix for #2253 (search names not translated), mail-search i18n fixes. 2001-05-08 Gediminas Paulauskas * searches.xml: replace title> with _title>. Part of fix to #2253. 2001-05-08 Gediminas Paulauskas * mail-search.c: convert search entry to utf8. * mail-local.c: d() debugging message. * mail-send-recv.c: replace " ..." with "..." * Makefile.am: removed EVOLUTION_VERSION. 2001-05-07 Gediminas Paulauskas * POTFILES.in: add mail/mail-search.c 2001-05-08 Gediminas Paulauskas * misc/e-search-bar.c (add_dropdown), (set_option): first try to translate, then if not suceeded -- convert from utf8. This handles cases when menuitem needs to be translated (it is passed as N_()), or is utf8 search title. However you cannot have a search like "Folders" -- it is translated. Part of fix for #2253. * misc/e-filter-bar.c: d() debugging strings. Use E_FILTERBAR_ADVANCED macro instead of own "Advanced ..." for consistency. 2001-05-08 Gediminas Paulauskas * filter-rule.c (xml_decode): allow "_title" in user rules. translate them and encode to utf8. (get_rule_part_widget): do not call gettext on part->title. It is always translated already. svn path=/trunk/; revision=9706 --- widgets/misc/e-search-bar.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'widgets/misc/e-search-bar.c') diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c index 3be08f4063..c668082260 100644 --- a/widgets/misc/e-search-bar.c +++ b/widgets/misc/e-search-bar.c @@ -118,8 +118,15 @@ static void add_dropdown(ESearchBar *esb, ESearchBarItem *items) GtkWidget *menu = esb->dropdown_menu; GtkWidget *item; - if (items->text) - item = gtk_menu_item_new_with_label (_(items->text)); + if (items->text) { + char *str; + str = _(items->text); + if (str == items->text) { + /* It may be english string, or utf8 rule name */ + item = e_utf8_gtk_menu_item_new_with_label (menu, str); + } else + item = gtk_menu_item_new_with_label (str); + } else item = gtk_menu_item_new(); @@ -189,8 +196,15 @@ set_option(ESearchBar *esb, ESearchBarItem *items) for (i = 0; items[i].id != -1; i++) { GtkWidget *item; - if (items[i].text) - item = gtk_menu_item_new_with_label (_(items[i].text)); + if (items[i].text) { + char *str; + str = _(items[i].text); + if (str == items[i].text) { + /* It may be english string, or utf8 rule name */ + item = e_utf8_gtk_menu_item_new_with_label (menu, str); + } else + item = gtk_menu_item_new_with_label (str); + } else item = gtk_menu_item_new(); -- cgit v1.2.3