aboutsummaryrefslogtreecommitdiffstats
path: root/langs
diff options
context:
space:
mode:
Diffstat (limited to 'langs')
-rw-r--r--langs/report.php20
1 files changed, 15 insertions, 5 deletions
diff --git a/langs/report.php b/langs/report.php
index bb94e0466..6f8fcbb8a 100644
--- a/langs/report.php
+++ b/langs/report.php
@@ -37,13 +37,18 @@
<?php
/**
*/
+ $one_language = isset($_GET['l']) ? strip_tags(trim($_GET['l'])) : null;
include 'lib.php';
define('APP_ROOT', realpath(__DIR__ . '/..'));
$enFiles = get_lang_references();
// added navigation file
array_unshift($enFiles, '../_nav/langs/en.lang');
- $otherLangs = get_other_langs();
+ if (isset($one_language) && $one_language != 'all') {
+ $otherLangs = array('en', $one_language);
+ } else {
+ $otherLangs = get_other_langs();
+ }
$enStringsCount = array();
$report = array();
@@ -60,8 +65,13 @@
$stats['en']['files'] += 1;
$stats[$l]['files'] = 0;
$stats[$l]['strings'] = 0;
+ if ($l == 'en') {
+ $link_one_language = '%s';
+ } else {
+ $link_one_language = '<a href="?l=' . $l . '" title="see this language only">%s</a>';
+ }
- $s = sprintf('<tr><th>%s<br><span style="font-weight: normal; font-size: smaller;">%s</span></th>',
+ $s = sprintf('<tr><th>' . $link_one_language . '<br><span style="font-weight: normal; font-size: smaller;">%s</span></th>',
$langs[$l], $l);
$cols = '';
@@ -218,9 +228,9 @@
$num_of_col++;
if ($num_of_col % $num_clmns_to_repeat == 0 && $num_of_col <= count($enFiles) - ($num_clmns_to_repeat / 3)) {
if ($l == 'en') {
- $cols .= $lang_coloumn = '<td style="font-weight: bold;">Language</td>';
+ $cols .= $lang_coloumn = '<td style="font-weight: bold;"><a href="?l=all" title="see all languages">Language</a></td>';
} else {
- $cols .= $lang_coloumn = sprintf('<td style="font-weight: bold; vertical-align: top;">%s<br><span style="font-weight: normal; font-size: smaller;">%s</span></td>', $langs[$l], $l);
+ $cols .= $lang_coloumn = sprintf('<td style="font-weight: bold; vertical-align: top;">' . $link_one_language . '<br><span style="font-weight: normal; font-size: smaller;">%s</span></td>', $langs[$l], $l);
}
}
}
@@ -273,7 +283,7 @@
echo <<<S
<table border="1">
<thead><tr>
- <th>{$count} languages</th>
+ <th><a href="?l=all" title="see all languages">{$count} languages</a></th>
<th>Progress</th>
{$thfiles}
</tr></thead>