From: znek Date: Mon, 19 Jul 2004 16:50:05 +0000 (+0000) Subject: locales utf-16 -> utf-8 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94e194aa8343706b796aa35fc6b6adc79e55c375;p=scalable-opengroupware.org locales utf-16 -> utf-8 git-svn-id: http://svn.opengroupware.org/SOGo/trunk@148 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/Main/ChangeLog b/SOGo/Main/ChangeLog index dd0797df..faf0d466 100644 --- a/SOGo/Main/ChangeLog +++ b/SOGo/Main/ChangeLog @@ -1,3 +1,7 @@ +2004-07-19 Marcus Mueller + + * sogod.m, */Locale: converted to UTF-8 for better editability (v0.9.3) + 2004-07-19 Marcus Mueller * v0.9.2 @@ -13,4 +17,4 @@ * SOGoRootPage.wox: some debug code (for locales). - * created ChangeLog. \ No newline at end of file + * created ChangeLog. diff --git a/SOGo/Main/English.lproj/Locale b/SOGo/Main/English.lproj/Locale index 09b1125a..ac087fc2 100644 Binary files a/SOGo/Main/English.lproj/Locale and b/SOGo/Main/English.lproj/Locale differ diff --git a/SOGo/Main/French.lproj/Locale b/SOGo/Main/French.lproj/Locale index 147c098a..af3faccc 100644 Binary files a/SOGo/Main/French.lproj/Locale and b/SOGo/Main/French.lproj/Locale differ diff --git a/SOGo/Main/SOGoRootPage.wox b/SOGo/Main/SOGoRootPage.wox index af5e8e38..5cf9a093 100644 --- a/SOGo/Main/SOGoRootPage.wox +++ b/SOGo/Main/SOGoRootPage.wox @@ -18,7 +18,7 @@ diff --git a/SOGo/Main/Version b/SOGo/Main/Version index 46fb72d5..fc795f55 100644 --- a/SOGo/Main/Version +++ b/SOGo/Main/Version @@ -1,3 +1,3 @@ -# $Id: Version,v 1.1 2003/11/24 01:24:40 helge Exp $ +# $Id$ -SUBMINOR_VERSION:=2 +SUBMINOR_VERSION:=3 diff --git a/SOGo/Main/sogod.m b/SOGo/Main/sogod.m index b4643267..84d2a7fe 100644 --- a/SOGo/Main/sogod.m +++ b/SOGo/Main/sogod.m @@ -224,22 +224,32 @@ static BOOL doCrashOnSessionCreate = NO; } - (NSDictionary *)localeForLanguageNamed:(NSString *)_name { - NSString *lpath; + NSString *lpath; + id data; NSDictionary *locale; - + NSAssert(_name != nil, @"_name MUST NOT be nil!"); - if ((locale = [self->localeLUT objectForKey:_name]) != nil) + if((locale = [self->localeLUT objectForKey:_name]) != nil) return locale; - lpath = [[self resourceManager] - pathForResourceNamed:@"Locale" - inFramework:nil - languages:[NSArray arrayWithObject:_name]]; - locale = [[NSString stringWithContentsOfFile:lpath] propertyList]; - if (locale == nil) { + pathForResourceNamed:@"Locale" + inFramework:nil + languages:[NSArray arrayWithObject:_name]]; + + data = [NSData dataWithContentsOfFile:lpath]; + if(data == nil) { NSLog(@"%s didn't find locale with name:%@", - __PRETTY_FUNCTION__, - _name); + __PRETTY_FUNCTION__, + _name); + return nil; + } + data = [[[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding] autorelease]; + locale = [data propertyList]; + if(locale == nil) { + NSLog(@"%s couldn't load locale with name:%@", + __PRETTY_FUNCTION__, + _name); return nil; } [self->localeLUT setObject:locale forKey:_name];