Skip to content
Snippets Groups Projects
Commit 2b9165a4 authored by Elke Kreim's avatar Elke Kreim
Browse files

Changes for language use

Add language code to html tag, add frame to active language flag, update watchdog and libsass
parent 59e0f891
Branches
Tags
No related merge requests found
...@@ -2,15 +2,17 @@ ...@@ -2,15 +2,17 @@
{% load static %} {% 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 #} {# 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"> <span class="navbar-item">
<form id="language-switch-form" class="nav-item" role="change-language" action="{% url 'set_language' %}" method="POST"> <form id="language-switch-form" class="nav-item" role="change-language" action="{% url 'set_language' %}" method="POST">
{% csrf_token %} {% csrf_token %}
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %} {% get_available_languages as LANGUAGES %}
{% get_language_info_list for LANGUAGES as languages %} {% get_language_info_list for LANGUAGES as languages %}
{% for language in languages %} {% for language in languages %}
<button <button
class="button" class="button {% if language.code == LANGUAGE_CODE %}is-white is-focused{% endif %}"
type="submit" type="submit"
name="language" name="language"
value="{{ language.code }}" value="{{ language.code }}"
......
<!DOCTYPE html> <!DOCTYPE html>
{% load static piwik %} {% load static i18n piwik %}
<html> {% get_current_language as LANGUAGE_CODE %}
<html lang="{{ LANGUAGE_CODE }}">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
......
libsass==0.17.0 libsass==0.19.4
jsmin==2.2.2 jsmin==2.2.2
watchdog==0.9.0 watchdog==0.10.2
...@@ -7,7 +7,7 @@ os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) ...@@ -7,7 +7,7 @@ os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup( setup(
name='django-hshassets', name='django-hshassets',
version='2.2.15', version='2.2.17',
packages=find_packages(), packages=find_packages(),
include_package_data=True, include_package_data=True,
license='MIT License', license='MIT License',
...@@ -18,9 +18,9 @@ setup( ...@@ -18,9 +18,9 @@ setup(
author_email='tim.fechner@hs-hannover.de', author_email='tim.fechner@hs-hannover.de',
zip_safe=False, zip_safe=False,
install_requires=[ install_requires=[
'libsass==0.17.0', 'libsass==0.19.4',
'jsmin==2.2.2', 'jsmin==2.2.2',
'watchdog==0.9.0' 'watchdog==0.10.2'
], ],
classifiers=[ classifiers=[
'Environment :: Web Environment', 'Environment :: Web Environment',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment