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
@@ -9,14 +9,14 @@
<svg width="48" height="48" fill="none" stroke="currentColor" viewBox="0 0 24 24" style="margin:0 auto 16px;opacity:0.5;">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
<p>No staff activities recorded yet.</p>
<p style="font-size:12px;margin-top:8px;">Staff actions will appear here automatically.</p>
<p>{{ __('commandocentrum.no_staff_activities') }}</p>
<p style="font-size:12px;margin-top:8px;">{{ __('commandocentrum.staff_actions_auto') }}</p>
</div>
@else
<div style="background:#fff;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;">
<div style="padding:16px;border-bottom:1px solid #e2e8f0;display:flex;justify-content:space-between;align-items:center;">
<span style="font-weight:600;color:#1e293b;">Recent Staff Activities</span>
<span style="font-size:12px;color:#9ca3af;">Last 20 actions</span>
<span style="font-weight:600;color:#1e293b;">{{ __('commandocentrum.recent_staff_activities') }}</span>
<span style="font-size:12px;color:#9ca3af;">{{ __('commandocentrum.last_20_actions') }}</span>
</div>
<div style="max-height:400px;overflow-y:auto;">
@foreach ($activities as $activity)
@@ -28,18 +28,18 @@
$now = \Carbon\Carbon::now();
$diff = $now->diffInMinutes($carbon);
if ($diff < 1) {
$timeAgo = 'Just now';
$timeAgo = __('commandocentrum.just_now');
} elseif ($diff < 60) {
$timeAgo = $diff . 'm ago';
$timeAgo = $diff . __('commandocentrum.minutes_ago');
} elseif ($diff < 1440) {
$timeAgo = floor($diff / 60) . 'h ago';
$timeAgo = floor($diff / 60) . __('commandocentrum.hours_ago');
} else {
$timeAgo = floor($diff / 1440) . 'd ago';
$timeAgo = floor($diff / 1440) . __('commandocentrum.days_ago');
}
} catch (\Exception) {
$timeAgo = 'Unknown';
$timeAgo = __('commandocentrum.unknown');
}
$username = $activity->user->username ?? 'Unknown';
$username = $activity->user->username ?? __('commandocentrum.unknown');
@endphp
<div style="display:flex;align-items:center;gap:12px;padding:12px;border-bottom:1px solid #e2e8f0;">
<div style="width:36px;height:36px;border-radius:50%;background:#f1f5f9;display:flex;align-items:center;justify-content:center;font-size:18px;">