Update translation

This commit is contained in:
cuom1999 2021-12-27 15:22:48 +07:00
parent 3d731914c4
commit 120335ee1c
6 changed files with 139 additions and 174 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.end_time|as_countdown) -}}
{% trans countdown=contest.end_time|as_countdown %}Spectating, contest ends in {{countdown}}.{% endtrans %}
{% elif request.participation.end_time %}
{{- _('Participating virtually, %(countdown)s remaining.', countdown=request.participation.end_time|as_countdown) -}}
{% trans countdown=request.participation.end_time|as_countdown %}Participating virtually, {{countdown}} remaining.{% endtrans %}
{% else %}
{{- _('Participating virtually.') -}}
{% endif %}
{%- else -%}
{% if contest.start_time > now %}
{{- _('Starting in %(countdown)s', countdown=contest.start_time|as_countdown) -}}
{% trans countdown=contest.start_time|as_countdown %}Starting in {{countdown}}.{% endtrans %}
{% 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.end_time|as_countdown) -}}
{% trans countdown=contest.end_time|as_countdown %}Your time is up! Contest ends in {{countdown}}.{% endtrans %}
{% else %}
{{- _('You have %(countdown)s remaining.', countdown=live_participation.end_time|as_countdown) -}}
{% trans countdown=live_participation.end_time|as_countdown %}You have {{countdown}} remaining.{% endtrans %}
{% endif %}
{%- else -%}
{{ _('Contest ends in %(countdown)s.', countdown=contest.end_time|as_countdown) }}
{% trans countdown=contest.end_time|as_countdown %}Contest ends in {{countdown}}.{% endtrans %}
{%- endif -%}
{% endif %}
{%- endif -%}

View file

@ -177,9 +177,9 @@
{% endif %}
<br>
{% if contest.time_limit %}
{{ _('%(time_limit)s window', time_limit=contest.time_limit|timedelta('localized-no-seconds')) }}
{% trans time_limit=contest.time_limit|timedelta('localized-no-seconds') %}{{ time_limit }} window{% endtrans %}
{% else %}
{{ _('%(duration)s long', duration=contest.contest_window_length|timedelta('localized-no-seconds')) }}
{% trans duration=contest.contest_window_length|timedelta('localized-no-seconds') %}{{ duration }} long{% endtrans %}
{% endif %}
</div>
{% endmacro %}
@ -250,9 +250,11 @@
{% if contest.start_time %}
<br>
{% if contest.time_limit %}
<span class="time">{{ _('Window ends in %(countdown)s', countdown=participation.end_time|as_countdown)}}
<span class="time">
{% trans countdown=participation.end_time|as_countdown %}Window ends in {{countdown}}{% endtrans %}
</span>
{% elif contest.time_before_end %}
<span class="time">{{ _('Ends in %(countdown)s', countdown=contest.end_time|as_countdown) }}</span>
<span class="time">{% trans countdown=contest.end_time|as_countdown %}Ends in {{countdown}}{% endtrans %}</span>
{% endif %}
{{ time_left(contest) }}
{% endif %}
@ -301,7 +303,7 @@
{% if contest.start_time %}
<br>
{% if contest.time_before_end %}
<span class="time">{{ _('Ends in %(countdown)s', countdown=contest.end_time|as_countdown) }}</span>
<span class="time">{% trans countdown=contest.end_time|as_countdown %}Ends in {{countdown}}{% endtrans %}</span>
{% endif %}
{{ time_left(contest) }}
{% endif %}