Skip to content

Commit 7d840ca

Browse files
lsvNyholm
authored andcommitted
Removing empty messages in the total count in webui, gives a better progress (#170)
* Removing empty <target> in the total count, so it gives a better progress in the webui * Style fix
1 parent 396a441 commit 7d840ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Controller/WebUIController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ public function indexAction($configName = null)
5858
ksort($domains);
5959
$catalogueSize[$locale] = 0;
6060
foreach ($domains as $domain => $messages) {
61-
$count = count($messages);
61+
$count = count(array_filter($messages, function ($message) {
62+
return '' !== $message;
63+
}));
6264
$catalogueSize[$locale] += $count;
6365
if (!isset($maxDomainSize[$domain]) || $count > $maxDomainSize[$domain]) {
6466
$maxDomainSize[$domain] = $count;

0 commit comments

Comments
 (0)