-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Make humanize_list()
use babel.
#2982
Conversation
`[p]bankset maxbal` can be used to set the maximum bank balance Signed-off-by: Guy <[email protected]>
Signed-off-by: guyre <[email protected]>
Signed-off-by: guyre <[email protected]>
Signed-off-by: guyre <[email protected]>
…babel_locale` function to get a valid locale based on bot locale. Signed-off-by: guyre <[email protected]>
…babel_locale` function to get a valid locale based on bot locale. Signed-off-by: guyre <[email protected]>
Signed-off-by: guyre <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can't be merged till we officially handle #2850
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to include changes for places where humanize list is used to pass the current locale
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docstring should contain some info about the style
arg - what determines if locale supports specified style? Since it's not handled by Red, saying this is based on Babel's format_list
should probably be enough unless you think it's worth saying more.
There is one other issue I see with this though - this will change the current behavior for the empty sequences and someone relying on this raising IndexError
is gonna be surprised. I'm not sure if we want to pursue this breaking change in 3.4.0, but if we don't then you could add an if not items
and raise IndexError
there.
Whoever wants to pick this one up feel free to |
…babel_locale` function to get a valid locale based on bot locale. Signed-off-by: guyre <[email protected]>
Signed-off-by: guyre <[email protected]>
…ordBot into babel-list � Conflicts: � redbot/core/utils/chat_formatting.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is approved (approving again after conflict resolution), it is waiting for merge until we're ready for 3.4 release (hence the Blocked label).
Type
Description of the changes
humanize_list
will now usebabel.list.format_list
for it's logic. This closes #2906