diff --git a/UI/MailerUI/UIxMailEditor.m b/UI/MailerUI/UIxMailEditor.m index 7931bee13..a9bf3a65c 100644 --- a/UI/MailerUI/UIxMailEditor.m +++ b/UI/MailerUI/UIxMailEditor.m @@ -1,6 +1,6 @@ /* Copyright (C) 2004-2005 SKYRIX Software AG - Copyright (C) 2008-2014 Inverse inc. + Copyright (C) 2008-2015 Inverse inc. This file is part of SOGo. @@ -231,8 +231,14 @@ static NSArray *infoKeys = nil; { // WARNING : NSLocaleCode is not defined in // Region subtag must be separated by a dash - NSString *s = [locale objectForKey: @"NSLocaleCode"]; - return [s stringByReplacingOccurrencesOfString: @"_" withString: @"-"]; + NSMutableString *s = [NSMutableString stringWithString: [locale objectForKey: @"NSLocaleCode"]]; + + [s replaceOccurrencesOfString: @"_" + withString: @"-" + options: 0 + range: NSMakeRange(0, [s length])]; + + return s; } - (void) setFrom: (NSString *) newFrom diff --git a/UI/Scheduler/UIxCalMainView.m b/UI/Scheduler/UIxCalMainView.m index 78d4723c6..e13a05738 100644 --- a/UI/Scheduler/UIxCalMainView.m +++ b/UI/Scheduler/UIxCalMainView.m @@ -1,7 +1,6 @@ /* UIxCalMainView.m - this file is part of SOGo * - * Copyright (C) 2006-2014 Inverse inc. - * + * Copyright (C) 2006-2015 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -83,8 +82,14 @@ { // WARNING : NSLocaleCode is not defined in // Region subtag must be separated by a dash - NSString *s = [locale objectForKey: @"NSLocaleCode"]; - return [s stringByReplacingOccurrencesOfString: @"_" withString: @"-"]; + NSMutableString *s = [NSMutableString stringWithString: [locale objectForKey: @"NSLocaleCode"]]; + + [s replaceOccurrencesOfString: @"_" + withString: @"-" + options: 0 + range: NSMakeRange(0, [s length])]; + + return s; } - (NSArray *) monthMenuItems