Add rounding

Change-Id: I94ba3470d58d377e6695928a76ae5436c0af8fd3
Signed-off-by: Denis Roy <denis.roy@eclipse-foundation.org>
diff --git a/classes/system/scoreboard.class.php b/classes/system/scoreboard.class.php
index fe79fb1..4af28bc 100644
--- a/classes/system/scoreboard.class.php
+++ b/classes/system/scoreboard.class.php
@@ -27,7 +27,7 @@
 
 			# rebuilding the scoreboard takes time ... dump stuff to tmp
 			mysqli_query($dbh, "CREATE TEMPORARY TABLE _tmp_scoreboard LIKE scoreboard");
-			$sql = "INSERT INTO _tmp_scoreboard SELECT NULL, 'LANGPR', IF(ISNULL(b.locale),b.name,CONCAT(b.name, CONCAT(' (', CONCAT(b.locale, ')')))) AS language,  COUNT(t.string_id) / COUNT(s.string_id)*100 as tr_pct FROM strings as s inner join languages as b  left join translations as t ON s.string_id = t.string_id AND t.is_active and t.language_id = b.language_id where s.created_on > (NOW() - INTERVAL 1 YEAR) and s.value <> '' and s.is_active = 1 group by b.language_id order by tr_pct desc limit 20";
+			$sql = "INSERT INTO _tmp_scoreboard SELECT NULL, 'LANGPR', IF(ISNULL(b.locale),b.name,CONCAT(b.name, CONCAT(' (', CONCAT(b.locale, ')')))) AS language,  ROUND(COUNT(t.string_id) / COUNT(s.string_id) * 100,1) as tr_pct FROM strings as s inner join languages as b  left join translations as t ON s.string_id = t.string_id AND t.is_active and t.language_id = b.language_id where s.created_on > (NOW() - INTERVAL 1 YEAR) and s.value <> '' and s.is_active = 1 group by b.language_id order by tr_pct desc limit 20";
 			mysqli_query($dbh, $sql);
 			$sql = "INSERT INTO _tmp_scoreboard SELECT NULL, 'TOPTR', CONCAT(first_name, IF(ISNULL(last_name),'',CONCAT(' ', last_name))) AS name, count(t.string_id) as cnt from translations as t inner join users as u on u.userid = t.userid where t.created_on > (NOW() - INTERVAL 1 YEAR) and t.value <> '' and t.is_active=1 group by first_name, last_name having name <> 'Babel Syncup' order by cnt desc limit 20";
 			mysqli_query($dbh, $sql);