-
-
Notifications
You must be signed in to change notification settings - Fork 63
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 en_GB and en_US #210
Comments
Would something like this work for you? diff --git a/src/humanize/i18n.py b/src/humanize/i18n.py
index 42447b0..c4ca274 100644
--- a/src/humanize/i18n.py
+++ b/src/humanize/i18n.py
@@ -71,6 +71,9 @@ def activate(
Raises:
Exception: If humanize cannot find the locale folder.
"""
+ if locale and locale.startswith("en"):
+ locale = None
+
if path is None:
path = _get_default_locale_path() |
Yes, this seems to fix the issue for me! Thank you so much! |
Great, would you like to put together a PR? |
Sure thing! I'll have to do that after the weekend though - I've been working on this while procrastinating on my Ludum Dare game 😅 |
No rush at all :) Have fun with Ludum Dare! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What did you do?
Hello! Thank you so much for making this library!!!
I'm using this to bot to translate some strings for my python discord bot. To do that, I am mapping discord locales to Humanize strings, like so:
I wish I could also map British English and American English to
en_US
anden_GB
instead of setting them toNone
, then doing a None check whenever I get the locale.Especially since
en_GB
is listed as an example locale at the bottom of the Readme, I wish this was an optionPlease include code that reproduces the issue.
The text was updated successfully, but these errors were encountered: