aboutsummaryrefslogtreecommitdiffstats
path: root/langs/report_test.php
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2014-07-18 20:45:55 +0200
committerfilip <filip.komar@gmail.com>2014-07-18 20:45:55 +0200
commit78d942fea3a8b93e2f5e740037492d4ae0a8e6c5 (patch)
treeea1f866c8b4df76f2b0e419787ce811ed419736f /langs/report_test.php
parent314895bdafb86f46831ea8e76d5345c23461fcc9 (diff)
downloadwww-78d942fea3a8b93e2f5e740037492d4ae0a8e6c5.tar
www-78d942fea3a8b93e2f5e740037492d4ae0a8e6c5.tar.gz
www-78d942fea3a8b93e2f5e740037492d4ae0a8e6c5.tar.bz2
www-78d942fea3a8b93e2f5e740037492d4ae0a8e6c5.tar.xz
www-78d942fea3a8b93e2f5e740037492d4ae0a8e6c5.zip
removal of obsolete lang stuff
Diffstat (limited to 'langs/report_test.php')
-rw-r--r--langs/report_test.php58
1 files changed, 10 insertions, 48 deletions
diff --git a/langs/report_test.php b/langs/report_test.php
index 85fed269f..b07186410 100644
--- a/langs/report_test.php
+++ b/langs/report_test.php
@@ -77,7 +77,7 @@
$enFiles = array($one_resource);
$restore_resources = TRUE;
} else {
- $enFiles = array_merge(array('../_nav/langs/en.pot'), get_lang_references('*.lang'), get_lang_references('*.pot')); // added navigation file
+ $enFiles = array_merge(array('../_nav/langs/en.pot'), get_lang_references('*.pot')); // added navigation file
sort($enFiles);
}
$num_of_enFiles = count($enFiles);
@@ -115,15 +115,8 @@
foreach ($enFiles as $f) {
- if (strrpos($f, '.pot')) {
- $gettext = true;
- $resource = _extract_resource($f);
- $langF = _po_file_switch($f, $l);
- } else {
- $gettext = false;
- $resource = _extract_resource($f, '.en.lang');
- $langF = _lang_file_switch($f, $l);
- }
+ $resource = _extract_resource($f);
+ $langF = _po_file_switch($f, $l);
$enStringsCount[$f] = 0;
if (false !== strstr($f, '../_nav/langs/en.')) {
$nav = true;
@@ -160,20 +153,10 @@
$times[] = time_debug('file_exists');
$stats[$l]['files'] += 1;
-
- if ($gettext) {
- $test = _po_diff($l, $resource);
- $num_of_missing_strings = 0;
- $num_of_fuzzy_or_missing_strings = count($test['fuzzy_or_missing']);
- } else {
- $test = _lang_diff($f, $langF);
- $num_of_missing_strings = count($test['missing']);
- $num_of_fuzzy_or_missing_strings = 0;
- }
+ $test = _po_diff($l, $resource);
+ $num_of_fuzzy_or_missing_strings = count($test['fuzzy_or_missing']);
$times[] = time_debug('_diff ' . $l . ' '. $f);
$num_of_untranslated_strings = count($test['notrans']);
- $num_of_duplicated_strings = count($test['dup_str']);
- $num_of_extra_strings = count($test['extra']);
if ($link == 'about/constitution') {
$constitution_results = aproximate_number_of_untranslated_constitution_lines(G_APP_ROOT, $l, $unique_lines_in_eng_constitution);
@@ -240,21 +223,10 @@
}
$link .= $page_not_linked . '</div>';
- if ($num_of_missing_strings === 0
- && $num_of_fuzzy_or_missing_strings === 0
+ if ($num_of_fuzzy_or_missing_strings === 0
&& $num_of_untranslated_strings === 0) {
-
- $extra = null;
- if ($num_of_extra_strings > 0) {
- $extra = ' <span class="small">' . sprintf($diff_link, $f, $l) . '+' . $num_of_extra_strings . '</a></span>';
- }
- if ($num_of_duplicated_strings > 0) {
- $extra .= ' <span class="small">' . sprintf($diff_link, $f, $l) . 'dup: ' . $num_of_duplicated_strings . '</a></span>';
- }
-
- $cols .= sprintf('<td class="ok"><a href="%s" title="get a copy of the file">OK</a>%s%s</td>',
- $langF, $extra, $link);
-
+ $cols .= sprintf('<td class="ok"><a href="%s" title="get a copy of the file">OK</a>%s</td>',
+ $langF, $link);
$done = $test['a'];
} else {
// special case, en
@@ -266,31 +238,21 @@
// regular case
} else {
- if(($num_of_missing_strings + $num_of_fuzzy_or_missing_strings + $num_of_untranslated_strings) < $test['a']) {
+ if(($num_of_fuzzy_or_missing_strings + $num_of_untranslated_strings) < $test['a']) {
$cols .= sprintf('<td class="strings">' . $diff_link, $f, $l);
- if ($num_of_missing_strings > 0) {
- $cols .= $num_of_missing_strings . '&nbsp;missing<br>';
- }
if ($num_of_fuzzy_or_missing_strings > 0) {
$cols .= $num_of_fuzzy_or_missing_strings . '&nbsp;fuzzy or missing<br>';
}
if ($num_of_untranslated_strings > 0) {
$cols .= $num_of_untranslated_strings . '&nbsp;untranslated<br>';
}
- if ($num_of_extra_strings > 0) {
- $cols .= $num_of_extra_strings . '&nbsp;extra<br>';
- }
- if ($num_of_duplicated_strings > 0) {
- $cols .= $num_of_duplicated_strings . '&nbsp;duplicate';
- $cols .= ($num_of_duplicated_strings > 1 ? 's' : '');
- }
$cols .= '</a>';
$cols .= $link . '</td>';
} else {
$cols .= $add_translation;
}
- $done = $test['a'] - $num_of_untranslated_strings - $num_of_missing_strings - $num_of_fuzzy_or_missing_strings;
+ $done = $test['a'] - $num_of_untranslated_strings - $num_of_fuzzy_or_missing_strings;
}
}
$stats[$l]['strings'] += $done;