aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--langs/diff.php4
-rw-r--r--langs/lib.php5
-rw-r--r--langs/report.php2
3 files changed, 8 insertions, 3 deletions
diff --git a/langs/diff.php b/langs/diff.php
index cbbbc9486..70ff102c6 100644
--- a/langs/diff.php
+++ b/langs/diff.php
@@ -45,7 +45,7 @@ if($resource =='about/license') {
$license = false;
}
-if ($source_file == '../_nav/langs/en.lang') {
+if (false !== strstr($source_file, '../_nav/langs/en.')) {
$file = substr($target_file, 14);
$note = '<span style="color: red; font-weight: bold"> NOTE: THIS IS TRANSLATION OF NAVIGATION SO LOCATION FOR COMMIT IS DIFFERENT!</span>';
$commit = '<a href="//svnweb.mageia.org/web/www/trunk/_nav/langs/' . $file . '?view=markup">web/www/trunk/_nav/langs/' . $file . '</a> and for now to the <a href="//svnweb.mageia.org/web/nav/langs/' . $file . '?view=markup">web/nav/langs/' . $file . '</a> too';
@@ -59,7 +59,7 @@ $source_file_path = realpath($source_file);
$target_file_path = realpath($target_file);
if (false === strstr($source_file_path, '/langs/') ||
- false == strstr($target_file_path, '/langs/')) {
+ false === strstr($target_file_path, '/langs/')) {
die('no sorry');
}
diff --git a/langs/lib.php b/langs/lib.php
index cfc40cf28..054a4743e 100644
--- a/langs/lib.php
+++ b/langs/lib.php
@@ -166,6 +166,8 @@ if ( ! function_exists('glob_recursive'))
/**
* Create 'sl/about/license.sl.lang'
* from 'en/about/license.en.lang'
+ * or ../_nav/langs/sl.lang
+ * from ../_nav/langs/en.lang
*
* @param string $s file name with path
* @param string $l locale name
@@ -181,6 +183,8 @@ function _lang_file_switch($s, $l)
/**
* Create 'sl/about/license.po'
* from 'en/about/license.pot'
+ * or ../_nav/langs/sl.po
+ * from ../_nav/langs/en.pot
*
* @param string $s file name with path
* @param string $l locale name
@@ -192,6 +196,7 @@ function _po_file_switch($s, $l)
if($l != 'en') {
$s = str_replace('.pot', '.po', $s);
}
+ $s = str_replace('/en.', '/' . $l . '.', $s);
return str_replace('en/', $l . '/', $s);
}
diff --git a/langs/report.php b/langs/report.php
index 118b0883c..cd127e583 100644
--- a/langs/report.php
+++ b/langs/report.php
@@ -101,7 +101,7 @@
$langF = _lang_file_switch($f, $l);
}
$enStringsCount[$f] = 0;
- if ($f == '../_nav/langs/en.lang') {
+ if (false !== strstr($f, '../_nav/langs/en.')) {
$nav = true;
$langF = '../_nav/langs/' . $l . '.lang';
} else {