google-code-export / django-page-cms

Automatically exported from code.google.com/p/django-page-cms
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Breadcrumb and navigation not using the correct language #172

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Running trunk.

To reproduce:
1. Create a page in the default language X
2. Add a translation in another language Y
3. View the page in language Y (I'm setting django_language in the session)
-- in the navigation or breadcrumb, it appears in language X.

I expect the text to be in language Y.

It seems that context does not containing a 'lang' value when included from
another tag, but it does when on the same page.

The fix in my case -- though I'm not sure it is correct -- is to make the
_get_content function use request.LANGUAGE_CODE if it's present. I've
attached a patch to do that, but as I say I'm not sure if it's the correct
way of solving this problem.

Original issue reported on code.google.com by p.a.gian...@gmail.com on 2 Oct 2009 at 5:20

Attachments:

GoogleCodeExporter commented 9 years ago
Can check if it's fixed with revision 725?

Original comment by batiste....@gmail.com on 5 Oct 2009 at 4:05

GoogleCodeExporter commented 9 years ago
Definitely fixed with the last revision. Please tell me if it's not.

Original comment by batiste....@gmail.com on 9 Oct 2009 at 11:08

GoogleCodeExporter commented 9 years ago
Your patch breaks any template which includes the breadcrumb and dynamic 
navigation
tags: you reference lang when it hasn't been defined anywhere. Adding 
"lang=None" to
the default arguments to those functions fixes the problem.

Original comment by p.a.gian...@gmail.com on 9 Oct 2009 at 11:45

GoogleCodeExporter commented 9 years ago
I thought you meant revision 725. The latest revision does the job. Thanks.

Original comment by p.a.gian...@gmail.com on 9 Oct 2009 at 11:48