summaryrefslogtreecommitdiff
path: root/mail/sympa5/files/patch-src-Language.pm
blob: dfdc52934f478c231326ac9de94e000e2b70e29e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
--- src/Language.pm.orig	Thu Aug 11 14:49:48 2005
+++ src/Language.pm	Mon Sep 26 10:45:27 2005
@@ -1,5 +1,5 @@
 # Language.pm - This module does just the initial setup for the international messages
-# RCS Identication ; $Revision: 1.40.2.4 $ ; $Date: 2005/08/11 12:49:48 $ 
+# RCS Identication ; $Revision: 1.40.2.5 $ ; $Date: 2005/09/23 15:39:34 $ 
 #
 # Sympa - SYsteme de Multi-Postage Automatique
 # Copyright (c) 1997, 1998, 1999, 2000, 2001 Comite Reseau des Universites
@@ -134,16 +134,20 @@
     unless (setlocale(&POSIX::LC_ALL, $locale)) {
 	unless (setlocale(&POSIX::LC_ALL, $lang)) {
 	    unless (setlocale(&POSIX::LC_ALL, $locale.'.'.$locale2charset{$locale})) {
-		&do_log('err','Failed to setlocale(%s) ; you either have a problem with the catalogue .mo files or you should extend available locales in  your /etc/locale.gen (or /etc/sysconfig/i18n) file', $locale.'.'.$locale2charset{$locale});
-		return undef;
+		unless (setlocale(&POSIX::LC_ALL, $locale.'.'.uc($locale2charset{$locale}))) { ## UpperCase required for FreeBSD
+		    &do_log('err','Failed to setlocale(%s) ; you either have a problem with the catalogue .mo files or you should extend available locales in  your /etc/locale.gen (or /etc/sysconfig/i18n) file', $locale.'.'.uc($locale2charset{$locale}));
+		    return undef;
+		}
 	    }
 	}
     }
 
-    unless (setlocale(&POSIX::LC_TIME, $locale)) {
-	&do_log('err','Failed to setlocale(LC_TIME,%s)', $locale.'.'.$locale2charset{$locale});
-	return undef;
-    }
+## Problem with this, isn't LC_ALL suffiscient ?
+#
+#    unless (setlocale(&POSIX::LC_TIME, $locale)) {
+#	&do_log('err','Failed to setlocale(LC_TIME,%s)', $locale);
+#	return undef;
+#    }
 
     $current_lang = $lang;
     $current_locale = $locale;