-
Notifications
You must be signed in to change notification settings - Fork 116
Fleet events always shown as own fleet in tooltip #1314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
piciolo
wants to merge
6
commits into
lanedirt:main
from
piciolo:Fleet-events-always-shown-as-Own-Fleet-in-tooltip-#1216
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5aaf042
Localize fleet status in event rows
piciolo 37bae8d
Precompute fleet type label for tooltips
piciolo 6c1bc7f
Compute fleet type label inline in view
piciolo 8504179
Compute fleet type label inline in view
piciolo fd945fa
Merge branch 'Fleet-events-always-shown-as-Own-Fleet-in-tooltip-#1216…
piciolo a70c2fd
Use t_ingame.fleet translations in event row
piciolo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ | |
| <td class="arrivalTime">{{ date('H:i:s', $fleet_event_row->mission_time_arrival) }} Clock</td> | ||
| <td class="missionFleet"> | ||
| <img src="/img/fleet/{{ $fleet_event_row->mission_type }}.gif" class="tooltipHTML" | ||
| title="Own fleet | {{ $fleet_event_row->mission_label }} (R)" alt=""/> | ||
| 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=""/> | ||
| </td> | ||
|
|
||
| <td class="originFleet"> | ||
|
|
@@ -31,7 +31,7 @@ | |
| <figure class="planetIcon tf js_hideTipOnMobile" title="Debris Field"></figure>debris field | ||
| @break | ||
| @case (OGame\Models\Enums\PlanetType::DeepSpace) | ||
| <span class="deep-space-text">{{ __('Deep space') }}</span> | ||
| <span class="deep-space-text">{{ __('t_ingame.fleet.deep_space') }}</span> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not belong in this PR. |
||
| @break | ||
| @endswitch | ||
| </td> | ||
|
|
@@ -48,11 +48,11 @@ | |
| <td class="icon_movement_reserve"> | ||
| <span class="tooltip tooltipRight tooltipClose" | ||
| title="<div class="htmlTooltip"> | ||
| <h1>@lang('Fleet details'):</h1> | ||
| <h1>{{ __('t_ingame.fleet.fleet_details') }}:</h1> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This also doesn't belong in this PR, as well as the other 20+ changes, which belong in #1297. |
||
| <div class="splitLine"></div> | ||
| <table cellpadding="0" cellspacing="0" class="fleetinfo"> | ||
| <tr> | ||
| <th colspan="3">@lang('Ships'):</th> | ||
| <th colspan="3">{{ __('t_ingame.fleet.ships') }}:</th> | ||
| </tr> | ||
| @php /** @var \OGame\GameObjects\Models\Units\UnitCollection $fleet_unit */ @endphp | ||
| @foreach ($fleet_event_row->fleet_units->units as $fleet_unit) | ||
|
|
@@ -67,20 +67,20 @@ | |
| </tr> | ||
|
|
||
| <tr> | ||
| <th colspan="3">@lang('Shipment'):</th> | ||
| <th colspan="3">{{ __('t_ingame.fleet.shipment') }}:</th> | ||
| </tr> | ||
|
|
||
| <tr> | ||
| <td colspan="2">@lang('Metal'):</td> | ||
| <td colspan="2">{{ __('t_ingame.fleet.metal') }}:</td> | ||
| <td class="value">{{ $fleet_event_row->resources->metal->getFormattedLong() }}</td> | ||
| </tr> | ||
|
|
||
| <tr> | ||
| <td colspan="2">@lang('Crystal'):</td> | ||
| <td colspan="2">{{ __('t_ingame.fleet.crystal') }}:</td> | ||
| <td class="value">{{ $fleet_event_row->resources->crystal->getFormattedLong() }}</td> | ||
| </tr> | ||
| <tr> | ||
| <td colspan="2">@lang('Deuterium'):</td> | ||
| <td colspan="2">{{ __('t_ingame.fleet.deuterium') }}:</td> | ||
| <td class="value">{{ $fleet_event_row->resources->deuterium->getFormattedLong() }}</td> | ||
| </tr> | ||
| </table> | ||
|
|
@@ -104,7 +104,7 @@ | |
| <figure class="planetIcon tf js_hideTipOnMobile" title="Debris Field"></figure>debris field | ||
| @break | ||
| @case (OGame\Models\Enums\PlanetType::DeepSpace) | ||
| <span class="deep-space-text">{{ __('Deep space') }}</span> | ||
| <span class="deep-space-text">{{ __('t_ingame.fleet.deep_space') }}</span> | ||
| @break | ||
| @endswitch | ||
| </td> | ||
|
|
@@ -136,7 +136,7 @@ | |
| <td class="arrivalTime">{{ date('H:i:s', $fleet_event_row->mission_time_arrival) }} Clock</td> | ||
| <td class="missionFleet"> | ||
| <img src="/img/fleet/{{ $fleet_event_row->mission_type }}.gif" class="tooltipHTML" | ||
| title="Own fleet | {{ $fleet_event_row->mission_label }}" alt=""/> | ||
| 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=""/> | ||
| </td> | ||
|
|
||
| <td class="originFleet"> | ||
|
|
@@ -153,7 +153,7 @@ | |
| <figure class="planetIcon tf js_hideTipOnMobile" title="Debris Field"></figure>debris field | ||
| @break | ||
| @case (OGame\Models\Enums\PlanetType::DeepSpace) | ||
| <span class="deep-space-text">{{ __('Deep space') }}</span> | ||
| <span class="deep-space-text">{{ __('t_ingame.fleet.deep_space') }}</span> | ||
| @break | ||
| @endswitch | ||
| </td> | ||
|
|
@@ -170,11 +170,11 @@ | |
| <td class="icon_movement"> | ||
| <span class="tooltip tooltipRight tooltipClose" | ||
| title="<div class="htmlTooltip"> | ||
| <h1>@lang('Fleet details'):</h1> | ||
| <h1>{{ __('t_ingame.fleet.fleet_details') }}:</h1> | ||
| <div class="splitLine"></div> | ||
| <table cellpadding="0" cellspacing="0" class="fleetinfo"> | ||
| <tr> | ||
| <th colspan="3">@lang('Ships'):</th> | ||
| <th colspan="3">{{ __('t_ingame.fleet.ships') }}:</th> | ||
| </tr> | ||
| @php /** @var \OGame\GameObjects\Models\Units\UnitCollection $fleet_unit */ @endphp | ||
| @foreach ($fleet_event_row->fleet_units->units as $fleet_unit) | ||
|
|
@@ -189,20 +189,20 @@ | |
| </tr> | ||
|
|
||
| <tr> | ||
| <th colspan="3">@lang('Shipment'):</th> | ||
| <th colspan="3">{{ __('t_ingame.fleet.shipment') }}:</th> | ||
| </tr> | ||
|
|
||
| <tr> | ||
| <td colspan="2">@lang('Metal'):</td> | ||
| <td colspan="2">{{ __('t_ingame.fleet.metal') }}:</td> | ||
| <td class="value">{{ $fleet_event_row->resources->metal->getFormattedLong() }}</td> | ||
| </tr> | ||
|
|
||
| <tr> | ||
| <td colspan="2">@lang('Crystal'):</td> | ||
| <td colspan="2">{{ __('t_ingame.fleet.crystal') }}:</td> | ||
| <td class="value">{{ $fleet_event_row->resources->crystal->getFormattedLong() }}</td> | ||
| </tr> | ||
| <tr> | ||
| <td colspan="2">@lang('Deuterium'):</td> | ||
| <td colspan="2">{{ __('t_ingame.fleet.deuterium') }}:</td> | ||
| <td class="value">{{ $fleet_event_row->resources->deuterium->getFormattedLong() }}</td> | ||
| </tr> | ||
| </table> | ||
|
|
@@ -226,7 +226,7 @@ | |
| <figure class="planetIcon tf js_hideTipOnMobile" title="Debris Field"></figure>debris field | ||
| @break | ||
| @case (OGame\Models\Enums\PlanetType::DeepSpace) | ||
| <span class="deep-space-text">{{ __('Deep space') }}</span> | ||
| <span class="deep-space-text">{{ __('t_ingame.fleet.deep_space') }}</span> | ||
| @break | ||
| @endswitch | ||
| </td> | ||
|
|
@@ -240,7 +240,7 @@ | |
| @if ($fleet_event_row->is_recallable) | ||
| <span class="reversal reversal_time" ref="{{ $fleet_event_row->id }}"> | ||
| <a class="icon_link tooltipHTML recallFleet" data-fleet-id="{{ $fleet_event_row->real_mission_id }}" | ||
| title="Recall:| {{ \Carbon\Carbon::parse($fleet_event_row->active_recall_time)->format('d.m.Y') }}<br> | ||
| title="{{ __('t_ingame.fleet.recall') }}:| {{ \Carbon\Carbon::parse($fleet_event_row->active_recall_time)->format('d.m.Y') }}<br> | ||
| {{ \Carbon\Carbon::parse($fleet_event_row->active_recall_time)->format('H:i:s') }}"> | ||
| <img src="/img/icons/89624964d4b06356842188dba05b1b.gif" height="16" width="16"/> | ||
| </a> | ||
|
|
@@ -281,5 +281,4 @@ | |
| }; | ||
| wrappedCountdown(); | ||
| })(jQuery); | ||
| </script> | ||
|
|
||
| </script> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is one instance missing, namely that of friendly fleets, which should display
Friendly fleet. This only happens in the case of ACS Defend.