From 5aaf0422da95628c69d3ba50e17844bc2583d16f Mon Sep 17 00:00:00 2001 From: piciolo Date: Mon, 23 Mar 2026 20:38:58 +0100 Subject: [PATCH 1/5] Localize fleet status in event rows Add translation keys for enemy and neutral fleets and update eventrow blade to choose the fleet label based on $fleet_event_row->friendly_status. Tooltip titles now dynamically show 'Enemy fleet', 'Friendly fleet' or 'Own fleet' (plus mission label) for both tooltip variants so fleet relationship is correctly displayed in the UI. --- resources/lang/en/t_ingame.php | 2 ++ resources/views/ingame/fleetevents/eventrow.blade.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/lang/en/t_ingame.php b/resources/lang/en/t_ingame.php index ea5736952..08a8e88ec 100644 --- a/resources/lang/en/t_ingame.php +++ b/resources/lang/en/t_ingame.php @@ -303,6 +303,8 @@ 'kick' => 'Kick', 'ok' => 'Ok', 'own_fleet' => 'Own fleet', + 'enemy_fleet' => 'Enemy fleet', + 'neutral_fleet' => 'Friendly fleet', // Briefing section (no trailing colons — add : in template where needed) 'briefing' => 'Briefing', diff --git a/resources/views/ingame/fleetevents/eventrow.blade.php b/resources/views/ingame/fleetevents/eventrow.blade.php index 88e48b176..db8629317 100644 --- a/resources/views/ingame/fleetevents/eventrow.blade.php +++ b/resources/views/ingame/fleetevents/eventrow.blade.php @@ -14,7 +14,7 @@ {{ date('H:i:s', $fleet_event_row->mission_time_arrival) }} Clock + title="{{ $fleet_event_row->friendly_status === 'hostile' ? __('t_ingame.fleet.enemy_fleet') : ($fleet_event_row->friendly_status === 'neutral' ? __('t_ingame.fleet.neutral_fleet') : __('t_ingame.fleet.own_fleet')) }} | {{ $fleet_event_row->mission_label }} (R)" alt=""/> @@ -136,7 +136,7 @@ {{ date('H:i:s', $fleet_event_row->mission_time_arrival) }} Clock + title="{{ $fleet_event_row->friendly_status === 'hostile' ? __('t_ingame.fleet.enemy_fleet') : ($fleet_event_row->friendly_status === 'neutral' ? __('t_ingame.fleet.neutral_fleet') : __('t_ingame.fleet.own_fleet')) }} | {{ $fleet_event_row->mission_label }}" alt=""/> From 37bae8d8f3e14747d07bc2295e7ff60bdd598370 Mon Sep 17 00:00:00 2001 From: piciolo Date: Tue, 24 Mar 2026 05:47:43 +0100 Subject: [PATCH 2/5] Precompute fleet type label for tooltips Replace duplicated ternary expressions with a single PHP match that assigns $fleet_type_label based on $fleet_event_row->friendly_status (hostile, neutral, default to own_fleet). Use this variable in the image title attributes (both return and outbound rows) to reduce duplication and improve readability; also reformat the PHP docblock. --- .../views/ingame/fleetevents/eventrow.blade.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/resources/views/ingame/fleetevents/eventrow.blade.php b/resources/views/ingame/fleetevents/eventrow.blade.php index db8629317..af4c05092 100644 --- a/resources/views/ingame/fleetevents/eventrow.blade.php +++ b/resources/views/ingame/fleetevents/eventrow.blade.php @@ -1,4 +1,11 @@ -@php /** @var \OGame\ViewModels\FleetEventRowViewModel $fleet_event_row */ @endphp +@php +/** @var \OGame\ViewModels\FleetEventRowViewModel $fleet_event_row */ +$fleet_type_label = match($fleet_event_row->friendly_status) { + 'hostile' => __('t_ingame.fleet.enemy_fleet'), + 'neutral' => __('t_ingame.fleet.neutral_fleet'), + default => __('t_ingame.fleet.own_fleet'), +}; +@endphp @if ($fleet_event_row->is_return_trip) {{ date('H:i:s', $fleet_event_row->mission_time_arrival) }} Clock + title="{{ $fleet_type_label }} | {{ $fleet_event_row->mission_label }} (R)" alt=""/> @@ -136,7 +143,7 @@ {{ date('H:i:s', $fleet_event_row->mission_time_arrival) }} Clock + title="{{ $fleet_type_label }} | {{ $fleet_event_row->mission_label }}" alt=""/> From 6c1bc7f694c88036d915be40a3edebebb8fc6179 Mon Sep 17 00:00:00 2001 From: piciolo Date: Tue, 24 Mar 2026 14:44:56 +0100 Subject: [PATCH 3/5] Compute fleet type label inline in view Remove the standalone match-based $fleet_type_label assignment and instead compute the fleet type label inline in the img title attributes (handles hostile/neutral/own cases). Also compress the PHP docblock to a single line. This eliminates the extra variable and keeps the tooltip logic local to each title (applied for both return and outgoing fleet rows). --- .../views/ingame/fleetevents/eventrow.blade.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/resources/views/ingame/fleetevents/eventrow.blade.php b/resources/views/ingame/fleetevents/eventrow.blade.php index af4c05092..db8629317 100644 --- a/resources/views/ingame/fleetevents/eventrow.blade.php +++ b/resources/views/ingame/fleetevents/eventrow.blade.php @@ -1,11 +1,4 @@ -@php -/** @var \OGame\ViewModels\FleetEventRowViewModel $fleet_event_row */ -$fleet_type_label = match($fleet_event_row->friendly_status) { - 'hostile' => __('t_ingame.fleet.enemy_fleet'), - 'neutral' => __('t_ingame.fleet.neutral_fleet'), - default => __('t_ingame.fleet.own_fleet'), -}; -@endphp +@php /** @var \OGame\ViewModels\FleetEventRowViewModel $fleet_event_row */ @endphp @if ($fleet_event_row->is_return_trip) {{ date('H:i:s', $fleet_event_row->mission_time_arrival) }} Clock + title="{{ $fleet_event_row->friendly_status === 'hostile' ? __('t_ingame.fleet.enemy_fleet') : ($fleet_event_row->friendly_status === 'neutral' ? __('t_ingame.fleet.neutral_fleet') : __('t_ingame.fleet.own_fleet')) }} | {{ $fleet_event_row->mission_label }} (R)" alt=""/> @@ -143,7 +136,7 @@ {{ date('H:i:s', $fleet_event_row->mission_time_arrival) }} Clock + title="{{ $fleet_event_row->friendly_status === 'hostile' ? __('t_ingame.fleet.enemy_fleet') : ($fleet_event_row->friendly_status === 'neutral' ? __('t_ingame.fleet.neutral_fleet') : __('t_ingame.fleet.own_fleet')) }} | {{ $fleet_event_row->mission_label }}" alt=""/> From 85041790903d9769cb9ddf978af90bacf12350fa Mon Sep 17 00:00:00 2001 From: piciolo Date: Tue, 24 Mar 2026 14:48:41 +0100 Subject: [PATCH 4/5] Compute fleet type label inline in view Remove the standalone match-based $fleet_type_label assignment and instead compute the fleet type label inline in the img title attributes (handles hostile/neutral/own cases). Also compress the PHP docblock to a single line. This eliminates the extra variable and keeps the tooltip logic local to each title (applied for both return and outgoing fleet rows). --- .../views/ingame/fleetevents/eventrow.blade.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/resources/views/ingame/fleetevents/eventrow.blade.php b/resources/views/ingame/fleetevents/eventrow.blade.php index af4c05092..db8629317 100644 --- a/resources/views/ingame/fleetevents/eventrow.blade.php +++ b/resources/views/ingame/fleetevents/eventrow.blade.php @@ -1,11 +1,4 @@ -@php -/** @var \OGame\ViewModels\FleetEventRowViewModel $fleet_event_row */ -$fleet_type_label = match($fleet_event_row->friendly_status) { - 'hostile' => __('t_ingame.fleet.enemy_fleet'), - 'neutral' => __('t_ingame.fleet.neutral_fleet'), - default => __('t_ingame.fleet.own_fleet'), -}; -@endphp +@php /** @var \OGame\ViewModels\FleetEventRowViewModel $fleet_event_row */ @endphp @if ($fleet_event_row->is_return_trip) {{ date('H:i:s', $fleet_event_row->mission_time_arrival) }} Clock + title="{{ $fleet_event_row->friendly_status === 'hostile' ? __('t_ingame.fleet.enemy_fleet') : ($fleet_event_row->friendly_status === 'neutral' ? __('t_ingame.fleet.neutral_fleet') : __('t_ingame.fleet.own_fleet')) }} | {{ $fleet_event_row->mission_label }} (R)" alt=""/> @@ -143,7 +136,7 @@ {{ date('H:i:s', $fleet_event_row->mission_time_arrival) }} Clock + title="{{ $fleet_event_row->friendly_status === 'hostile' ? __('t_ingame.fleet.enemy_fleet') : ($fleet_event_row->friendly_status === 'neutral' ? __('t_ingame.fleet.neutral_fleet') : __('t_ingame.fleet.own_fleet')) }} | {{ $fleet_event_row->mission_label }}" alt=""/> From a70c2fd6695189df883c60fd1ebca74d3d3fb288 Mon Sep 17 00:00:00 2001 From: piciolo Date: Tue, 24 Mar 2026 18:57:55 +0100 Subject: [PATCH 5/5] Use t_ingame.fleet translations in event row Replace inline/legacy localization strings with centralized t_ingame.fleet keys in resources/views/ingame/fleetevents/eventrow.blade.php. Updates include Deep space, Fleet details tooltip, Ships, Shipment and resource labels (Metal, Crystal, Deuterium), and the Recall tooltip label. Also removes an extra trailing newline at EOF. --- .../ingame/fleetevents/eventrow.blade.php | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/resources/views/ingame/fleetevents/eventrow.blade.php b/resources/views/ingame/fleetevents/eventrow.blade.php index db8629317..a468dc59c 100644 --- a/resources/views/ingame/fleetevents/eventrow.blade.php +++ b/resources/views/ingame/fleetevents/eventrow.blade.php @@ -31,7 +31,7 @@
debris field @break @case (OGame\Models\Enums\PlanetType::DeepSpace) - {{ __('Deep space') }} + {{ __('t_ingame.fleet.deep_space') }} @break @endswitch @@ -48,11 +48,11 @@ debris field @break @case (OGame\Models\Enums\PlanetType::DeepSpace) - {{ __('Deep space') }} + {{ __('t_ingame.fleet.deep_space') }} @break @endswitch @@ -153,7 +153,7 @@
debris field @break @case (OGame\Models\Enums\PlanetType::DeepSpace) - {{ __('Deep space') }} + {{ __('t_ingame.fleet.deep_space') }} @break @endswitch @@ -170,11 +170,11 @@ debris field @break @case (OGame\Models\Enums\PlanetType::DeepSpace) - {{ __('Deep space') }} + {{ __('t_ingame.fleet.deep_space') }} @break @endswitch @@ -240,7 +240,7 @@ @if ($fleet_event_row->is_recallable) active_recall_time)->format('d.m.Y') }}
{{ \Carbon\Carbon::parse($fleet_event_row->active_recall_time)->format('H:i:s') }}">
@@ -281,5 +281,4 @@ }; wrappedCountdown(); })(jQuery); - - + \ No newline at end of file