#30939: Upgrading Django from 2.1 to 2.2 - strings are not translated
-------------------------------------+-------------------------------------
Reporter: אורי | Owner: nobody
Type: Uncategorized | Status: closed
Component: | Version: 2.2
Internationalization |
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by אורי):
I would like to clarify a few things:
1. Some of the strings used by "ngettext" or "ngettext_lazy" are unique to
Speedy Net, some are not. Anyway I added translations for all of them in
the Speedy Net django.po files, for the case that if Django will change
the strings, they will still be translated.
2. When running ./make_all_messages.sh in Django 2.2, which runs
make_messages for the locales en and he, nothing changes in the django.po
files (except the date) - a third and fourth line are not added.
3. I think Django should handle django.po files when there are only 2
forms - singular and plural - and use the same plural forms for all forms
of plurals, whatever that means. And in many cases the plural forms are
identical, as I found out for example in
https://github.com/django/django/blob/master/django/contrib/auth/locale/he/LC_MESSAGES/django.po#L223-L233.
Actually from my knowledge of Hebrew, in most cases the plural form is the
same for all numbers. In my case for example, Speedy Net, I only use
plural although the singular is defined. I just copied the definition from
Django validators with "ngettext_lazy" included. So I think there should
be a fallback, so if only 2 forms are defined - singular and plural - then
Django should use the same plural form for all plurals. This will also
provide a backward compatibility to previous versions of Django.
4. Everything worked for me with Django versions up to 2.1. I think if
such a big change is introduced to Django, which is not backward
compatible, then new functions should be introduced by leaving "ngettext"
or "ngettext_lazy" as they are. Or at least there should be some setting
to allow backward compatibility. Especially since updating the django.po
files might cause problems when downgrading to previous versions of
Django, which don't support it.
5. If running make_messages will introduce 2 more plural forms in the
django.po files, I expect the new forms to default to the plural form
currently defined, to allow backward compatibility. And also, these
functions should work when downgrading to a previous version of Django.
6. I never used Transifex directly. I only use Django. I never even heard
about Transifex until today. Django developers can do whatever they want
with third party dependencies. What matters to me is how Django works.
--
Ticket URL: <https://code.djangoproject.com/ticket/30939#comment:11>
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/069.3ca45b111334b1402cf8d5e6fc3081e2%40djangoproject.com.