Translations doesn't always work

53 views
Skip to first unread message

Piotr Maliński

unread,
Jul 16, 2013, 4:32:32 AM7/16/13
to django...@googlegroups.com
I'm running a non so recent checkout of oscar and I've noticed that in some cases/templates the translations doesn't work. Messages displayed via message framework are one of them. The translation files have the translations for them but they appear in English. Everything else is translated.

Also for example in the basket template there is {% trans "Your basket is now empty" %} which gets translated there. If I put it for example in the home page template it will not be translated. That's quite odd behaviour. What can be the cause of those problems?

Maik Hoepfel

unread,
Jul 18, 2013, 10:16:15 AM7/18/13
to django...@googlegroups.com
Hey Piotr,

what you're describing sounds like you are missing current translations. The reason is that we only pull in the translations from Transifex just before releasing a new Oscar version.

I just tried {% trans "Your basket is now empty" %} on the homepage (with Oscar @ master), and only got a valid translation when picking Slovak. But e.g. German is translated to 100% in Transifex, but I'll only get a translation when Oscar 0.6 is released.

If you need up-to-date translations, you'll have to manually pull the files from Transifex.

Hope that helps,

Maik

Piotr Maliński

unread,
Jul 24, 2013, 4:05:03 AM7/24/13
to django...@googlegroups.com
The PO file has the translation and there is a valid MO file. The string gets translated on basket page but doesn't on other (like the home page). In real cases the messages aren't translated although they have translations. It looks like every translation is valid only to given location in code.

Maik Hoepfel

unread,
Jul 25, 2013, 5:13:41 AM7/25/13
to django...@googlegroups.com
Hi Piotr,

like I said, I tried to reproduce the behaviour with adding a random string somewhere in the templates, and things worked as expected.

Please make sure you've restarted your Django runserver after updating translation files, and the MO files are based on the current PO files. I'd also recommend pulling in up-to-date translations from Transifex.
If you can then still reproduce the error in the sandbox, please file a bug report and I'm happy to look into it further.

Regards,

Maik
Reply all
Reply to author
Forward
0 new messages