Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#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 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 (4)

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)

comment:3 by Tim Graham, 7 years ago

Resolution: duplicate
Status: newclosed

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 Dylan Young, 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!

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