www.mageia.org translation report

', count($otherLangs), ' languages.

'; $enStringsCount = array(); $report = array(); $stats = array(); $diff_link = ''; $s = ''; foreach ($enFiles as $f) { if (is_dir($f)) continue; $stats['en']['files'] += 1; $s .= sprintf('%s', $f, $f); foreach ($otherLangs as $l) { $langF = str_replace('.en.lang', '.' . $l . '.lang', $f); $langF = $l . substr($langF, 2); if (file_exists($langF)) { $stats[$l]['files'] += 1; $test = _lang_diff($f, $langF); if (count($test['missing']) === 0 && count($test['notrans']) === 0) { $extra = null; if (count($test['extra']) > 0) { $extra = ' ' . sprintf($diff_link, $f, $l) . '(+' . count($test['extra']) . ')'; } $s .= sprintf('OK%s', $langF, $extra); } else { // special case, en if ($l == 'en') { $s .= '' . count($test['notrans']) . ' strings'; $enStringsCount[$f] += $test['a']; // regular case } else { $s .= sprintf('' . $diff_link, $f, $l); if (count($test['missing']) > 0) { $s .= count($test['missing']) . ' missing
'; } if (count($test['notrans']) > 0) { $s .= count($test['notrans']) . ' untranslated'; } $s .= ''; } } $stats[$l]['strings'] += $test['b']; } else { $stats[$l]['files'] += 0; $stats[$l]['strings'] += 0; $s .= sprintf('add', $f, $l ); } } $s .= ''; } $th = ''; $th2 = ''; array_shift($otherLangs); foreach ($otherLangs as $l) { $th .= '' . $langs[$l] . ''; $th2 .= '' . $l . ''; } $ths = ''; foreach ($stats as $l => $data) { if ($l == 'en') continue; $ths .= '' . $data['files'] . ' / ' . $data['strings'] . '
' . round($data['strings'] / $stats['en']['strings'] * 100). '%'; } echo << English {$th} {$th2} Reference {$stats['en']['files']} files {$stats['en']['strings']} strings {$ths} {$s}
S; ?>