aboutsummaryrefslogtreecommitdiffstats
path: root/langs/lib.php
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-08-17 20:48:45 +0000
committerRomain d'Alverny <rda@mageia.org>2012-08-17 20:48:45 +0000
commit018d585031a6dd384e596500553d973161770a7e (patch)
tree2f50c9aa1a56f682fff21b31069779e4e3a1845d /langs/lib.php
parentae2993f3fe3bddfada89157eeed2a2161c641578 (diff)
downloadwww-018d585031a6dd384e596500553d973161770a7e.tar
www-018d585031a6dd384e596500553d973161770a7e.tar.gz
www-018d585031a6dd384e596500553d973161770a7e.tar.bz2
www-018d585031a6dd384e596500553d973161770a7e.tar.xz
www-018d585031a6dd384e596500553d973161770a7e.zip
new function
Diffstat (limited to 'langs/lib.php')
-rw-r--r--langs/lib.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/langs/lib.php b/langs/lib.php
index 71b25f1c7..d4293c008 100644
--- a/langs/lib.php
+++ b/langs/lib.php
@@ -47,14 +47,28 @@ function _lang_diff($a, $b)
}
return array(
- 'a' => count($fa),
- 'b' => count($fb),
+ 'a_name' => $a,
+ 'b_name' => $b,
+ 'a' => count($fa),
+ 'b' => count($fb),
'missing' => $missing,
'notrans' => $notrans,
'extra' => $extra
);
}
+function _lang_diff_stats($a, $b)
+{
+ $diff = _lang_diff($a, $b);
+
+ $diff['missing'] = count($diff['missing']);
+ $diff['notrans'] = count($diff['notrans']);
+ $diff['extra'] = count($diff['extra']);
+ $diff['ok'] = (($diff['b'] - $diff['a']) == 0) ? true : false;
+ $diff['correct'] = $diff['b'] - $diff['notrans'] - $diff['missing'];
+
+ return $diff;
+}
if ( ! function_exists('glob_recursive'))
{