Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions WheelWizard/Resources/Languages/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ de:
time_online: "Zeit online"
message: "Nachricht"
is_online: "Ist Online"
vr_history: "R-Punkte Verlauf"
start_vr: "R-Punkte zu Beginn"
end_vr: "R-Punkte am Ende"
net_change: "Nettoveränderung"
mii:
gender_male: "Weiblich"
gender: "Geschlecht"
Expand Down Expand Up @@ -61,6 +65,8 @@ de:
status: "Status"
priority: "Priorität"
sort_by: "Sortieren nach"
match: "Match"
enable_matches: "Matches"
total_games_won: "Gesamte verlorene Rennen"
total_games_played: "Gesamte gewonnene Rennen"
vr_abbreviation: "RP"
Expand Down Expand Up @@ -205,6 +211,9 @@ de:
no_miis: "Die Mii-Daten können nicht von deinem System aus geladen werden. Stelle sicher dass du dein Spiel mind. 1 Mal neu startest."
no_mod_selected_title: "Keine Mod ausgewähltt."
no_mod_selected: "Wähle eine Mod aus der Liste um mehr Details zu sehen."
no_vr_history_title: "Kein R-Punkte Verlauf"
no_vr_history: "Ein Freundescode wird benötigt, um den R-Punkte Verlauf zu laden."
no_vr_history_range: "Noch kein R-Punkte Verlauf für diese Zeitspanne."
time:
days:
1: "1 Tag"
Expand All @@ -218,6 +227,13 @@ de:
seconds:
1: "1 Sekunde"
n: "{$1} Sekunden"
last_24_hours: "Letzte 24 Stunden"
last_7_days: "Letzte 7 Tage"
last_30_days: "Letzte 30 Tage"
last_60_days: "Letzte 60 Tage"
lifetime: "Insgesamt"
lifetime_history: "Gesamter Verlauf"
past_n_days_with_range: "Vergangene {$1} Tage ({$2} bis {$3})"
progress:
estimated_time_remaining: "Geschätzte verbleibende Zeit:"
downloading_mb: "Herunterladen mit {$1} MB"
Expand Down Expand Up @@ -385,6 +401,7 @@ de:
mod_download_fail:
title: "Mod Download ist schiefgelaufen."
extra: "Ein Fehler ist während dem Dowload aufgetreten."
failed_vr_history: "Konnte R-Punkte Verlauf nicht laden."
message_success:
settings_saved:
title: "Einstellungen erfolgreich gespeichert!"
Expand Down
17 changes: 17 additions & 0 deletions WheelWizard/Resources/Languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ en:
time_online: "Time Online"
message: "Message"
is_online: "Is Online"
vr_history: "VR History"
start_vr: "Start VR"
end_vr: "End VR"
net_change: "Net Change"
mii:
gender_male: "Male"
gender: "Gender"
Expand Down Expand Up @@ -64,6 +68,8 @@ en:
status: "Status"
priority: "Priority"
sort_by: "Sort by"
match: "Match"
enable_matches: "Matches"
total_games_won: "Total games won"
total_games_played: "Total games played"
vr_abbreviation: "VR"
Expand Down Expand Up @@ -219,6 +225,9 @@ en:
no_miis: "We can't read the Mii data from your system. Make sure you started the game at least once"
no_mod_selected_title: "No mod selected"
no_mod_selected: "Select a mod in the list to view its details"
no_vr_history_title: "No VR history"
no_vr_history: "Friend code is required to load VR history."
no_vr_history_range: "No VR history found for this range yet."
time:
days:
1: "1 day"
Expand All @@ -232,6 +241,13 @@ en:
seconds:
1: "1 second"
n: "{$1} seconds"
last_24_hours: "Last 24 hours"
last_7_days: "Last 7 days"
last_30_days: "Last 30 days"
last_60_days: "Last 60 days"
lifetime: "Lifetime"
lifetime_history: "Lifetime history"
past_n_days_with_range: "Past {$1} days ({$2} to {$3})"
progress:
estimated_time_remaining: "Estimated time remaining:"
downloading_mb: "downloading {$1} MB"
Expand Down Expand Up @@ -444,6 +460,7 @@ en:
mod_download_fail:
title: "Mod download failed."
extra: "An error occurred during download: {$1}"
failed_vr_history: "Failed to load VR history"
message_success:
settings_saved:
title: "Settings saved successfully!"
Expand Down
15 changes: 8 additions & 7 deletions WheelWizard/Views/Patterns/VrHistoryGraph.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:behaviorComp="clr-namespace:WheelWizard.Views.Patterns"
xmlns:components="clr-namespace:WheelWizard.Views.Components"
xmlns:loc="clr-namespace:WheelWizard.Localization"
mc:Ignorable="d"
d:DesignWidth="560"
d:DesignHeight="390"
Expand All @@ -27,21 +28,21 @@
Margin="0,0,0,8">
<Border Grid.Column="0" Classes="profileStatCard" Margin="0,0,4,0">
<StackPanel Spacing="1">
<components:FormFieldLabel Text="Start VR" />
<components:FormFieldLabel Text="{loc:T attribute.start_vr}" />
<SelectableTextBlock Classes="BodyText" Text="{Binding StartingVr, StringFormat='{}{0:N0}'}" />
</StackPanel>
</Border>

<Border Grid.Column="1" Classes="profileStatCard" Margin="4,0,4,0">
<StackPanel Spacing="1">
<components:FormFieldLabel Text="End VR" />
<components:FormFieldLabel Text="{loc:T attribute.end_vr}" />
<SelectableTextBlock Classes="BodyText" Text="{Binding EndingVr, StringFormat='{}{0:N0}'}" />
</StackPanel>
</Border>

<Border Grid.Column="2" Classes="profileStatCard" Margin="4,0,0,0">
<StackPanel Spacing="1">
<components:FormFieldLabel Text="Net Change" />
<components:FormFieldLabel Text="{loc:T attribute.net_change}" />
<SelectableTextBlock Classes="BodyText"
Foreground="{StaticResource Primary400}"
IsVisible="{Binding IsTotalChangeGain}"
Expand All @@ -61,15 +62,15 @@
ColumnDefinitions="*,Auto"
Margin="0,0,0,8">
<StackPanel Grid.Column="0">
<components:FormFieldLabel Text="VR History" />
<components:FormFieldLabel Text="{loc:T attribute.vr_history}" />
<TextBlock Classes="TinyText" FontSize="11" Text="{Binding DateRangeText}" />
</StackPanel>

<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="10" VerticalAlignment="Center">
<components:LoadingIcon Margin="3,3,6,3" VerticalAlignment="Center" IsVisible="{Binding IsLoading}" Width="18" Height="18" Foreground="{StaticResource Neutral500}" />

<CheckBox Classes="Switch"
Content="Matches"
Content="{loc:T attribute.enable_matches}"
IsChecked="{Binding UseMatchesAsXAxis}"
FontSize="12"
VerticalAlignment="Center"/>
Expand Down Expand Up @@ -135,14 +136,14 @@
</Border>

<components:EmptyPageInfo IsVisible="{Binding HasError}"
Title="No VR history"
Title="{loc:T empty_content.no_vr_history_title}"
IconData="{StaticResource Chart}"
BodyText="{Binding ErrorMessage}"
VerticalAlignment="Center"
HorizontalAlignment="Center" />

