language_chooser doesn't take `SITE_ID` into account #1873

Open
Bouke opened this Issue May 24, 2013 · 6 comments

6 participants

@Bouke

in menus/templates/menu/language_chooser.html all languages are fetched:

{% get_available_languages as languages %}

However, using CMS_LANGUAGES I have defined a mixed set of languages depending on the SITE_ID. This setting should be taken into account for creating the language chooser, I suppose?

@digi604
Divio AG member

Is this 2.4 or 3?

@Bouke

2.4

@digi604
Divio AG member

needs a pull request and tests

@czpython czpython was assigned Aug 30, 2013
@digi604 digi604 modified the milestone: Some Day, 3.0 Feb 10, 2014
@yakky

Do we really need {% get_available_languages as languages %} string in language_chooser.html?
Context is populated by languages filtered by site by the language chooser templatetags (both in 2.4 and 3.0)

@richardbarran

I have been working with the language_chooser, and I have noticed that the {% get_available_languages as languages %} is indeed redundant - and worse, buggy.
A languages variable is set in the context here https://github.com/divio/django-cms/blob/develop/menus/templatetags/menu_tags.py#L373.
This context variable is then overridden by https://github.com/divio/django-cms/blob/develop/menus/templates/menu/language_chooser.html#L3.
However this new value is not reading from CMS_LANGUAGES, so ignores information such as - for example - if we have set a language to 'public': False.

@FinalAngel
Divio AG member

Closed in favor of #4597

@FinalAngel FinalAngel referenced this issue Oct 19, 2015
Open

[META] Menus/pagetree refactor #4597

1 of 9 tasks complete
@FinalAngel FinalAngel closed this Oct 19, 2015
@czpython czpython referenced this issue Mar 29, 2016
Open

[META] Menus cleanup #5112

0 of 26 tasks complete
@czpython czpython reopened this Mar 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment