#32373: Broken translations since the introduction of TranslationCatalog
-------------------------------------+-------------------------------------
     Reporter:  gatsinski            |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:                       |                  Version:  master
  Internationalization               |
     Severity:  Normal               |               Resolution:
     Keywords:  translations         |             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 gatsinski:

Old description:

> I recently updated one of my projects from the latest patch version of
> 2.2 to 3.1 and noticed that one of the translations is broken. When I
> translate "All" to Bulgarian it should output "Всичко" but instead, I get
> "Все" which I believe is in Russian. The PO files in Django are correct,
> and I have the same string translated in my project too. Both with the
> correct msgstr.
>
> I managed to track the issue to the introduction of TranslationCatalog in
> 3.0.5 in this commit:
>
> https://github.com/django/django/commit/d9f1792c7649e9f946f4a3a35a76bddf5a412b8b
>
> Replacing _catalog from TranslationCatalog() to normal Python dict (as it
> used to be in 3.0.4 and prior) resolves the issue.
>
> The issue continues to exist in the latest 3.1 and the pre-release 3.2a1.
>
> I use Linux Mint 20.1 based on Ubuntu 20.04. For a while I suspected
> gettext. The last version available via apt is 0.19.8.1 but I also
> installed the latest from source (0.21). The issue still exists.
>
> The bug is easy to reproduce.
>
> Enter the shell of any project with Django 3.0.4 and older and execute
> the following:
>
> from django.utils import translation
> translation.activate('bg')
> translation.gettext('All')
>
> You will see "Всичко".
>
> Do the same with Django 3.0.5 and above and you will get "Все" which is
> an incorrect translation.
>
> I failed to find an existing ticket describing this problem. Forgive me
> if there is one already.

New description:

 I recently updated one of my projects from the latest patch version of 2.2
 to 3.1 and noticed that one of the translations is broken. When I
 translate "All" to Bulgarian it should output "Всичко" but instead, I get
 "Все" which I believe is in Russian. The PO files in Django are correct,
 and I have the same string translated in my project too. Both with the
 correct msgstr.

 I managed to track the issue to the introduction of TranslationCatalog in
 3.0.5 in this commit:

 
https://github.com/django/django/commit/d9f1792c7649e9f946f4a3a35a76bddf5a412b8b

 Replacing _catalog from TranslationCatalog() to normal Python dict (as it
 used to be in 3.0.4 and prior) resolves the issue.

 The issue continues to exist in the latest 3.1 and the pre-release 3.2a1.

 I use Linux Mint 20.1 based on Ubuntu 20.04. For a while I suspected
 gettext. The last version available via apt is 0.19.8.1 but I also
 installed the latest from source (0.21). The issue still exists.

 The bug is easy to reproduce.

 Enter the shell of any project with Django 3.0.4 and older and execute the
 following:

 from django.utils import translation
 translation.activate('bg')
 translation.gettext('All')

 You will see "Всичко".

 Do the same with Django 3.0.5 and above and you will get "Все" which is an
 incorrect translation. It doesn't matter if you are using gettext,
 ugettext, ugettext_lazy, etc.

 I failed to find an existing ticket describing this problem. Forgive me if
 there is one already.

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32373#comment:1>
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/067.e5be939db8d4aa579f4b38f45c2d9af8%40djangoproject.com.

Reply via email to