diff options
author | Filip Komar <filip@mageia.org> | 2013-02-14 20:14:33 +0000 |
---|---|---|
committer | Filip Komar <filip@mageia.org> | 2013-02-14 20:14:33 +0000 |
commit | 70901bd81fac710fb2d0d949791357b685c25df4 (patch) | |
tree | 22f859f63204725a30240142f9b77657cacbcfbb | |
parent | e925baf3c56a85cf0480ab0fa8a87b76ece646d7 (diff) | |
download | www-70901bd81fac710fb2d0d949791357b685c25df4.tar www-70901bd81fac710fb2d0d949791357b685c25df4.tar.gz www-70901bd81fac710fb2d0d949791357b685c25df4.tar.bz2 www-70901bd81fac710fb2d0d949791357b685c25df4.tar.xz www-70901bd81fac710fb2d0d949791357b685c25df4.zip |
small accuracy sorting improvement of lang report page
-rw-r--r-- | langs/report.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/langs/report.php b/langs/report.php index 7ee0676b4..69c050849 100644 --- a/langs/report.php +++ b/langs/report.php @@ -196,11 +196,10 @@ } $s .= $cols; $s .= '</tr>' . PHP_EOL; - $languages[$progress . '-' . $l] = $s; + $languages[$stats[$l]['strings'] . '-' . $l] = $s; } $en_language = array_shift($languages); // shift English for proper sorting krsort($languages, SORT_NUMERIC); - array_unshift($languages, $en_language); // unshift English back $enFiles = array_map(function ($e) { return str_replace('en/', '', $e); }, $enFiles); $thfiles = '<th>' . implode('</th><th>', $enFiles) . '</th>' . PHP_EOL; @@ -208,8 +207,9 @@ $chunks = array_chunk($languages, 8); $table_body = array(); foreach ($chunks as $chunk) { - $table_body = array_merge($table_body, $chunk, array(count($chunk) >= 4 ? '<tr><th> </th><th>File</th>' . $thfiles : '')); + $table_body = array_merge($table_body, $chunk, array(count($chunk) > 4 ? '<tr><th> </th><th>File</th>' . $thfiles : '')); } + array_unshift($languages, $en_language); // unshift English back $s = implode($table_body); echo <<<S |