-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i18n: Handle missing babel locale on timesince formatting
LocalDate is dropped since the right babel locale formatter can be already retrieved by using the more reliable get_locale_formats function which provides sane defaults to fall back to in case of locale being missing in babel. The leftover code after this refactoring is simple enough to be folded into the timesince function. Also did minor refactor to get_locale_formats in order to allow telling to retrieve a specific locale, which eases testing specific locales formatting. Fixes: 'UnknownLocaleError: unknown locale 'son'
- Loading branch information
Showing
3 changed files
with
30 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters