Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix empty locale errors in format_number/percent
If our format_number() and format_percent() wrappers (around the babel functions) aren't passed a locale argument, they will use c.locale. But in some cases, c.locale will return an empty string, which will then be used when calling the babel functions. The locale-parsing in babel is unable to handle an empty string, and will throw an exception. This commit changes these wrappers slightly so that if c.locale is also empty, the wrappers will instead call the babel functions without a locale argument, which will cause it to default to the LC_NUMERIC environment variable.
- Loading branch information