forked from arrow-py/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added basic localizations for humanize
Added support for humanize working with different languages (added Russian for example) New languages support are very basic, and doesn't handle proper changing of nouns plural forms for now. Updated docs and tests
- Loading branch information
Showing
5 changed files
with
100 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ nosetests.xml | |
local/ | ||
dist/ | ||
docs/_build/ | ||
.idea | ||
.DS_Store |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
english = { | ||
'now': 'just now', | ||
'seconds': 'seconds', | ||
'minute': 'a minute', | ||
'minutes': '{0} minutes', | ||
'hour': 'an hour', | ||
'hours': '{0} hours', | ||
'day': 'a day', | ||
'days': '{0} days', | ||
'month': 'a month', | ||
'months': '{0} months', | ||
'year': 'a year', | ||
'years': '{0} years', | ||
|
||
'past': '{0} ago', | ||
'future': 'in {0}', | ||
} | ||
|
||
russian = { | ||
'now': 'сейчас', | ||
'seconds': 'несколько секунд', | ||
'minute': 'минуту', | ||
'minutes': '{0} minutes', | ||
'hour': 'час', | ||
'hours': '{0} час(а,ов)', | ||
'day': 'день', | ||
'days': '{0} дня(ей)', | ||
'month': 'месяц', | ||
'months': '{0} месяц(а,ев)', | ||
'year': 'год', | ||
'years': '{0} года/лет', | ||
|
||
'past': '{0} назад', | ||
'future': 'через {0}', | ||
} |
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