aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--_nav/langs/en.lang72
-rw-r--r--_nav/langs/sl.lang63
-rw-r--r--_nav/lib.php1
-rw-r--r--langs/lib.php3
-rw-r--r--langs/missing.php21
-rw-r--r--langs/report.php40
6 files changed, 170 insertions, 30 deletions
diff --git a/_nav/langs/en.lang b/_nav/langs/en.lang
new file mode 100644
index 000000000..286f196ac
--- /dev/null
+++ b/_nav/langs/en.lang
@@ -0,0 +1,72 @@
+# Generated manually on 2013-02-07T19:20:00+01:00
+# Domain _nav
+
+
+# /_nav/lib.php +65
+;Go to mageia.org site map.
+Go to mageia.org site map.
+
+
+# /_nav/lib.php +66
+;About us
+About us
+
+
+# /_nav/lib.php +66
+;Learn more about Mageia.
+Learn more about Mageia.
+
+
+# /_nav/lib.php +67
+;Downloads
+Downloads
+
+
+# /_nav/lib.php +67
+;Download Mageia ISO and updates.
+Download Mageia ISO and updates.
+
+
+# /_nav/lib.php +68
+;Support
+Support
+
+
+# /_nav/lib.php +68
+;Get support from Mageia community.
+Get support from Mageia community.
+
+
+# /_nav/lib.php +69
+;Community
+Community
+
+
+# /_nav/lib.php +70
+;Contribute
+Contribute
+
+
+# /_nav/lib.php +70
+;You too can build Mageia with us!
+You too can build Mageia with us!
+
+
+# /_nav/lib.php +71
+;You
+You
+
+
+# /_nav/lib.php +71
+;Your Mageia online account.
+Your Mageia online account.
+
+
+# /_nav/lib.php +72
+;Contact
+Contact
+
+
+# /_nav/lib.php +72
+;Contact Us
+Contact Us
diff --git a/_nav/langs/sl.lang b/_nav/langs/sl.lang
index c44cce2c3..0413b94ed 100644
--- a/_nav/langs/sl.lang
+++ b/_nav/langs/sl.lang
@@ -1,43 +1,72 @@
+# Generated manually on 2013-02-07T19:20:00+01:00
+# Domain _nav
+
+
+# /_nav/lib.php +65
+;Go to mageia.org site map.
+Oglejte si načrt spletišča mageia.org.
+
+
+# /_nav/lib.php +66
;About us
O nas
+
+# /_nav/lib.php +66
+;Learn more about Mageia.
+Preberite več o Mageji.
+
+
+# /_nav/lib.php +67
;Downloads
Prenosi
+
+# /_nav/lib.php +67
+;Download Mageia ISO and updates.
+Prenesite slike ISO in posodobitve.
+
+
+# /_nav/lib.php +68
;Support
Podpora
+
+# /_nav/lib.php +68
+;Get support from Mageia community.
+Poiščite podporo skupnosti Mageia.
+
+
+# /_nav/lib.php +69
;Community
Skupnost
+
+# /_nav/lib.php +70
;Contribute
Sodelujte
-;You
-Vi
-;Contact
-Kontakti
+# /_nav/lib.php +70
+;You too can build Mageia with us!
+Tudi vi nam lahko pomagate pri Mageji!
-;Go to mageia.org site map.
-Oglejte si načrt spletišča mageia.org.
-;Learn more about Mageia.
-Preberite več o Mageji.
+# /_nav/lib.php +71
+;You
+Vi
-;Download Mageia ISO and updates.
-Prenesite slike ISO in posodobitve.
-;Get support from Mageia community.
-Poiščite podporo skupnosti Mageia.
+# /_nav/lib.php +71
+;Your Mageia online account.
+Registracija in upravljanje vaše prijave.
-;
-;You too can build Mageia with us!
-Tudi vi nam lahko pomagate pri Mageji!
+# /_nav/lib.php +72
+;Contact
+Kontakti
-;Your Mageia online account.
-Registracija in upravljanje vaše prijave.
+# /_nav/lib.php +72
;Contact Us
Kontaktirajte nas
diff --git a/_nav/lib.php b/_nav/lib.php
index 8398f0755..52df1693c 100644
--- a/_nav/lib.php
+++ b/_nav/lib.php
@@ -179,6 +179,7 @@ P;
global $_t;
+ $_t[$s] = trim(str_replace(array('{ok}', '{OK}', '{Ok}', '{oK}'), '', $_t[$s]));
return array_key_exists($s, $_t) ? $_t[$s] : $s;
}
}
diff --git a/langs/lib.php b/langs/lib.php
index d4293c008..716404fd7 100644
--- a/langs/lib.php
+++ b/langs/lib.php
@@ -100,7 +100,8 @@ if ( ! function_exists('glob_recursive'))
function _lang_file_switch($s, $l)
{
- return $l . substr(str_replace('.en.lang', '.' . $l . '.lang', $s), 2);
+ $s = str_replace('en.lang', $l . '.lang', $s);
+ return str_replace('en/', $l . '/', $s);
}
function get_lang_references()
diff --git a/langs/missing.php b/langs/missing.php
index 72f22bc2c..387c84651 100644
--- a/langs/missing.php
+++ b/langs/missing.php
@@ -12,6 +12,17 @@ if (is_null($s)) {
include 'lib.php';
+if ($s == '../_nav/langs/en.lang') {
+ $file = substr(_lang_file_switch($s, $l), 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="http://svnweb.mageia.org/web/www/trunk/_nav/langs/">web/www/trunk/_nav/langs/</a>' . $file . ' and for now to the <a href="http://svnweb.mageia.org/web/nav/langs/">web/nav/langs/</a>' . $file . ' too';
+ $iframe = 'http://www.mageia.org/_nav/langs/en.lang';
+} else {
+ $file = _lang_file_switch($s, $l);
+ $note = '';
+ $commit = '<a href="http://svnweb.mageia.org/web/www/trunk/langs/">web/www/trunk/langs</a>/' . $file;
+ $iframe = 'http://www.mageia.org/langs/'.$s;
+}
?><!DOCTYPE html>
<html lang="en">
@@ -23,14 +34,14 @@ include 'lib.php';
<p><a href="report.php">&laquo; back to the report page</a></p>
-<p>So, <code><?php echo $s ?></code> language file is missing in <?php echo $langs[$l], ' (<code>', $l, '</code>)' ?>. What can you do to help us?</p>
+<p>So, <code><?php echo $file ?></code> language file is missing in <?php echo $langs[$l], ' (<code>', $l, '</code>)' ?>. What can you do to help us?</p>
<ol>
- <li>Copy the source file from the frame below in a text editor and rename it <code><?php echo _lang_file_switch($s, $l)?></code>.</li>
+ <li>Copy the source file from the frame below in a text editor and rename it <code><?php echo $file?></code>.<?php echo $note ?></li>
<li>Replace and translate the strings that are just after the lines starting with a ";". Be careful to always keep your translated text on a single line.</li>
<li>Then:
<ul>
- <li>if you have a SVN account, you may commit it directly in <code><?php echo '<a href="http://svnweb.mageia.org/web/www/trunk/langs/">web/www/trunk/langs</a>/' . _lang_file_switch($s, $l)?></code>;</li>
+ <li>if you have a SVN account, you may commit it directly in <code><?php echo $commit ?></code>;</li>
<li>or attach it to a mail to Mageia i18n team (<code>mageia-i18n</code>, <a href="irc://irc.freenode.net/#mageia-i18n">#mageia-i18n</a> on Freenode).</li>
</ul>
</li>
@@ -38,7 +49,7 @@ include 'lib.php';
</ol>
<p>Thanks!</p>
-<iframe src="http://www.mageia.org/langs/<?php echo $s ?>" style="width: 60em; height: 30em;"></iframe>
+<iframe src="<?php echo $iframe ?>" style="width: 60em; height: 30em;"></iframe>
<hr>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/langs/report.php b/langs/report.php
index 22e2da617..e24602a55 100644
--- a/langs/report.php
+++ b/langs/report.php
@@ -33,7 +33,7 @@
<header id="mgnavt">
<h1><a href="//www.mageia.org/">www.mageia.org</a> translation report</h1>
<ul>
- <li><a href="https://wiki.mageia.org/en/Internationalisation_Team_(i18n)#Website_translation">i18n Web Wiki</a> (<a href="https://wiki.mageia.org/en/Internationalisation_Team_%28i18n%29#Special_cases_of_web_pages">Special cases for some web pages like downloads/get, constitution</a>)</li>
+ <li><a href="https://wiki.mageia.org/en/Internationalisation_Team_(i18n)#Website_translation">i18n Web Wiki</a> Special cases for navigation and some web pages like (<a href="https://wiki.mageia.org/en/Internationalisation_Team_%28i18n%29#Special_cases_of_web_pages">downloads/get, constitution</a>)</li>
</ul>
</header>
<div id="page">
@@ -44,6 +44,8 @@
define('APP_ROOT', realpath(__DIR__ . '/..'));
$enFiles = get_lang_references();
+ // added navigation file
+ array_unshift($enFiles, '../_nav/langs/en.lang');
$otherLangs = get_other_langs();
$enStringsCount = array();
@@ -58,8 +60,8 @@
foreach ($otherLangs as $l) {
$stats['en']['files'] += 1;
- $stats[$l]['files'] = 0;
- $stats[$l]['strings'] = 0;
+ $stats[$l]['files'] = 0;
+ $stats[$l]['strings'] = 0;
$s = sprintf('<tr><th>%s<br><span style="font-weight: normal; font-size: smaller;">%s</span></th>',
$langs[$l], $l);
@@ -69,13 +71,29 @@
foreach ($enFiles as $f) {
$enStringsCount[$f] = 0;
+ if ($f == '../_nav/langs/en.lang') {
+ $nav = true;
+ } else {
+ $nav = false;
+ }
+
$langF = str_replace('.en.lang', '.' . $l . '.lang', $f);
- $langF = $l . substr($langF, 2);
+ if ($nav) {
+ $langF = '../_nav/langs/' . $l . '.lang';
+ } else {
+ $langF = $l . substr($langF, 2);
+ }
$link = str_replace(array('en/', '.en.lang', 'index'), '', $f);
- $dest_l = sprintf('%s/%s/%s/%s', APP_ROOT, $l, $link, 'index.php');
- $dest_en = sprintf('%s/%s/%s/%s', APP_ROOT, 'en', $link, 'index.php');
+ if ($nav) {
+ $dest_en = sprintf('%s/%s/%s', APP_ROOT, '_nav/langs', 'en.lang');
+ $dest_l = sprintf('%s/%s/%s', APP_ROOT, '_nav/langs', $l . '.lang');
+ } else {
+ $dest_en = sprintf('%s/%s/%s/%s', APP_ROOT, 'en', $link, 'index.php');
+ $dest_l = sprintf('%s/%s/%s/%s', APP_ROOT, $l, $link, 'index.php');
+ }
+
// if symlink e.g. does directly translated page exist?
- if ((realpath($dest_l) == realpath($dest_en))) {
+ if ((realpath($dest_l) == realpath($dest_en)) || $nav) {
$page_not_linked = '';
$old_page = '';
} else {
@@ -103,6 +121,14 @@
if ($link == 'downloads/get') {
$link = sprintf('<a href="//www.mageia.org/%s/%s/?q=Mageia-2-dual-CD.iso&amp;d=1" class="action viewpage">view download OK page</a><span style="font-size: 3px; display: block;">&nbsp;</span><a href="//www.mageia.org/%s/%s/?q=Non_existing_file&amp;d=1" class="action viewpage">view non existing file page</a>', $l, $link, $l, $link);
+ } else if ($nav) {
+ $local_f = @file_get_contents('../_nav/langs/' . $l . '.lang');
+ $mognas_f = @file_get_contents('http://nav.mageia.org/langs/' . $l . '.lang');
+ if ($local_f != $mognas_f) {
+ $link = '<br> difference in svn <a href="http://svnweb.mageia.org/web/www/trunk/_nav/langs/">1</a> and <a href="http://svnweb.mageia.org/web/nav/langs/">2</a>';
+ } else {
+ $link = '';
+ }
} else {
$link = sprintf('<a href="//www.mageia.org/%s/%s" class="action viewpage">view page</a>%s', $l, $link, $page_not_linked);
}