Fix countdown back bug

This commit is contained in:
cuom1999 2021-12-10 16:36:55 -06:00
parent 16974ab3dc
commit fea5e46cda
7 changed files with 20 additions and 19 deletions

View file

@ -30,26 +30,26 @@
{{- contest.start_time|utc|date('Y-m-d\TH:i:s') }}" class="date">
{%- if contest.is_in_contest(request.user) and not request.participation.live -%}
{% if request.participation.spectate %}
{{- _('Spectating, contest ends in %(countdown)s.', countdown=contest.time_before_end|as_countdown) -}}
{{- _('Spectating, contest ends in %(countdown)s.', countdown=contest.end_time|as_countdown) -}}
{% elif request.participation.end_time %}
{{- _('Participating virtually, %(countdown)s remaining.', countdown=request.participation.time_remaining|as_countdown) -}}
{{- _('Participating virtually, %(countdown)s remaining.', countdown=request.participation.end_time|as_countdown) -}}
{% else %}
{{- _('Participating virtually.') -}}
{% endif %}
{%- else -%}
{% if contest.start_time > now %}
{{- _('Starting in %(countdown)s', countdown=contest.time_before_start|as_countdown) -}}
{{- _('Starting in %(countdown)s', countdown=contest.start_time|as_countdown) -}}
{% elif contest.end_time < now %}
{{- _('Contest is over.') -}}
{% else %}
{%- if has_joined -%}
{% if live_participation.ended %}
{{- _('Your time is up! Contest ends in %(countdown)s.', countdown=contest.time_before_end|as_countdown) -}}
{{- _('Your time is up! Contest ends in %(countdown)s.', countdown=contest.end_time|as_countdown) -}}
{% else %}
{{- _('You have %(countdown)s remaining.', countdown=live_participation.time_remaining|as_countdown) -}}
{{- _('You have %(countdown)s remaining.', countdown=live_participation.end_time|as_countdown) -}}
{% endif %}
{%- else -%}
{{ _('Contest ends in %(countdown)s.', countdown=contest.time_before_end|as_countdown) }}
{{ _('Contest ends in %(countdown)s.', countdown=contest.end_time|as_countdown) }}
{%- endif -%}
{% endif %}
{%- endif -%}