Skip to content
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 app/models/server/evolution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ def best_localization_for(language)
localization_for(language) || original_localization
end

def days_left
(released_at - Date.current).to_i
end

def to_s
original_localization.to_s
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ Server::Evolution.planned.each do |evolution|
</div>
<div class="osuny_evolution__date">
<div class="osuny_evolution__date__big">
<%= l evolution.released_at, format: "%d·%m" %>
<%= t('evolutions.countdown', days: evolution.days_left) %>
</div>
<div class="osuny_evolution__date__long">
<%= t('evolutions.release') %>
<%= l evolution.released_at, format: :full %>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ en:
pending: Pending
export: Export (xlsx)
evolutions:
countdown: T-%{days}
listen: Listen on
release: Release date
false: No
file_hint_with_formats: "%{formats} files only. %{filesize} max."
file_hint_without_formats: "%{filesize} max"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,9 @@ fr:
finished_with_errors: Traité avec des erreurs
pending: En cours de traitement
evolutions:
countdown: J-%{days}
listen: Écouter sur
release: Sortie le
export: Exporter (xlsx)
false: Non
file_hint_with_formats: "Fichiers %{formats} uniquement. %{filesize} max."
Expand Down
Loading