Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improve l10n in solved problems table #2063

Merged
merged 1 commit into from
Dec 16, 2022
Merged
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
8 changes: 6 additions & 2 deletions templates/user/user-problems.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ <h3 class="unselectable toggle closed">
{% for group in best_submissions %}
<div class="user-problem-group">
<h3 class="unselectable toggle closed"><span class="fa fa-chevron-right fa-fw"></span>
{{ group.name }} ({{ _('%(points).1f points', points=group.points) }})
{%- with points_str=group.points|floatformat(-3) -%}
{{ _('%(group)s (%(val)s points)', group=group.name, val=points_str) }}
{%- endwith -%}
</h3>
<table style="display: none" class="table toggled">
<thead>
Expand All @@ -109,7 +111,9 @@ <h3 class="unselectable toggle closed"><span class="fa fa-chevron-right fa-fw"><
</td>
<td class="problem-score">
<a href="{{ url('user_submissions', entry.code, user.user.username) }}">
{{ _('%(points)s / %(total)s', points=entry.points, total=entry.total) }}
{%- with points_str=entry.points|floatformat(-3), total_str=entry.total|floatformat(-3) -%}
{{ _('%(points)s / %(total)s', points=points_str, total=total_str) }}
{%- endwith -%}
</a>
</td>
</tr>
Expand Down