Re: [evolution-patches] A i18n fix for importer file type -- (gettext is missed)



Hi, Not,

The translations are in mo files, because all these msgid and msgstr
are in po files. I already verified in local.

However your suggestion is right, I attached the new patch, please help to review it.

PS: We should not free the GList returned by gnome_i18n_get_language_list ()

Regards,

Not Zed wrote:


Hi,

bonobo server files are translated 'internally', their strings are not placed in the mo files, so this isn't a reliable way to get the translated version. You should be using bonobo_server_info_prop_lookup() to get the value.

See e-shell-settings-dialog.c:load_pages for examples of its usage.

Michael

On Wed, 2005-04-06 at 12:42 +0800, Yong Sun wrote:

Hi, guys,

Please help to review this little patch.

Steps to reproduce:
1) Select [File] -> [Import].
2) Click "Next".
3) Select "Import a single file" option and click next.
4) Expand the combobox "Filetype".

Result: combobox items "LDAP Data interchange format (.ldif)", "vCalendar files (.vcf)" and "iCalendar files (.icf)" are not localized.

Actually, these messages already translated in po files, but when shell builds up the menu, it misses the gettext () routine.

Regards,

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1505
diff -u -p -r1.1505 ChangeLog
--- ChangeLog	21 Mar 2005 21:40:25 -0000	1.1505
+++ ChangeLog	6 Apr 2005 06:12:51 -0000
@@ -1,3 +1,8 @@
+2005-04-06  Yong Sun <Yong Sun Sun COM>
+
+	* e-shell-importer.c: (get_name_from_component_info):
+	Return the localized name of the supported file type.
+
 2005-03-21  JP Rosevear  <jpr novell com>
 
 	Fixes #73066
Index: e-shell-importer.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-importer.c,v
retrieving revision 1.79
diff -u -p -r1.79 e-shell-importer.c
--- e-shell-importer.c	21 Jan 2005 06:18:54 -0000	1.79
+++ e-shell-importer.c	6 Apr 2005 06:12:52 -0000
@@ -318,16 +318,9 @@ free_iid_list (GList *list)
 static const char *
 get_name_from_component_info (const Bonobo_ServerInfo *info)
 {
-	Bonobo_ActivationProperty *property;
-	const char *name;
-
-	property = bonobo_server_info_prop_find ((Bonobo_ServerInfo *) info, "evolution:menu_name");
-	if (property == NULL || property->v._d != Bonobo_ACTIVATION_P_STRING)
-		return NULL;
-
-	name = property->v._u.value_string;
-
-	return name;
+	return bonobo_server_info_prop_lookup ((Bonobo_ServerInfo *) info, 
+					       "evolution:menu_name", 
+					       gnome_i18n_get_language_list ("LC_MESSAGES"));
 }
 
 static char *


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