diff --git a/hshassets/templates/hshassets/includes/nav_lang_flags.html b/hshassets/templates/hshassets/includes/nav_lang_flags.html index db62d521437d8204e8677ac3e95d31290eeea148..97f98cf48a20689413b58d0b40f1999ab6b4aa29 100644 --- a/hshassets/templates/hshassets/includes/nav_lang_flags.html +++ b/hshassets/templates/hshassets/includes/nav_lang_flags.html @@ -2,15 +2,17 @@ {% load static %} {# note: if you are adding more languages, do not edit this file; just add a new flag icon, named lang-xx.png, where xx is the language code #} +{# Add url "url(r'^i18n/', include('django.conf.urls.i18n'))", to your URLconf to activate view set_language #} <span class="navbar-item"> <form id="language-switch-form" class="nav-item" role="change-language" action="{% url 'set_language' %}" method="POST"> {% csrf_token %} + {% get_current_language as LANGUAGE_CODE %} {% get_available_languages as LANGUAGES %} {% get_language_info_list for LANGUAGES as languages %} {% for language in languages %} <button - class="button" + class="button {% if language.code == LANGUAGE_CODE %}is-white is-focused{% endif %}" type="submit" name="language" value="{{ language.code }}" diff --git a/hshassets/templates/hshassets/layout/base.html b/hshassets/templates/hshassets/layout/base.html index 301ba5b07127549d67cc5f69ee7ed8c0bf89defa..f59708046922b22a0c1f48225472bcd9115c977e 100644 --- a/hshassets/templates/hshassets/layout/base.html +++ b/hshassets/templates/hshassets/layout/base.html @@ -1,6 +1,8 @@ <!DOCTYPE html> -{% load static piwik %} -<html> +{% load static i18n piwik %} +{% get_current_language as LANGUAGE_CODE %} + +<html lang="{{ LANGUAGE_CODE }}"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> diff --git a/requirements.txt b/requirements.txt index 64bdb735bb44b7e656c51d52f404da66232e9797..ac08b308c4d23b93ec0855c394a75b0b4afa72c6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -libsass==0.17.0 +libsass==0.19.4 jsmin==2.2.2 -watchdog==0.9.0 +watchdog==0.10.2 diff --git a/setup.py b/setup.py index e9f90f84b480bb1c9dd36440a05e87e7716481cf..fd368230bd132cb916e605d935dba1de26b4ed82 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-hshassets', - version='2.2.15', + version='2.2.17', packages=find_packages(), include_package_data=True, license='MIT License', @@ -18,9 +18,9 @@ setup( author_email='tim.fechner@hs-hannover.de', zip_safe=False, install_requires=[ - 'libsass==0.17.0', + 'libsass==0.19.4', 'jsmin==2.2.2', - 'watchdog==0.9.0' + 'watchdog==0.10.2' ], classifiers=[ 'Environment :: Web Environment',