Skip to content

Commit 8884fed

Browse files
lsvNyholm
authored andcommitted
Division by zero and corrected the progress calculation (#171)
1 parent 7d840ca commit 8884fed

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Resources/views/WebUI/index.html.twig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
<h3>{{ localeMap[cataloge.locale] }}</h3>
1010
<table class="domain-table">
1111
{% for domain,messages in cataloge.all %}
12-
{% set pg = (100*messages|length/maxDomainSize[domain])|round %}
12+
{% set pg = maxDomainSize[domain] %}
13+
{% if pg > 0 %}
14+
{% set pg = (pg/messages|length)|round(2)*100 %}
15+
{% endif %}
1316
<tr>
1417
<td>
1518
<a href="{{ path("translation_show", {configName: configName, domain:domain, locale:cataloge.locale}) }}">

0 commit comments

Comments
 (0)