mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-07 09:28:02 +00:00
Fixed: CPLocal can't handle unknown language codes
When the language code is not known it still sets the current language code to the unknown code instead of the defualt 'en_US' code. This makes the test cases for CPDateFormatter fail when run on a foreign system.
This commit is contained in:
1 parent
e047212f5f
commit
9d86391bdb
1 file changed
+1
-1
@@ -101,7 +101,7 @@ var sharedSystemLocale = nil,
|
||||
|
||||
language = [CPString stringWithFormat:@"%s_%s", [language lowercaseString], [language uppercaseString]];
|
||||
|
||||
if ([availableLocaleIdentifiers indexOfObject:language])
|
||||
if ([availableLocaleIdentifiers indexOfObject:language] !== CPNotFound)
|
||||
localeIdentifier = language;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user