Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 291b119475 | |||
| f21ce95d72 | |||
| 6cca48eaf9 | |||
| 215eb8352d | |||
| fdcdff52cd | |||
| 3e084c1850 | |||
| 0ff32da99a | |||
| 3959d041c4 |
BIN
locale/de/LC_MESSAGES/django.mo
Normal file
BIN
locale/de/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
40
locale/de/LC_MESSAGES/django.po
Normal file
40
locale/de/LC_MESSAGES/django.po
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: mandelstudio\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2026-05-15 00:00+0200\n"
|
||||||
|
"PO-Revision-Date: 2026-05-15 00:00+0200\n"
|
||||||
|
"Last-Translator: \n"
|
||||||
|
"Language-Team: German\n"
|
||||||
|
"Language: de\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
msgid "Privacy & Cookies"
|
||||||
|
msgstr "Datenschutz & Cookies"
|
||||||
|
|
||||||
|
msgid "We use cookies to make sure our website works as well as possible. If you continue using this website, we assume you agree."
|
||||||
|
msgstr "Wir verwenden Cookies, um sicherzustellen, dass unsere Website so gut wie möglich funktioniert. Wenn Sie diese Website weiter nutzen, gehen wir davon aus, dass Sie einverstanden sind."
|
||||||
|
|
||||||
|
msgid "Accept"
|
||||||
|
msgstr "Akzeptieren"
|
||||||
|
|
||||||
|
msgid "Settings"
|
||||||
|
msgstr "Einstellungen"
|
||||||
|
|
||||||
|
msgid "You can update your cookie preferences at any time."
|
||||||
|
msgstr "Sie können Ihre Cookie-Einstellungen jederzeit ändern."
|
||||||
|
|
||||||
|
msgid "Back"
|
||||||
|
msgstr "Zurück"
|
||||||
|
|
||||||
|
msgid "Cookie settings"
|
||||||
|
msgstr "Cookie-Einstellungen"
|
||||||
|
|
||||||
|
msgid "Choose which cookie categories you allow. Functional cookies are always enabled because they are required for the website to work."
|
||||||
|
msgstr "Wählen Sie aus, welche Cookie-Kategorien Sie erlauben. Funktionale Cookies sind immer aktiviert, da sie für den Betrieb der Website erforderlich sind."
|
||||||
|
|
||||||
|
msgid "Save preferences"
|
||||||
|
msgstr "Einstellungen speichern"
|
||||||
BIN
locale/en/LC_MESSAGES/django.mo
Normal file
BIN
locale/en/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
BIN
locale/es/LC_MESSAGES/django.mo
Normal file
BIN
locale/es/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
40
locale/es/LC_MESSAGES/django.po
Normal file
40
locale/es/LC_MESSAGES/django.po
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: mandelstudio\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2026-05-15 00:00+0200\n"
|
||||||
|
"PO-Revision-Date: 2026-05-15 00:00+0200\n"
|
||||||
|
"Last-Translator: \n"
|
||||||
|
"Language-Team: Spanish\n"
|
||||||
|
"Language: es\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
msgid "Privacy & Cookies"
|
||||||
|
msgstr "Privacidad y cookies"
|
||||||
|
|
||||||
|
msgid "We use cookies to make sure our website works as well as possible. If you continue using this website, we assume you agree."
|
||||||
|
msgstr "Usamos cookies para asegurar que nuestro sitio web funcione lo mejor posible. Si continúa usando este sitio web, asumimos que está de acuerdo."
|
||||||
|
|
||||||
|
msgid "Accept"
|
||||||
|
msgstr "Aceptar"
|
||||||
|
|
||||||
|
msgid "Settings"
|
||||||
|
msgstr "Configuración"
|
||||||
|
|
||||||
|
msgid "You can update your cookie preferences at any time."
|
||||||
|
msgstr "Puede actualizar sus preferencias de cookies en cualquier momento."
|
||||||
|
|
||||||
|
msgid "Back"
|
||||||
|
msgstr "Volver"
|
||||||
|
|
||||||
|
msgid "Cookie settings"
|
||||||
|
msgstr "Configuración de cookies"
|
||||||
|
|
||||||
|
msgid "Choose which cookie categories you allow. Functional cookies are always enabled because they are required for the website to work."
|
||||||
|
msgstr "Elija qué categorías de cookies permite. Las cookies funcionales están siempre habilitadas porque son necesarias para que el sitio web funcione."
|
||||||
|
|
||||||
|
msgid "Save preferences"
|
||||||
|
msgstr "Guardar preferencias"
|
||||||
BIN
locale/fr/LC_MESSAGES/django.mo
Normal file
BIN
locale/fr/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
40
locale/fr/LC_MESSAGES/django.po
Normal file
40
locale/fr/LC_MESSAGES/django.po
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: mandelstudio\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2026-05-15 00:00+0200\n"
|
||||||
|
"PO-Revision-Date: 2026-05-15 00:00+0200\n"
|
||||||
|
"Last-Translator: \n"
|
||||||
|
"Language-Team: French\n"
|
||||||
|
"Language: fr\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
msgid "Privacy & Cookies"
|
||||||
|
msgstr "Confidentialité et cookies"
|
||||||
|
|
||||||
|
msgid "We use cookies to make sure our website works as well as possible. If you continue using this website, we assume you agree."
|
||||||
|
msgstr "Nous utilisons des cookies pour garantir le bon fonctionnement de notre site. Si vous continuez à utiliser ce site, nous supposons que vous êtes d'accord."
|
||||||
|
|
||||||
|
msgid "Accept"
|
||||||
|
msgstr "Accepter"
|
||||||
|
|
||||||
|
msgid "Settings"
|
||||||
|
msgstr "Paramètres"
|
||||||
|
|
||||||
|
msgid "You can update your cookie preferences at any time."
|
||||||
|
msgstr "Vous pouvez modifier vos préférences de cookies à tout moment."
|
||||||
|
|
||||||
|
msgid "Back"
|
||||||
|
msgstr "Retour"
|
||||||
|
|
||||||
|
msgid "Cookie settings"
|
||||||
|
msgstr "Paramètres des cookies"
|
||||||
|
|
||||||
|
msgid "Choose which cookie categories you allow. Functional cookies are always enabled because they are required for the website to work."
|
||||||
|
msgstr "Choisissez les catégories de cookies que vous autorisez. Les cookies fonctionnels sont toujours activés car ils sont nécessaires au fonctionnement du site."
|
||||||
|
|
||||||
|
msgid "Save preferences"
|
||||||
|
msgstr "Enregistrer les préférences"
|
||||||
BIN
locale/it/LC_MESSAGES/django.mo
Normal file
BIN
locale/it/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
40
locale/it/LC_MESSAGES/django.po
Normal file
40
locale/it/LC_MESSAGES/django.po
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: mandelstudio\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2026-05-15 00:00+0200\n"
|
||||||
|
"PO-Revision-Date: 2026-05-15 00:00+0200\n"
|
||||||
|
"Last-Translator: \n"
|
||||||
|
"Language-Team: Italian\n"
|
||||||
|
"Language: it\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
msgid "Privacy & Cookies"
|
||||||
|
msgstr "Privacy e cookie"
|
||||||
|
|
||||||
|
msgid "We use cookies to make sure our website works as well as possible. If you continue using this website, we assume you agree."
|
||||||
|
msgstr "Utilizziamo i cookie per assicurarci che il nostro sito web funzioni nel miglior modo possibile. Se continui a utilizzare questo sito web, presumiamo che tu sia d'accordo."
|
||||||
|
|
||||||
|
msgid "Accept"
|
||||||
|
msgstr "Accetta"
|
||||||
|
|
||||||
|
msgid "Settings"
|
||||||
|
msgstr "Impostazioni"
|
||||||
|
|
||||||
|
msgid "You can update your cookie preferences at any time."
|
||||||
|
msgstr "Puoi aggiornare le tue preferenze sui cookie in qualsiasi momento."
|
||||||
|
|
||||||
|
msgid "Back"
|
||||||
|
msgstr "Indietro"
|
||||||
|
|
||||||
|
msgid "Cookie settings"
|
||||||
|
msgstr "Impostazioni cookie"
|
||||||
|
|
||||||
|
msgid "Choose which cookie categories you allow. Functional cookies are always enabled because they are required for the website to work."
|
||||||
|
msgstr "Scegli quali categorie di cookie consentire. I cookie funzionali sono sempre abilitati perché necessari al funzionamento del sito web."
|
||||||
|
|
||||||
|
msgid "Save preferences"
|
||||||
|
msgstr "Salva preferenze"
|
||||||
BIN
locale/nl/LC_MESSAGES/django.mo
Normal file
BIN
locale/nl/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
BIN
locale/pt/LC_MESSAGES/django.mo
Normal file
BIN
locale/pt/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
40
locale/pt/LC_MESSAGES/django.po
Normal file
40
locale/pt/LC_MESSAGES/django.po
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: mandelstudio\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2026-05-15 00:00+0200\n"
|
||||||
|
"PO-Revision-Date: 2026-05-15 00:00+0200\n"
|
||||||
|
"Last-Translator: \n"
|
||||||
|
"Language-Team: Portuguese\n"
|
||||||
|
"Language: pt\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
msgid "Privacy & Cookies"
|
||||||
|
msgstr "Privacidade e cookies"
|
||||||
|
|
||||||
|
msgid "We use cookies to make sure our website works as well as possible. If you continue using this website, we assume you agree."
|
||||||
|
msgstr "Usamos cookies para garantir que nosso site funcione da melhor forma possível. Se você continuar usando este site, presumimos que concorda."
|
||||||
|
|
||||||
|
msgid "Accept"
|
||||||
|
msgstr "Aceitar"
|
||||||
|
|
||||||
|
msgid "Settings"
|
||||||
|
msgstr "Configurações"
|
||||||
|
|
||||||
|
msgid "You can update your cookie preferences at any time."
|
||||||
|
msgstr "Você pode atualizar suas preferências de cookies a qualquer momento."
|
||||||
|
|
||||||
|
msgid "Back"
|
||||||
|
msgstr "Voltar"
|
||||||
|
|
||||||
|
msgid "Cookie settings"
|
||||||
|
msgstr "Configurações de cookies"
|
||||||
|
|
||||||
|
msgid "Choose which cookie categories you allow. Functional cookies are always enabled because they are required for the website to work."
|
||||||
|
msgstr "Escolha quais categorias de cookies você permite. Os cookies funcionais estão sempre ativados porque são necessários para o funcionamento do site."
|
||||||
|
|
||||||
|
msgid "Save preferences"
|
||||||
|
msgstr "Salvar preferências"
|
||||||
BIN
locale/ru/LC_MESSAGES/django.mo
Normal file
BIN
locale/ru/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
40
locale/ru/LC_MESSAGES/django.po
Normal file
40
locale/ru/LC_MESSAGES/django.po
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: mandelstudio\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2026-05-15 00:00+0200\n"
|
||||||
|
"PO-Revision-Date: 2026-05-15 00:00+0200\n"
|
||||||
|
"Last-Translator: \n"
|
||||||
|
"Language-Team: Russian\n"
|
||||||
|
"Language: ru\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
msgid "Privacy & Cookies"
|
||||||
|
msgstr "Конфиденциальность и файлы cookie"
|
||||||
|
|
||||||
|
msgid "We use cookies to make sure our website works as well as possible. If you continue using this website, we assume you agree."
|
||||||
|
msgstr "Мы используем файлы cookie, чтобы наш сайт работал как можно лучше. Если вы продолжаете пользоваться этим сайтом, мы считаем, что вы согласны."
|
||||||
|
|
||||||
|
msgid "Accept"
|
||||||
|
msgstr "Принять"
|
||||||
|
|
||||||
|
msgid "Settings"
|
||||||
|
msgstr "Настройки"
|
||||||
|
|
||||||
|
msgid "You can update your cookie preferences at any time."
|
||||||
|
msgstr "Вы можете изменить свои настройки cookie в любое время."
|
||||||
|
|
||||||
|
msgid "Back"
|
||||||
|
msgstr "Назад"
|
||||||
|
|
||||||
|
msgid "Cookie settings"
|
||||||
|
msgstr "Настройки cookie"
|
||||||
|
|
||||||
|
msgid "Choose which cookie categories you allow. Functional cookies are always enabled because they are required for the website to work."
|
||||||
|
msgstr "Выберите, какие категории cookie вы разрешаете. Функциональные cookie всегда включены, так как они необходимы для работы сайта."
|
||||||
|
|
||||||
|
msgid "Save preferences"
|
||||||
|
msgstr "Сохранить настройки"
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
# Generated by Django 5.2.11 on 2026-05-15 00:00
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
import wagtail.fields
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
("cookie_jar", "0007_cookiesettings_cookie_message_de_and_more"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="cookiesettings",
|
||||||
|
name="popup_cookie_message_de",
|
||||||
|
field=wagtail.fields.RichTextField(
|
||||||
|
blank=True, null=True, verbose_name="Popup cookie statement"
|
||||||
|
),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="cookiesettings",
|
||||||
|
name="popup_cookie_message_en",
|
||||||
|
field=wagtail.fields.RichTextField(
|
||||||
|
blank=True, null=True, verbose_name="Popup cookie statement"
|
||||||
|
),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="cookiesettings",
|
||||||
|
name="popup_cookie_message_es",
|
||||||
|
field=wagtail.fields.RichTextField(
|
||||||
|
blank=True, null=True, verbose_name="Popup cookie statement"
|
||||||
|
),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="cookiesettings",
|
||||||
|
name="popup_cookie_message_fr",
|
||||||
|
field=wagtail.fields.RichTextField(
|
||||||
|
blank=True, null=True, verbose_name="Popup cookie statement"
|
||||||
|
),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="cookiesettings",
|
||||||
|
name="popup_cookie_message_it",
|
||||||
|
field=wagtail.fields.RichTextField(
|
||||||
|
blank=True, null=True, verbose_name="Popup cookie statement"
|
||||||
|
),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="cookiesettings",
|
||||||
|
name="popup_cookie_message_pt",
|
||||||
|
field=wagtail.fields.RichTextField(
|
||||||
|
blank=True, null=True, verbose_name="Popup cookie statement"
|
||||||
|
),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="cookiesettings",
|
||||||
|
name="popup_cookie_message_ru",
|
||||||
|
field=wagtail.fields.RichTextField(
|
||||||
|
blank=True, null=True, verbose_name="Popup cookie statement"
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -174,6 +174,16 @@ ACTIVE_VERTICAL = "agency"
|
|||||||
WAGTAIL_I18N_ENABLED = True
|
WAGTAIL_I18N_ENABLED = True
|
||||||
WAGTAIL_CONTENT_LANGUAGES = LANGUAGES
|
WAGTAIL_CONTENT_LANGUAGES = LANGUAGES
|
||||||
|
|
||||||
|
# Ocyan i18n field mapping (language-aware columns per active language).
|
||||||
|
_translated_fields = dict(globals().get("OCYAN_I18N_TRANSLATED_FIELDS", {}))
|
||||||
|
_translated_fields.update(
|
||||||
|
{
|
||||||
|
"cookie_jar.cookiesettings.cookie_message": True,
|
||||||
|
"cookie_jar.cookiesettings.popup_cookie_message": True,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
OCYAN_I18N_TRANSLATED_FIELDS = _translated_fields
|
||||||
|
|
||||||
CONTENT_GUARD_STRICT = True
|
CONTENT_GUARD_STRICT = True
|
||||||
CONTENT_GUARD_BLOCK_MEDIUM = False
|
CONTENT_GUARD_BLOCK_MEDIUM = False
|
||||||
CONTENT_GUARD_LOCALES = [code for code, _label in LANGUAGES]
|
CONTENT_GUARD_LOCALES = [code for code, _label in LANGUAGES]
|
||||||
|
|||||||
@@ -1,42 +1,53 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load wagtailcore_tags ocyanjson %}
|
{% load wagtailcore_tags ocyanjson %}
|
||||||
|
{% load mandelstudio_i18n %}
|
||||||
|
|
||||||
{% with settings.cookie_jar.CookieSettings as cookie_settings %}
|
{% with settings.cookie_jar.CookieSettings as cookie_settings %}
|
||||||
<div id="cookie_popup_body" class="cookie-consent-overlay" role="region" aria-label="{% trans 'Cookie settings' %}">
|
{% with request.LANGUAGE_CODE|default:'nl' as language_code %}
|
||||||
|
{% with language_code|slice:':2' as lang %}
|
||||||
|
{% if cookie_jar.needs_approval or cookie_jar.site_settings.strict_cookies %}
|
||||||
|
{% if cookie_jar.needs_display or cookie_jar.cookie is None %}
|
||||||
|
<div id="cookie_popup_body" class="cookie-consent-overlay" role="region" aria-label="{% if lang == 'ru' %}Настройки cookie{% elif lang == 'de' %}Cookie-Einstellungen{% elif lang == 'fr' %}Paramètres des cookies{% elif lang == 'es' %}Configuración de cookies{% elif lang == 'it' %}Impostazioni cookie{% elif lang == 'pt' %}Definições de cookies{% elif lang == 'en' %}Cookie settings{% else %}Cookie instellingen{% endif %}">
|
||||||
<div class="cookie-consent-modal" role="dialog" aria-modal="true" aria-labelledby="cookie-consent-title">
|
<div class="cookie-consent-modal" role="dialog" aria-modal="true" aria-labelledby="cookie-consent-title">
|
||||||
<div class="cookie-consent-panel is-active" id="cookie-consent-main-panel">
|
<div class="cookie-consent-panel is-active" id="cookie-consent-main-panel">
|
||||||
<div class="cookie-banner-title" id="cookie-consent-title">
|
<div class="cookie-banner-title" id="cookie-consent-title">
|
||||||
<i class="fa fa-shield-halved" aria-hidden="true"></i>
|
<i class="fa fa-shield-halved" aria-hidden="true"></i>
|
||||||
<span>{% trans 'Privacy & Cookies' %}</span>
|
<span>{% if lang == 'ru' %}Конфиденциальность и файлы cookie{% elif lang == 'de' %}Datenschutz & Cookies{% elif lang == 'fr' %}Confidentialité & Cookies{% elif lang == 'es' %}Privacidad y Cookies{% elif lang == 'it' %}Privacy e Cookie{% elif lang == 'pt' %}Privacidade & Cookies{% else %}Privacy & Cookies{% endif %}</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="cookie_popup_content">
|
<div id="cookie_popup_content">
|
||||||
|
{% localized_setting_text cookie_settings "cookie_message" as cookie_message_text %}
|
||||||
|
{% if cookie_message_text %}
|
||||||
|
{{ cookie_message_text|richtext }}
|
||||||
|
{% else %}
|
||||||
<p>
|
<p>
|
||||||
{% blocktrans %}
|
{% blocktrans %}
|
||||||
We use cookies to make sure our website works as well as possible. If you continue using this website, we assume you agree.
|
We use cookies to make sure our website works as well as possible. If you continue using this website, we assume you agree.
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
</p>
|
</p>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div id="cookie_buttons" class="cookie-consent-actions">
|
<div id="cookie_buttons" class="cookie-consent-actions">
|
||||||
<button type="button" id="cookie_popup_acceptButton" data-cookie-key="{{ cookie_jar.cookie_key }}">{% trans 'Accept' %}</button>
|
<button type="button" id="cookie_popup_acceptButton" data-cookie-key="{{ cookie_jar.cookie_key }}">{% if lang == 'ru' %}Принять{% elif lang == 'de' %}Akzeptieren{% elif lang == 'fr' %}Accepter{% elif lang == 'es' %}Aceptar{% elif lang == 'it' %}Accetta{% elif lang == 'pt' %}Aceitar{% elif lang == 'en' %}Accept{% else %}Accepteer{% endif %}</button>
|
||||||
<button type="button" id="cookie_popup_settingsToggle">{% trans 'Settings' %}</button>
|
<button type="button" id="cookie_popup_settingsToggle">{% if lang == 'ru' %}Настройки{% elif lang == 'de' %}Einstellungen{% elif lang == 'fr' %}Paramètres{% elif lang == 'es' %}Configuración{% elif lang == 'it' %}Impostazioni{% elif lang == 'pt' %}Definições{% elif lang == 'en' %}Settings{% else %}Instellingen{% endif %}</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="cookie-consent-hint">
|
<div class="cookie-consent-hint">
|
||||||
{% trans 'You can update your cookie preferences at any time.' %}
|
{% if lang == 'ru' %}Вы можете изменить свои настройки cookie в любое время.{% elif lang == 'de' %}Sie können Ihre Cookie-Einstellungen jederzeit aktualisieren.{% elif lang == 'fr' %}Vous pouvez mettre à jour vos préférences de cookies à tout moment.{% elif lang == 'es' %}Puede actualizar sus preferencias de cookies en cualquier momento.{% elif lang == 'it' %}Puoi aggiornare le tue preferenze sui cookie in qualsiasi momento.{% elif lang == 'pt' %}Pode atualizar as suas preferências de cookies a qualquer momento.{% elif lang == 'en' %}You can update your cookie preferences at any time.{% else %}U kunt uw cookievoorkeuren op elk moment aanpassen.{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cookie-consent-panel" id="cookie-consent-settings-panel">
|
<div class="cookie-consent-panel" id="cookie-consent-settings-panel">
|
||||||
<button type="button" class="cookie-consent-back" id="cookie_popup_backButton">
|
<button type="button" class="cookie-consent-back" id="cookie_popup_backButton">
|
||||||
<i class="fa fa-arrow-left" aria-hidden="true"></i>
|
<i class="fa fa-arrow-left" aria-hidden="true"></i>
|
||||||
<span>{% trans 'Back' %}</span>
|
<span>{% if lang == 'ru' %}Назад{% elif lang == 'de' %}Zurück{% elif lang == 'fr' %}Retour{% elif lang == 'es' %}Volver{% elif lang == 'it' %}Indietro{% elif lang == 'pt' %}Voltar{% elif lang == 'en' %}Back{% else %}Terug{% endif %}</span>
|
||||||
</button>
|
</button>
|
||||||
<div class="cookie-banner-title">
|
<div class="cookie-banner-title">
|
||||||
<i class="fa fa-sliders" aria-hidden="true"></i>
|
<i class="fa fa-sliders" aria-hidden="true"></i>
|
||||||
<span>{% trans 'Cookie settings' %}</span>
|
<span>{% if lang == 'ru' %}Настройки cookie{% elif lang == 'de' %}Cookie-Einstellungen{% elif lang == 'fr' %}Paramètres des cookies{% elif lang == 'es' %}Configuración de cookies{% elif lang == 'it' %}Impostazioni cookie{% elif lang == 'pt' %}Definições de cookies{% elif lang == 'en' %}Cookie settings{% else %}Cookie instellingen{% endif %}</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="cookie_popup_content_modal">
|
<div id="cookie_popup_content_modal">
|
||||||
{% if cookie_settings.popup_cookie_message %}
|
{% localized_setting_text cookie_settings "popup_cookie_message" as popup_cookie_message_text %}
|
||||||
{{ cookie_settings.popup_cookie_message|richtext }}
|
{% if popup_cookie_message_text %}
|
||||||
|
{{ popup_cookie_message_text|richtext }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>
|
<p>
|
||||||
{% blocktrans %}
|
{% blocktrans %}
|
||||||
@@ -47,12 +58,16 @@
|
|||||||
</div>
|
</div>
|
||||||
{% include "cookie_jar/partials/cookie_checkboxes.html" %}
|
{% include "cookie_jar/partials/cookie_checkboxes.html" %}
|
||||||
<div class="cookie-consent-actions cookie-consent-actions-settings">
|
<div class="cookie-consent-actions cookie-consent-actions-settings">
|
||||||
<button type="button" id="cookie_popup_acceptButton_settings">{% trans 'Accept' %}</button>
|
<button type="button" id="cookie_popup_acceptButton_settings">{% if lang == 'ru' %}Принять{% elif lang == 'de' %}Akzeptieren{% elif lang == 'fr' %}Accepter{% elif lang == 'es' %}Aceptar{% elif lang == 'it' %}Accetta{% elif lang == 'pt' %}Aceitar{% elif lang == 'en' %}Accept{% else %}Accepteer{% endif %}</button>
|
||||||
<button type="button" id="cookie_model_saveButton" data-cookie-key="{{ cookie_jar.cookie_key }}">{% trans 'Save preferences' %}</button>
|
<button type="button" id="cookie_model_saveButton" data-cookie-key="{{ cookie_jar.cookie_key }}">{% if lang == 'ru' %}Сохранить настройки{% elif lang == 'de' %}Einstellungen speichern{% elif lang == 'fr' %}Enregistrer les préférences{% elif lang == 'es' %}Guardar preferencias{% elif lang == 'it' %}Salva preferenze{% elif lang == 'pt' %}Guardar preferências{% elif lang == 'en' %}Save preferences{% else %}Voorkeuren opslaan{% endif %}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endwith %}
|
||||||
|
{% endwith %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
{# Ensure Carbasa webshop styling is present so responsive header/footer render correctly. #}
|
{# Ensure Carbasa webshop styling is present so responsive header/footer render correctly. #}
|
||||||
<link rel="stylesheet" type="text/x-scss" href="{% static 'carbasa/webshop_base.scss' %}">
|
<link rel="stylesheet" type="text/x-scss" href="{% static 'carbasa/webshop_base.scss' %}">
|
||||||
<link rel="stylesheet" type="text/x-scss" href="{% static 'mandelstudio/scss/layout_overrides.scss' %}">
|
<link rel="stylesheet" type="text/css" href="{% static 'mandelstudio/css/layout_overrides.css' %}">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrahead %}
|
{% block extrahead %}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from django import template
|
from django import template
|
||||||
|
from django.utils.translation import get_language
|
||||||
|
|
||||||
from mandelstudio.i18n_utils import normalize_set_language_next
|
from mandelstudio.i18n_utils import normalize_set_language_next
|
||||||
|
|
||||||
@@ -29,3 +30,22 @@ def skip_to_content_text(context) -> str:
|
|||||||
def language_neutral_path(value: str | None) -> str:
|
def language_neutral_path(value: str | None) -> str:
|
||||||
"""Normalize a path for set_language by removing any leading language prefix."""
|
"""Normalize a path for set_language by removing any leading language prefix."""
|
||||||
return normalize_set_language_next(value)
|
return normalize_set_language_next(value)
|
||||||
|
|
||||||
|
|
||||||
|
@register.simple_tag
|
||||||
|
def localized_setting_text(settings_obj, field_name: str, fallback_text: str = "") -> str:
|
||||||
|
"""
|
||||||
|
Resolve a translated settings field by active language and fallback to base field.
|
||||||
|
"""
|
||||||
|
if not settings_obj or not field_name:
|
||||||
|
return fallback_text
|
||||||
|
|
||||||
|
language = (get_language() or "").lower().split("-")[0]
|
||||||
|
if language and language != "nl":
|
||||||
|
translated_name = f"{field_name}_{language}"
|
||||||
|
translated_value = getattr(settings_obj, translated_name, None)
|
||||||
|
if translated_value:
|
||||||
|
return translated_value
|
||||||
|
|
||||||
|
base_value = getattr(settings_obj, field_name, None)
|
||||||
|
return base_value or fallback_text
|
||||||
|
|||||||
Reference in New Issue
Block a user