feat: add full i18n support to Commandocentrum

- Replace all hardcoded Dutch/English strings with __() translation calls
- Update 13 Blade components to use translation keys
- Update Commandocentrum.php controller with translation calls
- Add comprehensive Dutch (nl.json) and English (en.json) translations
- 150+ translation keys for UI labels, messages, and notifications
- Supports all 21 languages available in the lang/ directory
This commit is contained in:
root
2026-05-19 21:49:39 +02:00
parent c6246615bc
commit 2f30a058a4
16 changed files with 585 additions and 3003 deletions
@@ -13,10 +13,10 @@
$sourceCommitShort = substr($sourceCommit, 0, 7);
$hasUpdate = $sourceCommit !== 'N/A' && $remoteVersion !== 'N/A' && $sourceCommitShort !== $remoteVersion;
$updateColor = $hasUpdate ? '#f59e0b' : '#22c55e';
$updateText = $hasUpdate ? '🔄 Update beschikbaar' : '✓ Up-to-date';
$updateText = $hasUpdate ? '🔄 ' . __('commandocentrum.update_available') : '✓ ' . __('commandocentrum.up_to_date');
$btnColor = $hasUpdate ? '#f59e0b' : '#3b82f6';
$btnGradient = $hasUpdate ? 'linear-gradient(135deg,#f59e0b,#d97706)' : 'linear-gradient(135deg,#3b82f6,#2563eb)';
$btnText = $hasUpdate ? '⚡ Updaten' : '🔄 Herbouwen';
$btnText = $hasUpdate ? '⚡ ' . __('commandocentrum.update') : '🔄 ' . __('commandocentrum.rebuild');
$jarFileName = '';
if ($jarExists) {
@@ -33,19 +33,19 @@
<div style="display:flex;flex-direction:column;gap:8px;font-size:13px;">
<div style="display:flex;gap:16px;">
@if ($emulatorOnline)
<span style="color:#22c55e;"> Online</span>
<span style="color:#22c55e;"> {{ __('commandocentrum.online') }}</span>
@else
<span style="color:#ef4444;"> Offline</span>
<span style="color:#ef4444;"> {{ __('commandocentrum.offline') }}</span>
@endif
@if ($jarExists)
<span style="color:#22c55e;"> JAR OK</span>
<span style="color:#22c55e;"> JAR {{ __('commandocentrum.ok') }}</span>
@else
<span style="color:#ef4444;"> JAR ontbreekt</span>
<span style="color:#ef4444;"> JAR {{ __('commandocentrum.missing') }}</span>
@endif
<span style="color:#3b82f6;">Service: {{ e($serviceName) }}</span>
<span style="color:#3b82f6;">{{ __('commandocentrum.service') }}: {{ e($serviceName) }}</span>
</div>
<div style="padding-top:8px;border-top:1px solid #e2e8f0;">
<div style="font-weight:600;color:#475569;margin-bottom:8px;">GitHub Status:</div>
<div style="font-weight:600;color:#475569;margin-bottom:8px;">GitHub {{ __('commandocentrum.status') }}:</div>
<div style="background:{{ $hasUpdate ? '#fef3c7' : '#dcfce7' }};padding:12px;border-radius:8px;margin-bottom:12px;">
<div style="display:flex;align-items:center;justify-content:space-between;">
<div style="display:flex;align-items:center;gap:8px;font-weight:600;color:{{ $updateColor }};">
@@ -61,24 +61,24 @@
</button>
</div>
</div>
<div style="display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f1f5f9;"><span>Latest:</span><span style="color:#22c55e;font-weight:600;"> {{ e($remoteVersion) }}</span></div>
<div style="display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f1f5f9;"><span>Source:</span><span style="color:#22c55e;font-weight:600;"> {{ $sourceCommitShort }}</span></div>
<div style="display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f1f5f9;"><span>{{ __('commandocentrum.latest') }}:</span><span style="color:#22c55e;font-weight:600;"> {{ e($remoteVersion) }}</span></div>
<div style="display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f1f5f9;"><span>{{ __('commandocentrum.source') }}:</span><span style="color:#22c55e;font-weight:600;"> {{ $sourceCommitShort }}</span></div>
@if ($jarFileName !== '')
<div style="display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f1f5f9;"><span>JAR:</span><span style="color:#22c55e;font-weight:600;"> {{ e($jarFileName) }}</span></div>
<div style="display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f1f5f9;"><span>{{ __('commandocentrum.jars') }}:</span><span style="color:#22c55e;font-weight:600;"> {{ e($jarFileName) }}</span></div>
@endif
@if ($canBuild)
<div style="display:flex;justify-content:space-between;padding:6px 0;"><span>Bouwen:</span><span style="color:#22c55e;font-weight:600;"> Maven (pom.xml)</span></div>
<div style="display:flex;justify-content:space-between;padding:6px 0;"><span>{{ __('commandocentrum.method') }}:</span><span style="color:#22c55e;font-weight:600;"> {{ __('commandocentrum.maven_pom') }}</span></div>
@else
<div style="display:flex;justify-content:space-between;padding:6px 0;"><span>Bouwen:</span><span style="color:#f59e0b;font-weight:600;">⚠️ Geen pom.xml</span></div>
<div style="display:flex;justify-content:space-between;padding:6px 0;"><span>{{ __('commandocentrum.method') }}:</span><span style="color:#f59e0b;font-weight:600;">⚠️ {{ __('commandocentrum.no_pom') }}</span></div>
@endif
<div style="margin-top:12px;padding:12px;background:#f8fafc;border-radius:8px;">
<div style="font-size:11px;color:#64748b;font-weight:600;margin-bottom:8px;">METHODE:</div>
<div style="font-size:11px;color:#64748b;font-weight:600;margin-bottom:8px;">{{ __('commandocentrum.method') }}:</div>
@if ($jarExists)
<div style="color:#3b82f6;font-weight:600;">📦 JAR Download & Herstart</div>
<div style="color:#3b82f6;font-weight:600;">📦 {{ __('commandocentrum.jar_download_restart') }}</div>
@elseif ($canBuild)
<div style="color:#3b82f6;font-weight:600;">🔨 Maven Build & Herstart</div>
<div style="color:#3b82f6;font-weight:600;">🔨 {{ __('commandocentrum.maven_build_restart') }}</div>
@else
<div style="color:#64748b;">Handmatig: Download JAR van GitHub</div>
<div style="color:#64748b;">{{ __('commandocentrum.manual_download') }}</div>
@endif
</div>
</div>