Skip to content

Commit

Permalink
Improve l10n in solved problems table
Browse files Browse the repository at this point in the history
  • Loading branch information
int-y1 committed Dec 16, 2022
1 parent 721033f commit 8e40d86
Showing 1 changed file with 6 additions and 2 deletions.
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

0 comments on commit 8e40d86

Please # to comment.