<components:EmptyPageInfo IsVisible="{Binding ShowNoDataState}"
Title="No VR history"
Title="{loc:T empty_content.no_vr_history_title}"
IconData="{StaticResource Chart}"
BodyText="{Binding EmptyStateText}"
VerticalAlignment="Center"
Expand Down
25 changes: 13 additions & 12 deletions WheelWizard/Views/Patterns/VrHistoryGraph.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,11 @@ private void PopulateHistoryDaysDropdown()
{
_isInitializingDaysDropdown = true;
HistoryDaysDropdown.Items.Clear();
HistoryDaysDropdown.Items.Add(new HistoryDaysOption(1, "Last 24 hours"));
HistoryDaysDropdown.Items.Add(new HistoryDaysOption(7, "Last 7 days"));
HistoryDaysDropdown.Items.Add(new HistoryDaysOption(30, "Last 30 days"));
HistoryDaysDropdown.Items.Add(new HistoryDaysOption(60, "Last 60 days"));
HistoryDaysDropdown.Items.Add(new HistoryDaysOption(999, "Lifetime")); // i think this option could make sense
HistoryDaysDropdown.Items.Add(new HistoryDaysOption(1, t("time.last_24_hours")));
HistoryDaysDropdown.Items.Add(new HistoryDaysOption(7, t("time.last_7_days")));
HistoryDaysDropdown.Items.Add(new HistoryDaysOption(30, t("time.last_30_days")));
HistoryDaysDropdown.Items.Add(new HistoryDaysOption(60, t("time.last_60_days")));
HistoryDaysDropdown.Items.Add(new HistoryDaysOption(999, t("time.lifetime"))); // i think this option could make sense

foreach (var item in HistoryDaysDropdown.Items.OfType<HistoryDaysOption>())
{
Expand Down Expand Up @@ -365,7 +365,7 @@ await Dispatcher.UIThread.InvokeAsync(() =>
{
HasData = false;
ResetGraph();
ErrorMessage = result.Error?.Message ?? "Failed to load VR history";
ErrorMessage = result.Error?.Message ?? t("message_error.failed_vr_history");
}

IsLoading = false;
Expand All @@ -377,7 +377,7 @@ private void SetNoFriendCodeState()
IsLoading = false;
ErrorMessage = string.Empty;
HasData = false;
EmptyStateText = "Friend code is required to load VR history.";
EmptyStateText = t("empty_content.no_vr_history");
DateRangeText = string.Empty;
StartingVr = 0;
EndingVr = 0;
Expand All @@ -391,7 +391,7 @@ private void SetNoFriendCodeState()
private void ApplyHistoryData(RwfcPlayerVrHistoryResponse historyResponse, int days)
{
_lastHistoryResponse = historyResponse;
EmptyStateText = "No VR history found for this range yet.";
EmptyStateText = t("empty_content.no_vr_history_range");
StartingVr = historyResponse.StartingVr;
EndingVr = historyResponse.EndingVr;
TotalChange = historyResponse.TotalVrChange;
Expand All @@ -407,7 +407,7 @@ private void ApplyHistoryData(RwfcPlayerVrHistoryResponse historyResponse, int d
string dateFormat = (historyResponse.FromDate.Year != historyResponse.ToDate.Year) ? "MMM d, yyyy" : "MMM d"; // to consider if you want to show the year if it goes over
var fromDate = historyResponse.FromDate.ToLocalTime().ToString(dateFormat);
var toDate = historyResponse.ToDate.ToLocalTime().ToString("MMM d"); // also if you wanna only show the year from the old date since the current one is always now
DateRangeText = days == lifetimeDays ? $"Lifetime history" : $"Past {days} days ({fromDate} to {toDate})";
DateRangeText = days == lifetimeDays ? t("time.lifetime_history") : t("time.past_n_days_with_range", days, fromDate, toDate);
// also suggestion to add a vr peak

if (orderedByDate.Count == 0)
Expand All @@ -430,9 +430,10 @@ private void ApplyHistoryData(RwfcPlayerVrHistoryResponse historyResponse, int d

if (UseMatchesAsXAxis)
{
GraphStartLabel = "Match 1";
GraphMidLabel = $"Match {(orderedByDate.Count / 2) + 1}";
GraphEndLabel = $"Match {orderedByDate.Count}";
var match = t("attribute.match");
GraphStartLabel = $"{match} 1";
GraphMidLabel = $"{match} {(orderedByDate.Count / 2) + 1}";
GraphEndLabel = $"{match} {orderedByDate.Count}";
}
else
{
Expand Down