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
|
|
@ -3,11 +3,11 @@
|
|||
<?php /** @var array|null $routine */ ?>
|
||||
<?php $isRevision = $routine !== null; ?>
|
||||
<section class="auth-card wide">
|
||||
<h1><?= $isRevision ? 'Neue Revision' : 'Kür hochladen' ?></h1>
|
||||
<h1><?= e($isRevision ? t('upload.title_revision') : t('upload.title_new')) ?></h1>
|
||||
<?php if ($isRevision): ?>
|
||||
<p class="muted">Neue Fassung von „<?= e($routine['title']) ?>“. Die bisherige Revision bleibt erhalten.</p>
|
||||
<p class="muted"><?= e(t('upload.revision_lede', ['title' => $routine['title']])) ?></p>
|
||||
<?php else: ?>
|
||||
<p class="muted">Lade die Kür-JSON und – falls die Kür Musik nutzt – die zugehörige Audiodatei hoch. Beide gehören als Paket zusammen.</p>
|
||||
<p class="muted"><?= e(t('upload.lede')) ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($errors): ?>
|
||||
|
|
@ -26,41 +26,41 @@
|
|||
<?= csrf_field() ?>
|
||||
<div class="grid-2">
|
||||
<label>
|
||||
Kür-Datei (.json)
|
||||
<?= e(t('upload.routine_file')) ?>
|
||||
<input type="file" name="routine" accept=".json,application/json" required>
|
||||
<span class="hint">Aus Rinkplanner gespeicherte Kür, max. <?= e(human_bytes((int) config('app.max_routine_bytes', 8 * 1024 * 1024))) ?>.</span>
|
||||
<span class="hint"><?= e(t('upload.routine_hint', ['max' => human_bytes((int) config('app.max_routine_bytes', 8 * 1024 * 1024))])) ?></span>
|
||||
</label>
|
||||
<label>
|
||||
Musikdatei (MP3/OGG/WAV/M4A/AAC)
|
||||
<?= e(t('upload.audio_file')) ?>
|
||||
<input type="file" name="audio" accept=".mp3,.ogg,.wav,.m4a,.aac,audio/*">
|
||||
<span class="hint">Dateiname muss exakt dem Feld „music_file“ der Kür entsprechen.</span>
|
||||
<span class="hint"><?= e(t('upload.audio_hint')) ?></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<label>
|
||||
Beschreibung (optional)
|
||||
<?= e(t('upload.description')) ?>
|
||||
<textarea name="description" rows="4" maxlength="2000"><?= e($input['description']) ?></textarea>
|
||||
</label>
|
||||
|
||||
<div class="grid-2">
|
||||
<label>
|
||||
Musiktitel (optional)
|
||||
<?= e(t('upload.music_title')) ?>
|
||||
<input type="text" name="music_title" maxlength="190" value="<?= e_attr($input['music_title']) ?>">
|
||||
</label>
|
||||
<label>
|
||||
Interpret (optional)
|
||||
<?= e(t('upload.artist')) ?>
|
||||
<input type="text" name="music_artist" maxlength="190" value="<?= e_attr($input['music_artist']) ?>">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<label class="check">
|
||||
<input type="checkbox" name="rights" value="1" required>
|
||||
Ich habe die Rechte an Kür und Musik und darf sie im geschlossenen Beta-Hub teilen.
|
||||
<?= e(t('upload.rights')) ?>
|
||||
</label>
|
||||
|
||||
<div class="actions">
|
||||
<button class="primary" type="submit"><?= $isRevision ? 'Revision veröffentlichen' : 'Kür veröffentlichen' ?></button>
|
||||
<a class="button" href="<?= e(url($isRevision ? '/routines/' . (int) $routine['id'] : '/')) ?>">Abbrechen</a>
|
||||
<button class="primary" type="submit"><?= e($isRevision ? t('upload.submit_revision') : t('upload.submit_new')) ?></button>
|
||||
<a class="button" href="<?= e(url($isRevision ? '/routines/' . (int) $routine['id'] : '/')) ?>"><?= e(t('upload.cancel')) ?></a>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue