arrow
arrow copied to clipboard
Add a Locale Implementation Guide
Issue Description
As we've added new features such as dehumanize, it's starting to become clear there are some major discrepancies between locale implementations. I think it would be a good idea to create some kind of adding new locale guide. This would hopefully help avoid some of the issues/ambiguity we've been having (i.e locale implementations using the translation of "week ago" instead of "a week ago" seen in #982).
I think a checklist would be good - something like:
- [ ] add locale variant names in lower case (e.g.
names = ["en", "en-us"]) in arrow/locales.py - [ ] add preposition meaning "ago" (e.g.
past = "{0} ago") - [ ] add preposition meaning "in" (e.g.
past = "future = "in {0}") - [ ] add conjunction meaning "and" (e.g.
and_word = "and") - [ ] add timeframes dict with "just now", "a second", "{0} seconds" etc. in the corresponding language
- [ ] add
month_namesand their abbreviated forms in the corresponding language - [ ] add
day_namesand their abbreviated forms in the corresponding language - [ ] add tests in
test_locales.py - [ ] add locale to
DEHUMANIZE_LOCALESif it supports dehumanize and totested_langsindef locale_list_no_weeks()