PopSugar/objc-POPSUGAR-ShopSense-client — pull request #4 by lammertw (2013-08-13 10:09:22+00:00)
Title: Fixed supportedLocaleForLocale: to match by localeIdentifier

The +supportedLocaleForLocale:(NSLocale *)locale method of PSSClient doesn't work with NSLocale objects created by the system because it looks for the locale in the supportedLocales array, which has to be the same object instead of comparing the localeIdentifier.

For example, when the region of the iPhone is set to United Kingdom, the [NSLocale currentLocale] returns a locale with en_GB. When calling supportedLocaleForLocale: with this locale it does not return the locale with en_GB since the array does not contain exactly the same object (isSupportedLocale: returns NO). Instead a locale with en_US (default) is returned.