#35476: The precedence of multiple translations for the same literal does not 
work
on Python3.11 & Python3.12
--------------------------------------+------------------------------------
     Reporter:  Dmytro Litvinov       |                    Owner:  nobody
         Type:  Bug                   |                   Status:  new
    Component:  Internationalization  |                  Version:  4.2
     Severity:  Normal                |               Resolution:
     Keywords:  i18n, translation     |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Comment (by Vasyl Dizhak):

 We've been working on this issue during the Sprints after the DjangoCon
 Europe 2024 and this issue is related to #34221 as we can link it with the
 same wrong behavior when comparing the plural functions.
 Django uses the following plural function
 {{{
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 }}}
 which matches exactly with the one from the demo repository
 https://github.com/DmytroLitvinov/django-i18n-
 issue/blob/main/locale/de/LC_MESSAGES/django.po#L19C28-L19C43, therefore,
 local translations will be merged into the first catalog together with
 Django's translations.

 The `allauth`  package has a different plural function that would insert
 it in the first position in the translation catalog
 https://github.com/pennersr/django-
 allauth/blob/main/allauth/locale/de/LC_MESSAGES/django.po#L20

 {{{
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 }}}

 `gettext` would check first the 3d-party `allauth` translations catalog as
 it has higher precedence, and only then look at the merged one containing
 the local files.
 We propose to close it as a duplicate to the #34221.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35476#comment:2>
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/0107018ff845b663-db374154-67a7-46db-abc5-195cd4fe6d8c-000000%40eu-central-1.amazonses.com.

Reply via email to