Hi Adam / Django developers,

If you want I can try to spend some time to help solving this specific
problem. I would start with documenting this issue in the release notes of
Django 2.2. I already opened a new task #30945
<https://code.djangoproject.com/ticket/30945> for documenting this issue.
How do I proceed from here? I think I never submitted changes directly to
Django Git & documentation. Where are the source code of the release notes
documentation and how do I change them? After documenting this problem, I
can see if I can submit a change to the code itself. However I'm not sure
if you will accept it, since what I want is mainly to maintain the
functionality of these functions in Django up to 2.1, which means I'm not
sure how new changes will work in Django 2.2. *But*, I think what we have
right now is not an acceptable solution, because functionality of these two
functions breaks when upgrading Django to 2.2, which means that these
functions stop working in some cases (such as in Speedy Net & Hebrew) when
upgrading Django to 2.2 - the output is like we didn't call the translating
functions at all (the functions return the same string in English, not
translated).

By the way, you said it's a complicated problem. I'm not sure about other
languages, but at least in Hebrew, as far as I know, it was very simple in
Django up to 2.1. Either n==1, or n!=1 - there were two strings and
everything worked. I don't think it should be that complicated and actually
I suggested that if you (the Django developers) want a more complicated
functionality you should introduce new functions and not change the
(working) functionality of existing functions, or at least change them in a
backward-compatible way. And as far as I know, ngettext_lazy and ngettext
worked without problems until Django 2.1 (at least in Hebrew, I'm not sure
about other languages).

By the way, I read here that this bug it the fault of Transifex (not
Django). I'm not sure what that means, it worked in Django 2.1. Someone
made a decision to change something in Django 2.2, how can it be Transifex?
It must be a decision of the Django developers. If Transifex has bugs, why
not use a previous version which worked? As far as I would suggest, I would
postpone using the 4-strings translation (or up to 6 strings in some
languages) to Django 5.0 or 10.0. Is it really that important to break all
the 2-strings translations which worked?

אורי
u...@speedy.net


On Sat, Nov 23, 2019 at 2:29 PM Adam Johnson <m...@adamj.eu> wrote:

> Uri,
>
> I understand this is frustrating for you as a user. Thank you for
> documenting your issues extensively so they're easy to follow. However it
> seems like a complicated problem and that Claude is the only person
> spending significant time working on translations these days. If you have
> some resources to try help fix the bug, or document the workaround (running
> makemessages after upgrade?) that would be helpful to the community.
>
> Thanks,
>
> Adam
>
> ‪On Sat, 23 Nov 2019 at 11:32, ‫אורי‬‎ <u...@speedy.net> wrote:‬
>
>> Django developers,
>>
>> https://code.djangoproject.com/ticket/30439
>>
>> I think Django 2.2 (which is LTS) should be updated in a way that using
>> these functions to translate will be backward-compatible, so that
>> everything that worked with Django up to 2.1 will keep working in Django
>> 2.2 and above. Currently this is not the case in Hebrew with Speedy Net
>> <https://github.com/speedy-net/speedy-net>, which starts displaying
>> error messages in English in the Hebrew websites (Speedy Net & Speedy
>> Match) when I upgrade Django to 2.2, which is *not* what I expect. In
>> Django up to 2.1 these error messages are translated to Hebrew, which
>> *is* what I expect.
>>
>> After encountering this problem I decided to keep Speedy Net in Django
>> 2.1 (which I upgraded from 1.11 about 3 weeks ago) until there is a
>> solution, or at least until I can make Speedy Net work in Hebrew in Django
>> 2.2 and above. However, I understand the end-of-life of Django 2.1 is
>> coming soon, which means we will be using an obsolete version of Django in
>> a production website.
>>
>> As long as this issue is not resolved, I would appreciate if you will
>> extend the end-of-life date of Django 2.1 to at least one or two months
>> after this issue will be resolved. Yes I know I can downgrade Django to
>> 1.11 and use it until April 2020, but since I already upgraded to 2.1 I'm
>> not sure it's a good idea to downgrade Django now. And also, since Django
>> 2.2 was released almost 8 months ago, I'm not sure if this problem will be
>> resolved before April 2020. #30439
>> <https://code.djangoproject.com/ticket/30439> was opened about 7 months
>> ago and it's still not resolved.
>>
>> אורי
>> u...@speedy.net
>>
>>
>> ‪On Fri, Nov 1, 2019 at 10:47 AM ‫אורי‬‎ <u...@speedy.net> wrote:‬
>>
>>> Hi,
>>>
>>> I want to add that it was very simple to upgrade Django from 1.11 to 2.0
>>> and then to 2.1, I only had to change minor changes in my code - changing
>>> to class-based views and updating my tests to reflect the 403 pages
>>> (instead of a 302 redirect), so thanks for maintaining Django and for not
>>> breaking too many things when upgrading Django from one version to another.
>>>
>>> I hope you will agree to revert the changes done to ngettext_lazy and
>>> ngettext in version 2.2 and then I will be able to upgrade Django to the
>>> next LTS version.
>>>
>>> אורי
>>> u...@speedy.net
>>>
>>>
>>> ‪On Fri, Nov 1, 2019 at 10:18 AM ‫אורי‬‎ <u...@speedy.net> wrote:‬
>>>
>>>> Django developers,
>>>>
>>>> I opened ticket https://code.djangoproject.com/ticket/30939 and I was
>>>> referred to https://code.djangoproject.com/ticket/30439 as a
>>>> duplicate. I don't understand why you need such a long formula to decide if
>>>> a number is singular or plural. If it's 1 it's singular, otherwise it's
>>>> plural. What's wrong about that?
>>>>
>>>> If you want to define a function with 4 strings for 4 different
>>>> numbers, you should define a new function and not edit ngettext_lazy and
>>>> ngettext. My code which works with all Django versions up to 2.1, breaks
>>>> with Django 2.2. This issue prevents me from upgrading Django to 2.2. Is
>>>> this change documented in the release notes? I didn't find it there. I
>>>> would like to keep using ngettext_lazy with 2 strings (when the number is
>>>> either 1 or not 1) and not with 4 strings. Actually I always use plural but
>>>> because similar validators used ngettext_lazy (MinLengthValidator and
>>>> MaxLengthValidator in django.core.validators) I also used it in my
>>>> validators. But the number I'm using is never equal to 1.
>>>>
>>>> You can see my code here (search for "ngettext_lazy"):
>>>>
>>>> https://github.com/speedy-net/speedy-net/blob/master/speedy/core/accounts/validators.py
>>>>
>>>>
>>>> And the relevant Django code:
>>>>
>>>> https://github.com/django/django/blob/master/django/core/validators.py#L348-L377
>>>>
>>>>
>>>> אורי
>>>> u...@speedy.net
>>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django developers (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-developers+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-developers/CABD5YeHjk183hY5bKJk1w8LoVcUXisc5G29c49VzK4y8eUy5JQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-developers/CABD5YeHjk183hY5bKJk1w8LoVcUXisc5G29c49VzK4y8eUy5JQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
> Adam
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAMyDDM229eLs6cHZkE3oFh5Sd8cLAsMyiwQCRTKqMT9U%3D4kkHQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-developers/CAMyDDM229eLs6cHZkE3oFh5Sd8cLAsMyiwQCRTKqMT9U%3D4kkHQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CABD5YeHNEC3hRmnfhABm3gRRPUCgfqQkOeOXoBEFFTbg_v4Fcw%40mail.gmail.com.

Reply via email to