Translate pages, areas, menus, forms and posts field by field instead of rebuilding them

A site can have further languages (Settings → Languages). A page is built once; each language
adds only its texts, keyed by the stable block IDs, plus its own address under /en/… (ADR 111,
document schema v27, migration 20261009000100 for page_translation).

- Editor: DE | EN switch, a list of all texts with original, state (missing, translated,
  original changed) and filter; structure stays with the main language. Undo, drafts,
  publishing and revisions cover all languages at once.
- Website: /en and translated slugs, lang, canonical, hreflang with x-default, og:locale,
  sitemap; links to translated pages follow the language; a language switch block.
- Header, footer and linked sections translate the same way; menu entries carry labels per
  language; fixed template texts come from a small dictionary.
- Forms: labels, help, options, button and success message per language; messages and the
  step script speak the language, the submission and the email stay in the main language.
- Posts, archives, category names, consent text and the 404 page follow the language.
- Single-language sites see none of it and never touch the new table.

The forms administration becomes an overview with one row per form and its own edit page;
fields are one line each with details collapsed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
kantarciandClaude Opus 5.5 committed 2026-10-09 16:56:52 +02:00
1 parent c7705b7083
commit e15b2517b1
51 files changed
+3045 -219

No files matched your search

+9 -9
View File
@@ -9,36 +9,36 @@
Klasse, der Rest als Variablen im Kopf der Seite (Consent::styles). #}
<section class="consent-bar consent-layout-{{ consent.layout|default('karte') }}" role="region" aria-labelledby="consent-heading">
<div class="consent-body">
<h2 id="consent-heading"><svg class="consent-icon" viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M12 3 5 6v6c0 4.4 2.9 7.9 7 9 4.1-1.1 7-4.6 7-9V6Zm-2.5 9 2 2 4-4.5"/></svg><span>{{ consent.title|default('') ?: 'Externe Inhalte und Einwilligung' }}</span></h2>
<p>{{ consent.text ?: 'Diese Website lädt bestimmte Inhalte erst, wenn du zustimmst. Ohne Zustimmung wird die Seite vollständig angezeigt, nur eingebettete Inhalte anderer Anbieter bleiben leer.' }}</p>
<h2 id="consent-heading"><svg class="consent-icon" viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M12 3 5 6v6c0 4.4 2.9 7.9 7 9 4.1-1.1 7-4.6 7-9V6Zm-2.5 9 2 2 4-4.5"/></svg><span>{{ consent.title|default('') ?: 'Externe Inhalte und Einwilligung'|kant_t }}</span></h2>
<p>{{ consent.text ?: 'Diese Website lädt bestimmte Inhalte erst, wenn du zustimmst. Ohne Zustimmung wird die Seite vollständig angezeigt, nur eingebettete Inhalte anderer Anbieter bleiben leer.'|kant_t }}</p>
</div>
<form method="post" action="{{ path('consent_save') }}" class="consent-form">
<input type="hidden" name="back" value="{{ back }}">
<div class="consent-actions">
<button class="consent-button consent-accept" type="submit" name="choice" value="all">Alle akzeptieren</button>
<button class="consent-button consent-decline" type="submit" name="choice" value="none">Nur notwendige</button>
<button class="consent-button consent-accept" type="submit" name="choice" value="all">{{ 'Alle akzeptieren'|kant_t }}</button>
<button class="consent-button consent-decline" type="submit" name="choice" value="none">{{ 'Nur notwendige'|kant_t }}</button>
</div>
{# Eine Zeile: links die Einzelwahl, rechts die Rechtslinks. Aufgeklappt nimmt die
Einzelwahl die ganze Breite, die Links rutschen darunter. #}
<div class="consent-foot">
<details class="consent-details">
<summary>Einzeln wählen</summary>
<summary>{{ 'Einzeln wählen'|kant_t }}</summary>
<ul class="consent-groups">
{% for group in consent.groups %}
<li>
<label for="consent-{{ group.key }}">
<input id="consent-{{ group.key }}" type="checkbox" name="groups[]" value="{{ group.key }}"{{ group.granted ? ' checked' : '' }}>
<span><strong>{{ group.name }}</strong> {{ group.help }}</span>
<span><strong>{{ group.name|kant_t }}</strong> {{ group.help|kant_t }}</span>
</label>
</li>
{% endfor %}
</ul>
<button class="consent-button consent-choice" type="submit" name="choice" value="some">Auswahl speichern</button>
<button class="consent-button consent-choice" type="submit" name="choice" value="some">{{ 'Auswahl speichern'|kant_t }}</button>
</details>
{% if consent.privacyPath or consent.imprintPath %}
<p class="consent-links">
{% if consent.privacyPath %}<a href="/{{ consent.privacyPath }}">Datenschutz</a>{% endif %}
{% if consent.imprintPath %}<a href="/{{ consent.imprintPath }}">Impressum</a>{% endif %}
{% if consent.privacyPath %}<a href="/{{ consent.privacyPath }}">{{ 'Datenschutz'|kant_t }}</a>{% endif %}
{% if consent.imprintPath %}<a href="/{{ consent.imprintPath }}">{{ 'Impressum'|kant_t }}</a>{% endif %}
</p>
{% endif %}
</div>