evolution r35481 - branches/gnome-2-22/shell



Author: tml
Date: Thu May  8 04:20:36 2008
New Revision: 35481
URL: http://svn.gnome.org/viewvc/evolution?rev=35481&view=rev

Log:
2008-05-08  Tor Lillqvist  <tml novell com>

	* main.c (main) [Win32]: If no message catalog is installed for
	the current locale language, don't bother with the localisations
	provided by other things then either. Reset thread locale to
	"en-US" and C library locale to "C" to ensure that. This fixes the
	problem where those items in the UI that don't originate from
	message catalogs still appear translated even though message
	catalogs were not installed.



Modified:
   branches/gnome-2-22/shell/ChangeLog
   branches/gnome-2-22/shell/main.c

Modified: branches/gnome-2-22/shell/main.c
==============================================================================
--- branches/gnome-2-22/shell/main.c	(original)
+++ branches/gnome-2-22/shell/main.c	Thu May  8 04:20:36 2008
@@ -690,6 +690,17 @@
 				      GNOME_PARAM_HUMAN_READABLE_NAME, _("Evolution"),
 				      NULL);
 
+#ifdef G_OS_WIN32
+	if (strcmp (_(""), "") == 0) {
+		/* No message catalog installed for the current locale language,
+		 * so don't bother with the localisations provided by other things then
+		 * either. Reset thread locale to "en-US" and C library locale to "C".
+		 */
+		SetThreadLocale (MAKELCID (MAKELANGID (LANG_ENGLISH, SUBLANG_ENGLISH_US),
+					   SORT_DEFAULT));
+		setlocale (LC_ALL, "C");
+	}
+#endif
 	if (start_online && start_offline) {
 		fprintf (stderr, _("%s: --online and --offline cannot be used together.\n  Use %s --help for more information.\n"),
 			 argv[0], argv[0]);



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