* * See the enclosed file COPYING for license information (LGPL). If you * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html. */ define('HORDE_BASE', dirname(__FILE__) . '/..'); require_once HORDE_BASE . '/lib/base.php'; $i = 0; $handle = opendir('../po'); while ($file = readdir($handle)) { if (preg_match('/(.*)\.po$/', $file, $matches)) { $locale = $matches[1]; if (!isset($nls['languages'][$locale]) || $locale == 'en_GB') { continue; } $i++; $lines = file("../po/$file"); $fuzzy = 0; $untranslated = -1; $translated = 0; $obsolete = 0; foreach ($lines as $line) { if (strpos($line,'msgstr') === 0) { if (stristr($line, 'msgstr ""')) { $untranslated++; } else { $translated++; } } elseif (strpos($line,'#, fuzzy') === 0) { $fuzzy++; } elseif (strpos($line,'#~ ') === 0) { $obsolete++; } } $all = $translated + $fuzzy + $untranslated; $percent_done = round($translated / $all * 100, 2); $rpd = round($percent_done, 0); $report[$locale] = array($percent_done, $translated, $fuzzy, $untranslated); if ($rpd < 50) { $color = dechex(255 - $rpd * 2) . '0000'; } else { $color = '00' . dechex(55 + $rpd * 2) . '00'; } if (strlen($color) < 6) { $color = '0' . $color; } $report[$locale] = array($color, $percent_done, $translated, $fuzzy, $untranslated, $obsolete); } } closedir($handle); function my_usort_function($a, $b) { if ($a[1] > $b[1]) { return -1; } if ($a[1] < $b[1]) { return 1; } return 0; } uasort ($report, 'my_usort_function'); ?>

Localization Status Report for Horde

$value) { $i++; if ($i % 2 == 0) { $color = "#ffffff"; $nr = 1; } else { $color = "#CECECE"; $nr = 2; } echo "\n"; if (!is_null($last_key) && $report[$key][1] != $report[$last_key][1]) { $line++; echo "\n\t"; } else { echo "\n\t"; } echo "\n\t"; echo "\n\t"; echo "\n\t"; echo "\n\t"; echo "\n\t"; echo "\n\t"; echo "\n\t"; echo "\t"; $last_key = $key; } ?>
  Language Locale Status T
r
a
n
s
l
a
t
e
d
F
u
z
z
y
U
n
t
r
a
n
s
l
a
t
e
d
O
b
s
o
l
e
t
e
$line) " . $nls['languages'][$key] . "" . $key . "" . $value[1] . "% done" . $value[2] . "" . $value [3] . "" . $value[4] . "" . $value[5] . "