Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Locale Implementation Guide #983

Open
anishnya opened this issue May 31, 2021 · 1 comment
Open

Add a Locale Implementation Guide #983

anishnya opened this issue May 31, 2021 · 1 comment

Comments

@anishnya
Copy link
Member

anishnya commented May 31, 2021

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).

@cyriaka90
Copy link
Contributor

cyriaka90 commented Aug 25, 2021

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_names and their abbreviated forms in the corresponding language
  • add day_names and their abbreviated forms in the corresponding language
  • add tests in test_locales.py
  • add locale to DEHUMANIZE_LOCALES if it supports dehumanize and to tested_langs in def locale_list_no_weeks()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

2 participants