Upload via GUI (346 Dateien)
This commit is contained in:
@@ -57,6 +57,36 @@ require __DIR__ . '/_header.php';
|
||||
<?php if (count($langs) < 2): ?><p class="muted" style="margin-top:8px">Noch kein Sprachpaket aktiv. Installieren Sie zum Beispiel „English“ unter <a href="/staff/plugins.php">Plugins</a>; dann erscheinen die Flaggen.</p><?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$pluginLangs = i18n_plugin_language_overview();
|
||||
$otherCodes = array_values(array_filter(array_keys($langs), fn($c) => $c !== 'de'));
|
||||
$activePlugins = [];
|
||||
try { $activePlugins = $pdo->query("SELECT slug FROM plugins WHERE is_active = 1 ORDER BY slug")->fetchAll(PDO::FETCH_COLUMN); } catch (Throwable $e) { }
|
||||
$activePlugins = array_values(array_filter($activePlugins, fn($sl) => !isset($langs) || !in_array($sl, array_column($langs, 'slug'), true)));
|
||||
?>
|
||||
<div class="card" style="max-width:860px;margin-bottom:16px">
|
||||
<h3>Übersetzungen in den Plugins</h3>
|
||||
<p class="muted" style="font-size:.88rem">Jedes Plugin kann seine Texte selbst übersetzen: Es legt dazu im Plugin-Ordner <code>lang/<Sprachcode>.json</code> ab (zum Beispiel <code>lang/en.json</code>). Wird eine Sprache gewählt, nutzt DeskHub diese Dateien aller aktiven Plugins zusätzlich zum Sprachpaket; steht ein Text in beiden, gilt der aus dem Sprachpaket. Eine neue Sprache braucht deshalb nur ein Sprachpaket und je Plugin eine Datei.</p>
|
||||
<?php if (!$otherCodes): ?>
|
||||
<p class="muted">Noch kein Sprachpaket aktiv. Installieren Sie zum Beispiel „English“ unter <a href="/staff/plugins.php">Plugins</a>.</p>
|
||||
<?php elseif (!$activePlugins): ?>
|
||||
<p class="muted">Es ist kein Plugin aktiv.</p>
|
||||
<?php else: ?>
|
||||
<div style="overflow-x:auto"><table style="width:100%">
|
||||
<thead><tr><th>Plugin</th><?php foreach ($otherCodes as $c): ?><th><?= e($langs[$c]['name']) ?> (<?= e($c) ?>)</th><?php endforeach; ?></tr></thead>
|
||||
<tbody>
|
||||
<?php foreach ($activePlugins as $sl): ?>
|
||||
<tr><td><?= e((string) $sl) ?></td>
|
||||
<?php foreach ($otherCodes as $c): $n = $pluginLangs[$sl][$c] ?? null; ?>
|
||||
<td><?php if ($n === null): ?><span class="muted">keine Datei (Texte aus dem Sprachpaket oder deutsch)</span><?php else: ?>✓ <?= (int) $n ?> Texte<?php endif; ?></td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<form method="post" class="card" style="max-width:860px;margin-bottom:16px"><?= csrf_field() ?><input type="hidden" name="action" value="save">
|
||||
<h3>Einstellungen</h3>
|
||||
<label for="default_language">Standardsprache (für alle, die noch keine Flagge gewählt haben)</label>
|
||||
|
||||
Reference in New Issue
Block a user