Skip to content
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

Add more ranges #201

Merged
merged 2 commits into from
Jul 30, 2024
Merged
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
4 changes: 4 additions & 0 deletions assets/output.css
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,10 @@ form {
text-align: right;
}
}
label {
padding-left: 0.5rem;
padding-right: 0.5rem;
}
}

.note {
Expand Down
5 changes: 4 additions & 1 deletion main.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@
tr {
@apply mb-2 gap-4;
label {
@apply text-right py-1 block;
@apply text-right block py-1;
}
}
label {
@apply px-2;
}
}

.note {
Expand Down
2 changes: 2 additions & 0 deletions pkg/app/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ func statisticSinceOptions() []string {
"6 months",
"1 year",
"2 year",
"5 year",
"10 year",
}
}

Expand Down
6 changes: 5 additions & 1 deletion translations/de.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"1 year": "1 year",
"10 year": "10 year",
"2 year": "2 year",
"5 year": "5 year",
"6 months": "6 months",
"7 days": "7 days",
"API key updated": "API-Schlüssel aktualisiert",
"Actions": "Aktionen",
"Active": "Aktiv",
Expand Down Expand Up @@ -60,6 +63,7 @@
"Notes": "Notizen",
"Other users": "Andere Benutzer",
"Password": "Passwort",
"Per": "Per",
"Preferred units": "Bevorzugte Einheiten",
"Profile updated": "Profil wurde aktualisiert",
"Recent activity": "Kürzliche Aktivität",
Expand All @@ -69,6 +73,7 @@
"Repetitions": "Wiederholungen",
"Show full date by default": "Standardmäßig das vollständige Datum anzeigen",
"Sign in": "Anmelden",
"Since": "Since",
"Source": "Quelle",
"Speed": "Geschwindigkeit",
"Statistics": "Statistik",
Expand Down Expand Up @@ -141,7 +146,6 @@
"up": "Höhenmeter",
"user": "Benutzer",
"walking": "Gehen",
"week": "week",
"weight lifting": "weight lifting",
"workout": "Training",
"workouts": "Trainings"
Expand Down
6 changes: 5 additions & 1 deletion translations/fr.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"1 year": "1 year",
"10 year": "10 year",
"2 year": "2 year",
"5 year": "5 year",
"6 months": "6 months",
"7 days": "7 days",
"API key updated": "Clé API mise à jour",
"Actions": "Actions",
"Active": "Actif",
Expand Down Expand Up @@ -60,6 +63,7 @@
"Notes": "Notes",
"Other users": "Autres utilisateurs",
"Password": "Mot de passe",
"Per": "Per",
"Preferred units": "Unités préférées",
"Profile updated": "Profil mis à jour",
"Recent activity": "Activité récente",
Expand All @@ -69,6 +73,7 @@
"Repetitions": "Repetitions",
"Show full date by default": "Afficher la date complète par défaut",
"Sign in": "Connexion",
"Since": "Since",
"Source": "Source",
"Speed": "Vitesse",
"Statistics": "Statistiques",
Expand Down Expand Up @@ -141,7 +146,6 @@
"up": "dénivelé positif",
"user": "utilisateur",
"walking": "marche",
"week": "week",
"weight lifting": "weight lifting",
"workout": "entraînement",
"workouts": "entraînements"
Expand Down
6 changes: 5 additions & 1 deletion translations/it.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"1 year": "1 year",
"10 year": "10 year",
"2 year": "2 year",
"5 year": "5 year",
"6 months": "6 months",
"7 days": "7 days",
"API key updated": "Chiave API aggiornata",
"Actions": "Azioni",
"Active": "Attivo",
Expand Down Expand Up @@ -60,6 +63,7 @@
"Notes": "Note",
"Other users": "Altri utenti",
"Password": "Password",
"Per": "Per",
"Preferred units": "Unità preferite",
"Profile updated": "Profilo aggiornato",
"Recent activity": "Attività recente",
Expand All @@ -69,6 +73,7 @@
"Repetitions": "Ripetizioni",
"Show full date by default": "Mostra data completa per default",
"Sign in": "Accedi",
"Since": "Since",
"Source": "Fonte",
"Speed": "Velocità",
"Statistics": "Statistiche",
Expand Down Expand Up @@ -141,7 +146,6 @@
"up": "Salita",
"user": "Utente",
"walking": "Camminata",
"week": "week",
"weight lifting": "weight lifting",
"workout": "Allenamento",
"workouts": "allenamenti"
Expand Down
6 changes: 5 additions & 1 deletion translations/messages.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"1 year": "1 year",
"10 year": "10 year",
"2 year": "2 year",
"5 year": "5 year",
"6 months": "6 months",
"7 days": "7 days",
"API key updated": "API key updated",
"Actions": "Actions",
"Active": "Active",
Expand Down Expand Up @@ -60,6 +63,7 @@
"Notes": "Notes",
"Other users": "Other users",
"Password": "Password",
"Per": "Per",
"Preferred units": "Preferred units",
"Profile updated": "Profile updated",
"Recent activity": "Recent activity",
Expand All @@ -69,6 +73,7 @@
"Repetitions": "Repetitions",
"Show full date by default": "Show full date by default",
"Sign in": "Sign in",
"Since": "Since",
"Source": "Source",
"Speed": "Speed",
"Statistics": "Statistics",
Expand Down Expand Up @@ -141,7 +146,6 @@
"up": "up",
"user": "user",
"walking": "walking",
"week": "week",
"weight lifting": "weight lifting",
"workout": "workout",
"workouts": "workouts"
Expand Down
6 changes: 5 additions & 1 deletion translations/nl.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"1 year": "1 jaar",
"10 year": "10 jaar",
"2 year": "2 jaar",
"5 year": "5 jaar",
"6 months": "6 maand",
"7 days": "7 dagen",
"API key updated": "API-sleutel bijgewerkt",
"Actions": "Acties",
"Active": "Actief",
Expand Down Expand Up @@ -60,6 +63,7 @@
"Notes": "Notities",
"Other users": "Andere gebruikers",
"Password": "Wachtwoord",
"Per": "Per",
"Preferred units": "Voorkeurseenheden",
"Profile updated": "Profiel bijgewerkt",
"Recent activity": "Recente activiteit",
Expand All @@ -69,6 +73,7 @@
"Repetitions": "Herhalingen",
"Show full date by default": "Toon volledige datum",
"Sign in": "Aanmelden",
"Since": "Sinds",
"Source": "Bron",
"Speed": "Snelheid",
"Statistics": "Statistieken",
Expand Down Expand Up @@ -141,7 +146,6 @@
"up": "omhoog",
"user": "gebruiker",
"walking": "wandelen",
"week": "week",
"weight lifting": "gewichtheffen",
"workout": "workout",
"workouts": "workouts"
Expand Down
6 changes: 5 additions & 1 deletion translations/no.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"1 year": "1 year",
"10 year": "10 year",
"2 year": "2 year",
"5 year": "5 year",
"6 months": "6 months",
"7 days": "7 days",
"API key updated": "API key updated",
"Actions": "Actions",
"Active": "Active",
Expand Down Expand Up @@ -60,6 +63,7 @@
"Notes": "Notes",
"Other users": "Other users",
"Password": "Password",
"Per": "Per",
"Preferred units": "Preferred units",
"Profile updated": "Profile updated",
"Recent activity": "Recent activity",
Expand All @@ -69,6 +73,7 @@
"Repetitions": "Repetitions",
"Show full date by default": "Show full date by default",
"Sign in": "Sign in",
"Since": "Since",
"Source": "Source",
"Speed": "Speed",
"Statistics": "Statistics",
Expand Down Expand Up @@ -141,7 +146,6 @@
"up": "up",
"user": "user",
"walking": "walking",
"week": "week",
"weight lifting": "weight lifting",
"workout": "workout",
"workouts": "workouts"
Expand Down
4 changes: 3 additions & 1 deletion views/partials/messages.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@
{{ i18n "weight lifting" }}

{{ i18n "day" }}
{{ i18n "week" }}
{{ i18n "7 days" }}
{{ i18n "month" }}
{{ i18n "6 months" }}
{{ i18n "1 year" }}
{{ i18n "2 year" }}
{{ i18n "5 year" }}
{{ i18n "10 year" }}
</pre>
4 changes: 3 additions & 1 deletion views/user/user_statistics.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
{{ template "header" . }} {{ $since := .since }} {{ $per := .per }}
<div class="content">
<form class="inner-form">
<label for="since">{{ i18n "Since" }}</label>
<select id="since" name="since">
{{ range statisticSinceOptions }}
<option value="{{ . }}" {{ SelectIf . $since }}>{{ i18n . }}</option>
{{ end }}
</select>
<select id="per" name="per">
<label for="per">{{ i18n "Per" }}</label
><select id="per" name="per">
{{ range statisticPerOptions }}
<option value="{{ . }}" {{ SelectIf . $per }}>{{ i18n . }}</option>
{{ end }}
Expand Down
Loading