feat: Website und Hub zweisprachig (Deutsch/Englisch)
Website (rinkplanner.programmschmiede.de) liegt jetzt im Repo unter web/: Sprachweiche nach Accept-Language (der User-Agent enthält keine Sprache), /de/ und /en/ als eigene URLs mit hreflang, Cookie für die manuelle Wahl, Texte in web/i18n.php, Markup in web/template.php. Deployment über tools/deploy_web.sh (--sync, --check, --all); /index.html leitet weiter. Hub: optionale englische Oberfläche über den DE/EN-Umschalter, Cookie RHUB_LANG, Route /language. Alle Texte (Views, Meldungen, Validierung, API-messages) stehen in hub/app/i18n_strings.php und laufen über t(); Datum und Zahlen folgen der Sprache. Die API behält ihre code-Felder und antwortet ohne Cookie weiter deutsch. deploy_hub.sh --check prüft jetzt Schlüsselparität und fehlende t()-Schlüssel. Doku: docs/website.md neu, docs/hub.md und AGENTS.md ergänzt.
This commit is contained in:
parent
6c8dc942e8
commit
9819311403
41 changed files with 2801 additions and 326 deletions
|
|
@ -24,39 +24,42 @@ $linkFor = static function (int $targetPage) use ($query, $mine): string {
|
|||
alt="Rinkplanner-Hub-Logo: drei Schlittschuhe, durch ein Netz verbunden"
|
||||
width="132" height="132">
|
||||
<div class="hub-hero-text">
|
||||
<p class="eyebrow">Viele Schlittschuhe, ein Netz</p>
|
||||
<p class="hub-hero-title">Küren teilen, Fassungen vergleichen, gemeinsam weiterentwickeln.</p>
|
||||
<p class="hub-hero-sub">Der Hub sammelt Küren, Musik und Revisionen deines Teams an einem Ort.</p>
|
||||
<p class="eyebrow"><?= e(t('dashboard.eyebrow')) ?></p>
|
||||
<p class="hub-hero-title"><?= e(t('dashboard.hero_title')) ?></p>
|
||||
<p class="hub-hero-sub"><?= e(t('dashboard.hero_sub')) ?></p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="page-head">
|
||||
<div>
|
||||
<h1>Küren</h1>
|
||||
<p class="muted"><?= (int) $total ?> <?= $total === 1 ? 'Kür' : 'Küren' ?> im Hub<?= $mine ? ' (nur deine)' : '' ?>.</p>
|
||||
<h1><?= e(t('dashboard.title')) ?></h1>
|
||||
<p class="muted"><?= e(t('dashboard.count', [
|
||||
'count' => (int) $total,
|
||||
'label' => t($total === 1 ? 'dashboard.one_routine' : 'dashboard.many_routines'),
|
||||
])) ?><?= $mine ? e(t('dashboard.mine_suffix')) : '' ?>.</p>
|
||||
</div>
|
||||
<a class="button primary" href="<?= e(url('/upload')) ?>">Kür hochladen</a>
|
||||
<a class="button primary" href="<?= e(url('/upload')) ?>"><?= e(t('dashboard.upload')) ?></a>
|
||||
</div>
|
||||
|
||||
<div class="toolbar">
|
||||
<form method="get" action="<?= e(url('/')) ?>" class="search">
|
||||
<input type="search" name="q" value="<?= e_attr($query) ?>" placeholder="Titel, Skater, Musik, Benutzer …">
|
||||
<input type="search" name="q" value="<?= e_attr($query) ?>" placeholder="<?= e_attr(t('dashboard.search_placeholder')) ?>">
|
||||
<?php if ($mine): ?><input type="hidden" name="mine" value="1"><?php endif; ?>
|
||||
<button type="submit">Suchen</button>
|
||||
<button type="submit"><?= e(t('dashboard.search')) ?></button>
|
||||
</form>
|
||||
<div class="tabs">
|
||||
<a class="<?= $mine ? '' : 'active' ?>" href="<?= e(url('/')) ?>">Alle</a>
|
||||
<a class="<?= $mine ? 'active' : '' ?>" href="<?= e(url('/?mine=1')) ?>">Meine Küren</a>
|
||||
<a class="<?= $mine ? '' : 'active' ?>" href="<?= e(url('/')) ?>"><?= e(t('dashboard.all')) ?></a>
|
||||
<a class="<?= $mine ? 'active' : '' ?>" href="<?= e(url('/?mine=1')) ?>"><?= e(t('dashboard.mine')) ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (!$items): ?>
|
||||
<div class="empty">
|
||||
<p>Keine Küren gefunden.</p>
|
||||
<p><?= e(t('dashboard.empty')) ?></p>
|
||||
<?php if ($query !== ''): ?>
|
||||
<p class="muted">Suche zurücksetzen oder <a href="<?= e(url('/upload')) ?>">selbst eine Kür hochladen</a>.</p>
|
||||
<p class="muted"><?= e(t('dashboard.empty_hint')) ?> <a href="<?= e(url('/upload')) ?>"><?= e(t('dashboard.empty_upload')) ?></a>.</p>
|
||||
<?php else: ?>
|
||||
<p class="muted">Der Hub ist noch leer. <a href="<?= e(url('/upload')) ?>">Erste Kür hochladen</a>.</p>
|
||||
<p class="muted"><?= e(t('dashboard.empty_first')) ?> <a href="<?= e(url('/upload')) ?>"><?= e(t('dashboard.empty_first_action')) ?></a>.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
|
|
@ -64,13 +67,13 @@ $linkFor = static function (int $targetPage) use ($query, $mine): string {
|
|||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Titel</th>
|
||||
<th>Skater</th>
|
||||
<th>Musik</th>
|
||||
<th>Rev.</th>
|
||||
<th>Größe</th>
|
||||
<th>Aktualisiert</th>
|
||||
<th>Von</th>
|
||||
<th><?= e(t('table.title')) ?></th>
|
||||
<th><?= e(t('table.skater')) ?></th>
|
||||
<th><?= e(t('table.music')) ?></th>
|
||||
<th><?= e(t('table.revision')) ?></th>
|
||||
<th><?= e(t('table.size')) ?></th>
|
||||
<th><?= e(t('table.updated')) ?></th>
|
||||
<th><?= e(t('table.by')) ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -79,7 +82,7 @@ $linkFor = static function (int $targetPage) use ($query, $mine): string {
|
|||
<td>
|
||||
<a class="title-link" href="<?= e(url('/routines/' . (int) $item['id'])) ?>"><?= e($item['title']) ?></a>
|
||||
<?php if ($item['status'] !== 'published'): ?>
|
||||
<span class="badge">versteckt</span>
|
||||
<span class="badge"><?= e(t('badge.hidden')) ?></span>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($item['category'])): ?>
|
||||
<span class="badge badge-soft"><?= e($item['category']) ?></span>
|
||||
|
|
@ -110,11 +113,11 @@ $linkFor = static function (int $targetPage) use ($query, $mine): string {
|
|||
<?php if ($pages > 1): ?>
|
||||
<nav class="pagination">
|
||||
<?php if ($page > 1): ?>
|
||||
<a href="<?= e($linkFor($page - 1)) ?>">← Zurück</a>
|
||||
<a href="<?= e($linkFor($page - 1)) ?>"><?= e(t('pagination.back')) ?></a>
|
||||
<?php endif; ?>
|
||||
<span>Seite <?= (int) $page ?> von <?= (int) $pages ?></span>
|
||||
<span><?= e(t('pagination.page', ['page' => (int) $page, 'pages' => (int) $pages])) ?></span>
|
||||
<?php if ($page < $pages): ?>
|
||||
<a href="<?= e($linkFor($page + 1)) ?>">Weiter →</a>
|
||||
<a href="<?= e($linkFor($page + 1)) ?>"><?= e(t('pagination.next')) ?></a>
|
||||
<?php endif; ?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue