aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
{