#28669: bool(ungettext_lazy('%(value)d blah', '%(value)d blahs', 'value')) returns False -------------------------------------+------------------------------------- Reporter: Dylan Young | Owner: nobody Type: Bug | Status: new Component: | Version: 1.8 Internationalization | Severity: Normal | Resolution: Keywords: | Triage Stage: | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 1 | UI/UX: 0 -------------------------------------+-------------------------------------
Old description: > Expected: True > > In particular this shows up when trying to provide a custom > ungettext_lazy message to django.core.BaseValidator (or any subclass). > > Not sure if this is also present on Django>1.8 (couldn't find any > existing references to this bug). New description: 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). -- Comment (by Dylan Young): 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 all `if message` and similar checks would need to be identified and audited. -- Ticket URL: <https://code.djangoproject.com/ticket/28669#comment:2> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.b02198fd7e2af78933e3befa3c13a7a6%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.