djoser icon indicating copy to clipboard operation
djoser copied to clipboard

French translations are not applied

Open connorsml opened this issue 4 years ago • 2 comments

I have been trying out djoser with django rest framework. Using 2.0.5 at the moment.

I noticed that the activation email was only partially translated, and digging into it I realized some of it is translated because by coincidence some of the translation keys used are also used by the admin django app.

Take the translation key: {% blocktrans %}Account activation on {{ site_name }}{% endblocktrans %}

This one does not get translated because it is not part of any other installed app.

The following translation in the same email template gets translated, albeit not to the translation specified in the djoser locale file, but rather to the one specified in the admin locale file. {% trans "Thanks for using our site!" %}

Grepping the site-packages I find the translation which gets applied: ./lib/python3.6/site-packages/django/contrib/admin/locale/fr/LC_MESSAGES/django.po:msgstr "Merci d'utiliser notre site !"

There is no sign of the equivalent file for djoser.

I can indeed see it exists in the git repo at https://github.com/sunscrapers/djoser/blob/master/djoser/locale/fr/LC_MESSAGES/django.po

Grepping for one of the translation keys I discovered that there are translations for Polish: ls ./lib/python3.6/site-packages/djoser/locale/ pl

There are no other locales in this directory.

connorsml avatar Dec 06 '20 18:12 connorsml

Possible related to https://github.com/sunscrapers/djoser/issues/456

connorsml avatar Dec 06 '20 19:12 connorsml

Please check out 2.1.0 version. It seems that there was an issue in building a package that is uploaded to pypi. Probably it was solved in #551.

haxoza avatar Dec 31 '20 18:12 haxoza