aboutsummaryrefslogtreecommitdiffstats
path: root/langs/lib.php
diff options
context:
space:
mode:
authorFilip Komar <filip@mageia.org>2013-08-10 14:55:24 +0000
committerFilip Komar <filip@mageia.org>2013-08-10 14:55:24 +0000
commit4e92fedb5a6314351b255ae19d64227339b95274 (patch)
treec4524a4585359adb8d24ac416a6ecab0470aa402 /langs/lib.php
parentfc6c1393fde5eba8d2491d3510e3bd4ecea69cd3 (diff)
downloadwww-4e92fedb5a6314351b255ae19d64227339b95274.tar
www-4e92fedb5a6314351b255ae19d64227339b95274.tar.gz
www-4e92fedb5a6314351b255ae19d64227339b95274.tar.bz2
www-4e92fedb5a6314351b255ae19d64227339b95274.tar.xz
www-4e92fedb5a6314351b255ae19d64227339b95274.zip
report page extended to show duplicate strings in lang files
Diffstat (limited to 'langs/lib.php')
-rw-r--r--langs/lib.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/langs/lib.php b/langs/lib.php
index db1fc21f5..091883292 100644
--- a/langs/lib.php
+++ b/langs/lib.php
@@ -21,13 +21,14 @@ include '../langs.inc.php';
function _lang_diff($a, $b)
{
$fa = i18n::_lang_return($a);
- $fb = i18n::_lang_return($b);
+ $fb = i18n::_lang_return($b, true); // option to return duplicates
+ $duplicates = (isset($fb['duplicates']) ? array_pop($fb) : null);
- $ret = array(
+/* $ret = array(
'aCount' => count($fa),
'bCount' => count($fb),
'diff' => count($fa) - count($fb),
- );
+ ); unused var */
$missing = array();
$notrans = array();
@@ -53,7 +54,8 @@ function _lang_diff($a, $b)
'b' => count($fb),
'missing' => $missing,
'notrans' => $notrans,
- 'extra' => $extra
+ 'extra' => $extra,
+ 'dup_str' => $duplicates,
);
}