Chromium Code Reviews| Index: pkg/intl/intl.dart |
| =================================================================== |
| --- pkg/intl/intl.dart (revision 12463) |
| +++ pkg/intl/intl.dart (working copy) |
| @@ -141,10 +141,13 @@ |
| // Locales of length < 5 are presumably two-letter forms, or else malformed. |
| // Locales of length > 6 are likely to be malformed. In either case we |
| // return them unmodified and if correct they will be found. |
| + // We treat C as a special case, and assume it wants en_ISO for formatting. |
| + if (aLocale == "C") return "en_ISO"; |
|
Emily Fortuna
2012/09/18 00:46:33
what does "C" mean?
Alan Knight
2012/09/18 17:08:36
It's an old Unix locale, also referred to as the P
Emily Fortuna
2012/09/18 17:38:09
Can you maybe mention a little bit of that in your
|
| if ((aLocale.length < 5) || (aLocale.length > 6)) return aLocale; |
| if (aLocale[2] != '-' && (aLocale[2] != '_')) return aLocale; |
| + var lastRegionLetter = aLocale.length == 5 ? "" : aLocale[5].toUpperCase(); |
| return '${aLocale[0]}${aLocale[1]}_${aLocale[3].toUpperCase()}' |
| - '${aLocale[4].toUpperCase()}'; |
| + '${aLocale[4].toUpperCase()}$lastRegionLetter'; |
| } |
| /** |