Skip to content

Commit 4743562

Browse files
committed
Generalize updated_at locales and format timestamp
1 parent cea65e2 commit 4743562

File tree

6 files changed

+4
-4
lines changed

6 files changed

+4
-4
lines changed

app/views/exercise_collections/show.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ h1
55
= row(label: 'exercise_collection.name', value: @exercise_collection.name)
66
= row(label: 'exercise_collection.user', value: link_to_if(policy(@exercise_collection.user).show?, @exercise_collection.user.displayname, @exercise_collection.user)) unless @exercise_collection.user.nil?
77
= row(label: 'exercise_collection.use_anomaly_detection', value: @exercise_collection.use_anomaly_detection)
8-
= row(label: 'exercise_collection.updated_at', value: @exercise_collection.updated_at)
8+
= row(label: 'shared.updated_at', value: l(@exercise_collection.updated_at, format: :long))
99

1010
h4.mt-4 = ExerciseCollection.human_attribute_name('exercises')
1111
.table-responsive#exercise-list

app/views/exercise_collections/statistics.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
h1 = @exercise_collection
22

33
= row(label: 'exercise_collection.name', value: @exercise_collection.name)
4-
= row(label: 'exercise_collection.updated_at', value: @exercise_collection.updated_at)
4+
= row(label: 'shared.updated_at', value: l(@exercise_collection.updated_at, format: :long))
55
= row(label: 'exercise_collection.exercises', value: @exercise_collection.exercises.count)
66
= row(label: 'exercise_collection.users_and_programming_groups', value: Submission.from(@exercise_collection.exercises.joins(:submissions).group(:contributor_id, :contributor_type).select(:contributor_id, :contributor_type)).count)
77
= row(label: 'exercise_collection.solutions', value: Submission.from(@exercise_collection.exercises.joins(:submissions).group(:contributor_id, :contributor_type, :id).select(:contributor_id, :contributor_type)).count)

config/locales/de/exercise_collection.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ de:
88
name: Name
99
solutions: Gesamtanzahl Lösungsversuche
1010
submissions: Gesamtanzahl Abgaben
11-
updated_at: Letzte Änderung
1211
use_anomaly_detection: Abweichungen in der Arbeitszeit erkennen
1312
user: Verantwortliche:r
1413
users_and_programming_groups: Teilnehmende und Programmiergruppen

config/locales/de/meta/shared.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,6 @@ de:
5151
tooltips:
5252
shortcut: 'Tastaturkürzel: %{shortcut}'
5353
update: "%{model} aktualisieren"
54+
updated_at: Letzte Änderung
5455
upload_file: Datei hochladen
5556
websocket_failure: Leider ist ein Verbindungsproblem aufgetreten. <a href="https://websocketstest.com" target="_blank" rel="noopener noreferrer" class="alert-link">Bitte überprüfen Sie Websocket-Verbindungen mit diesem Tool</a> und versuchen Sie es erneut.

config/locales/en/exercise_collection.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ en:
88
name: Name
99
solutions: Solution Attempts (accumulated)
1010
submissions: Submissions (accumulated)
11-
updated_at: Last Update
1211
use_anomaly_detection: Enable Worktime Anomaly Detection
1312
user: Associated User
1413
users_and_programming_groups: Users and Programming Groups

config/locales/en/meta/shared.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,6 @@ en:
5151
tooltips:
5252
shortcut: 'Keyboard shortcut: %{shortcut}'
5353
update: Update %{model}
54+
updated_at: Last Update
5455
upload_file: Upload file
5556
websocket_failure: Sorry, a connection issue occurred. <a href="https://websocketstest.com" target="_blank" rel="noopener noreferrer" class="alert-link">Please check WebSocket connections with this tool</a> and try again.

0 commit comments

Comments
 (0)