Opened 7 years ago

Last modified 7 years ago

#28669 closed Bug

bool(ungettext_lazy('%(value)d blah', '%(value)d blahs', 'value')) returns False — at Version 2

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 Dylan Young)

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 (2)

comment:1 by Dylan Young, 7 years ago

Description: modified (diff)

comment:2 by Dylan Young, 7 years ago

Description: modified (diff)

I'm happy to tackle this if 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.

Last edited 7 years ago by Dylan Young (previous) (diff)
Note: See TracTickets for help on using tickets.
Back to Top