[Django] #28669: bool(ungettext_lazy('%(value)d blah', '%(value)d blahs', 'value')) returns False

7 views
Skip to first unread message

Django

unread,
Oct 2, 2017, 2:35:10 PM10/2/17
to django-...@googlegroups.com
#28669: bool(ungettext_lazy('%(value)d blah', '%(value)d blahs', 'value')) returns
False
------------------------------------------------+------------------------
Reporter: Dylan Young | Owner: nobody
Type: Bug | Status: new
Component: Internationalization | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+------------------------
Expected: True

This does not seem to be an issue with the non-lazy version.

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).

--
Ticket URL: <https://code.djangoproject.com/ticket/28669>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 2, 2017, 2:42:51 PM10/2/17
to django-...@googlegroups.com
#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
-------------------------------------+-------------------------------------
Description changed by Dylan Young:

Old description:

> Expected: True
>
> This does not seem to be an issue with the non-lazy version.
>
> 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).

Not sure if this is also present on Django>1.8 (couldn't find any existing
references to this bug).

--

--
Ticket URL: <https://code.djangoproject.com/ticket/28669#comment:1>

Django

unread,
Oct 2, 2017, 2:46:10 PM10/2/17
to django-...@googlegroups.com
#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

unread,
Oct 2, 2017, 8:32:35 PM10/2/17
to django-...@googlegroups.com
#28669: bool(ungettext_lazy('%(value)d blah', '%(value)d blahs', 'value')) returns
False
-------------------------------------+-------------------------------------

Reporter: Dylan Young | Owner: nobody
Type: Bug | Status: closed
Component: | Version: 1.8
Internationalization |
Severity: Normal | Resolution: duplicate

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* status: new => closed
* resolution: => duplicate


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/28669#comment:3>

Django

unread,
Oct 5, 2017, 8:33:51 AM10/5/17
to django-...@googlegroups.com
#28669: bool(ungettext_lazy('%(value)d blah', '%(value)d blahs', 'value')) returns
False
-------------------------------------+-------------------------------------

Reporter: Dylan Young | Owner: nobody
Type: Bug | Status: closed
Component: | Version: 1.8
Internationalization |
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Dylan Young):

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 know, 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!

--
Ticket URL: <https://code.djangoproject.com/ticket/28669#comment:4>

Reply all
Reply to author
Forward
0 new messages