Skip to content

Commit

Permalink
Add back translations for total stats
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 68f79cd commit 5ac4df2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
6 changes: 5 additions & 1 deletion translations/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@
"Total up": "Total up",
"Username (email)": "Username (email)",
"Welcome!": "Welcome!",
"Workouts": "Workouts"
"Workouts": "Workouts",
"distance": "distance",
"duration": "duration",
"up": "up",
"workouts ": "workouts "
}
6 changes: 5 additions & 1 deletion translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@
"Total up": "Totaal omhoog",
"Username (email)": "Gebruikersnaam (e-mailadres)",
"Welcome!": "Welkom!",
"Workouts": "Workouts"
"Workouts": "Workouts",
"distance": "afstand",
"duration": "duur",
"up": "omhoog",
"workouts ": "workouts "
}
14 changes: 7 additions & 7 deletions views/partials/stats_records_totals.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{{ define "stats_records_total" }}
<div class="md:flex md:flex-wrap">
{{ template "statistic_tile" (BuildDecoratedAttribute "workout" ( i18n
"workouts" ) .Workouts) }} {{ template "statistic_tile"
(BuildDecoratedAttribute "distance" ( i18n "distance" ) (.Distance |
ToKilometer )) }} {{ template "statistic_tile" (BuildDecoratedAttribute "up" (
i18n "up" ) (.Up | HumanDistance)) }} {{ template "statistic_tile"
(BuildDecoratedAttribute "duration" ( i18n "duration" ) (.Duration |
HumanDuration)) }}
{{ $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 |
ToKilometer )) }} {{ template "statistic_tile" (BuildDecoratedAttribute "up"
$u (.Up | HumanDistance)) }} {{ template "statistic_tile"
(BuildDecoratedAttribute "duration" $du (.Duration | HumanDuration)) }}
</div>
{{ end }}

0 comments on commit 5ac4df2

Please sign in to comment.