Skip to content

Commit

Permalink
Translate statistics page
Browse files Browse the repository at this point in the history
Signed-off-by: Jo Vandeginste <[email protected]>
  • Loading branch information
jovandeginste committed Feb 22, 2024
1 parent dc58183 commit 95f05c9
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
6 changes: 4 additions & 2 deletions translations/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"Create a new account": "Create a new account",
"Dashboard": "Dashboard",
"Dashboard for %s": "Dashboard for %s",
"Distance": "Distance",
"Duration": "Duration",
"Logout": "Logout",
"Manage": "Manage",
"Max speed": "Max speed",
Expand All @@ -22,8 +24,8 @@
"Username (email)": "Username (email)",
"Welcome!": "Welcome!",
"Workouts": "Workouts",
"Your progress the past year": "Your progress the past year",
"distance": "distance",
"duration": "duration",
"up": "up",
"workouts ": "workouts "
"up": "up"
}
6 changes: 4 additions & 2 deletions translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"Create a new account": "Maak een nieuwe account",
"Dashboard": "Dashboard",
"Dashboard for %s": "Dashboard voor %s",
"Distance": "Afstand",
"Duration": "Duur",
"Logout": "Afmelden",
"Manage": "Beheer",
"Max speed": "Maximale snelheid",
Expand All @@ -22,8 +24,8 @@
"Username (email)": "Gebruikersnaam (e-mailadres)",
"Welcome!": "Welkom!",
"Workouts": "Workouts",
"Your progress the past year": "Jouw vooruitgang afgelopen jaar",
"distance": "afstand",
"duration": "duur",
"up": "omhoog",
"workouts ": "workouts "
"up": "omhoog"
}
2 changes: 1 addition & 1 deletion views/partials/stats_records_totals.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ define "stats_records_total" }}
<div class="md:flex md:flex-wrap">
{{ $di := i18n "distance" }} {{ $w := i18n "workouts "}} {{ $u := i18n "up" }}
{{ $di := i18n "distance" }} {{ $w := i18n "workouts"}} {{ $u := i18n "up" }}
{{ $du := i18n "duration" }} {{ template "statistic_tile"
(BuildDecoratedAttribute "workout" $w .Workouts) }} {{ template
"statistic_tile" (BuildDecoratedAttribute "distance" $di (.Distance |
Expand Down
18 changes: 11 additions & 7 deletions views/user/user_statistics.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,45 @@
<body>
{{ template "header" . }}
<div class="content">
<h2 class="{{ IconFor `statistics` }}">Your progress the past year</h2>
<h2 class="{{ IconFor `statistics` }}">
{{ i18n "Your progress the past year" }}
</h2>
<div class="md:flex md:flex-wrap [&>*]:md:basis-1/2 [&>*]:lg:basis-1/3">
<div>
<div class="inner-form">
<h3 class="{{ IconFor `workout` }}">Workouts</h3>
<h3 class="{{ IconFor `workout` }}">{{ i18n "Workouts" }}</h3>
<canvas id="workouts-per-month"></canvas>
</div>
</div>
<div>
<div class="inner-form">
<h3 class="{{ IconFor `duration` }}">Duration</h3>
<h3 class="{{ IconFor `duration` }}">{{ i18n "Duration" }}</h3>
<canvas id="duration-per-month"></canvas>
</div>
</div>
<div>
<div class="inner-form">
<h3 class="{{ IconFor `distance` }}">Distance</h3>
<h3 class="{{ IconFor `distance` }}">{{ i18n "Distance" }}</h3>
<canvas id="distance-per-month"></canvas>
</div>
</div>
<div>
<div class="inner-form">
<h3 class="{{ IconFor `speed` }}">Average speed</h3>
<h3 class="{{ IconFor `speed` }}">{{ i18n "Average speed" }}</h3>
<canvas id="average-speed-per-month"></canvas>
</div>
</div>
<div>
<div class="inner-form">
<h3 class="{{ IconFor `speed` }}">Average speed (no pause)</h3>
<h3 class="{{ IconFor `speed` }}">
{{ i18n "Average speed (no pause)" }}
</h3>
<canvas id="average-speed-no-pause-per-month"></canvas>
</div>
</div>
<div>
<div class="inner-form">
<h3 class="{{ IconFor `max-speed` }}">Max speed</h3>
<h3 class="{{ IconFor `max-speed` }}">{{ i18n "Max speed" }}</h3>
<canvas id="max-speed-per-month"></canvas>
</div>
</div>
Expand Down

0 comments on commit 95f05c9

Please sign in to comment.