Conversation
The code for English (United States) 'en-US'. The prefix, 'en', is a language code following the ISO 639-1 standard. The suffix, 'US', is a country code following the ISO 3166-1 Alpha-2 standard.
Add `en-US` locale
|
Could you elaborate on why you are proposing this change? I think dateparser already uses “en-US” by default if you don’t specify a different country. |
|
Hello @Gallaecio I will get error |
|
But why would you set that locale? Does |
|
That's just an example. |
|
@Gallaecio Hello again :) Any updates? How can I convince you in necessary of that PR? Really appreciated for your attention. |
|
I tried to push a change to your branch but I could not. Can you add a test for the locale? diff --git a/tests/test_loading.py b/tests/test_loading.py
index b79db98..96e6adf 100644
--- a/tests/test_loading.py
+++ b/tests/test_loading.py
@@ -190,6 +190,56 @@ class TestLoading(BaseTestCase):
],
expected_locales=["shi-Latn", "teo-KE", "ewo", "vun"],
),
+ param(
+ given_languages=["en"],
+ given_locales=None,
+ given_region="US",
+ loaded_languages=[
+ "en",
+ "es",
+ "fr",
+ "ar",
+ "asa",
+ "nl",
+ "so",
+ "sr-Latn",
+ "zgh",
+ "pt",
+ "zh-Hant",
+ "zh-Hans",
+ "ru",
+ "ckb",
+ "sq",
+ "shi-Latn",
+ "teo",
+ "ewo",
+ "vun",
+ ],
+ loaded_locales=[
+ "en",
+ "es",
+ "fr",
+ "fr-BF",
+ "ar-SO",
+ "asa",
+ "nl-CW",
+ "so-KE",
+ "sr-Latn-XK",
+ "zgh",
+ "pt-MO",
+ "zh-Hant-MO",
+ "zh-Hans-MO",
+ "ru-UA",
+ "ckb-IR",
+ "sq-XK",
+ "shi-Latn",
+ "teo-KE",
+ "ewo",
+ "vun",
+ "en-US",
+ ],
+ expected_locales=["en-US"],
+ ),
]
)
def test_loading( |
|
Yeah, of course, I'll add it. |
- Missed translation data are added
|
@AdrianAtZyte Hello again. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1222 +/- ##
=======================================
Coverage 96.63% 96.63%
=======================================
Files 235 235
Lines 2915 2915
=======================================
Hits 2817 2817
Misses 98 98 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks! |
The code for English (United States) 'en-US'. The prefix, 'en', is a language code following the ISO 639-1 standard. The suffix, 'US', is a country code following the ISO 3166-1 Alpha-2 standard.
E.g. Discord uses that locale name for language
English, US