#28669 closed Bug (duplicate)
bool(ungettext_lazy('%(value)d blah', '%(value)d blahs', 'value')) returns False
Reported by: | Dylan Young | Owned by: | nobody |
---|---|---|---|
Component: | Internationalization | Version: | 1.8 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
Expected: True
In particular this shows up when trying to provide a custom ungettext_lazy message to django.core.BaseValidator (or any subclass), since message is only overriden in __init__
if message
Not sure if this is also present on Django>1.8 (couldn't find any existing references to this bug).
Change History (4)
comment:1 by , 7 years ago
Description: | modified (diff) |
---|
comment:3 by , 7 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Duplicate of #25571; fixed in Django 1.10. To avoid wasting ticket triager time, please verify issues affect master (or at least the latest release version) rather than reporting against old versions.
comment:4 by , 7 years ago
I don't have time to spin up a new Django environment to verify every bug when there are those familiar with the codebase that know if a bug has been fixed.
If, on the other hand, no one knows, I'm happy to follow up, as I stated in my comment. If you don't want bugs submitted, don't have a public bug tracker.
That said, glad it's been fixed!
I'm happy to tackle this an approach is agreed upon. It's totally possible that this is expected and simply requires 1) documentation and 2) better checks for overrides (i.e.
if message is not None
). This would, however, probably be the most painful approach to fixing it as allif message
and similar checks would need to be identified and audited.