aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-03-24 14:00:03 +0000
committerplegall <plg@piwigo.org>2010-03-24 14:00:03 +0000
commiteca1b87551e52a7b54592def549310f17171dd87 (patch)
tree29fbcae0a6f96e438eb7fd84980b038698f843e4
parentf9ac2a28469102d2fe21f2fe610078a018b598ed (diff)
improvement: clean output for lost language keys
git-svn-id: http://piwigo.org/svn/trunk@5309 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--tools/translation_analysis.php19
1 files changed, 16 insertions, 3 deletions
diff --git a/tools/translation_analysis.php b/tools/translation_analysis.php
index f4cfd1f3a..eab896cc8 100644
--- a/tools/translation_analysis.php
+++ b/tools/translation_analysis.php
@@ -63,6 +63,7 @@ foreach ($languages as $language)
// strings not "really" translated?
$output_duplicated = '';
+ $output_lost = '';
foreach (array_keys($metalang[$language][$file]) as $key)
{
$exceptions = array('Level 0');
@@ -77,10 +78,17 @@ foreach ($languages as $language)
}
$local_value = $metalang[$language][$file][$key];
- $ref_value = $metalang[ $page['ref_default_values'] ][$file][$key];
- if ($local_value == $ref_value)
+ if (!isset($metalang[ $page['ref_default_values'] ][$file][$key]))
{
- $output_duplicated.= get_line_to_translate($file, $key);
+ $output_lost.= '#'.$key.'# does not exist in the reference language'."\n";
+ }
+ else
+ {
+ $ref_value = $metalang[ $page['ref_default_values'] ][$file][$key];
+ if ($local_value == $ref_value)
+ {
+ $output_duplicated.= get_line_to_translate($file, $key);
+ }
}
}
@@ -98,6 +106,11 @@ foreach ($languages as $language)
echo '<h3>'.$file.'.lang.php</h3>';
echo '<textarea style="width:100%;height:150px;">'.$output.'</textarea>';
}
+
+ if ('' != $output_lost)
+ {
+ echo '<pre>'.$output_lost.'</pre>';
+ }
}
else
{