aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-05-25 15:14:44 +0000
committerRomain d'Alverny <rda@mageia.org>2012-05-25 15:14:44 +0000
commitff76101d277661e90d1ab4fb7dbe1c4f7b958505 (patch)
tree075acd0357042e66fb662865522c67938d5bc9ff
parent18b7da1d4d7b7b6fec25646244ed427007378db0 (diff)
downloadwww-ff76101d277661e90d1ab4fb7dbe1c4f7b958505.tar
www-ff76101d277661e90d1ab4fb7dbe1c4f7b958505.tar.gz
www-ff76101d277661e90d1ab4fb7dbe1c4f7b958505.tar.bz2
www-ff76101d277661e90d1ab4fb7dbe1c4f7b958505.tar.xz
www-ff76101d277661e90d1ab4fb7dbe1c4f7b958505.zip
merge changes from nav.mageia.org
-rw-r--r--_nav/css/source.css10
-rw-r--r--_nav/html/index.php7
-rw-r--r--_nav/langs/eo.lang37
-rw-r--r--_nav/langs/et.lang17
-rw-r--r--_nav/lib.php14
5 files changed, 83 insertions, 2 deletions
diff --git a/_nav/css/source.css b/_nav/css/source.css
index 01bb85483..f544a872f 100644
--- a/_nav/css/source.css
+++ b/_nav/css/source.css
@@ -1,5 +1,10 @@
/*! mageia.org nav CSS */
+/**
+ * TODO top nav must stay on top when scrolling (reduced or full)
+ *
+*/
+
#hmgn { margin: 0; padding: 0; }
#mgnav {
margin: 0; padding: 0;
@@ -41,7 +46,7 @@
#nav a.mageia {
width: 143px;
- background: #fff url(/_nav/css/mageia-logo-nav.png) no-repeat 30px 10px;
+ background: #fff url(//nav.mageia.org/css/mageia-logo-nav.png) no-repeat 30px 10px;
color: transparent;
text-shadow: none;
}
@@ -49,8 +54,11 @@
.about #mgnav .about,
.downloads #mgnav .downloads,
.community #mgnav .community,
+.blog #mgnav .community,
+.mediawiki #mgnav .community,
.support #mgnav .support,
.contribute #mgnav .contribute,
+.bugs-mageia-org #mgnav .contribute,
.contrib #mgnav .contrib,
.you #mgnav .you
{
diff --git a/_nav/html/index.php b/_nav/html/index.php
index 31ba1d514..7297f84ec 100644
--- a/_nav/html/index.php
+++ b/_nav/html/index.php
@@ -9,6 +9,11 @@ $url = isset($_GET['u']) ? trim($_GET['u']) : null;
/** html[lang] of the doc. */
$lang = isset($_GET['l']) ? trim($_GET['l']) : null;
+if ($lang == 'undefined' ||
+ $lang == '') {
+
+ $lang = 'en';
+}
/** body[class] of the doc. */
$body = isset($_GET['b']) ? trim($_GET['b']) : null;
@@ -25,4 +30,4 @@ header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET');
header('Content-Type: text/html;charset=utf-8');
header(sprintf('Expires: %s', gmdate('r', strtotime('+1 day'))));
-echo _mgnav_html($wrap, $lang); \ No newline at end of file
+echo _mgnav_html($wrap, $lang);
diff --git a/_nav/langs/eo.lang b/_nav/langs/eo.lang
new file mode 100644
index 000000000..392d7cf73
--- /dev/null
+++ b/_nav/langs/eo.lang
@@ -0,0 +1,37 @@
+;About&nbsp;us
+Pri&nbsp;ni
+
+;Downloads
+Elŝutoj
+
+;Support
+Subteno
+
+;Community
+Komunumo
+
+;Contribute
+Kontribui
+
+;You
+Vi
+
+;Go to mageia.org site map.
+Iri al la paĝarmapo de mageia.org.
+
+;Learn more about Mageia.
+Scii pli pri Magejo.
+
+;Download Mageia ISO and updates.
+Elŝuti ISO-dosierojn kaj ĝisdatigojn de Magejo.
+
+;Get support from Mageia community.
+Trovi helpon en la Mageja komunumo.
+
+;
+
+;You too can build Mageia with us!
+Vi povas helpi nin fari Magejon!
+
+;Your Mageia online account.
+Via enreta Mageja konto.
diff --git a/_nav/langs/et.lang b/_nav/langs/et.lang
new file mode 100644
index 000000000..cacd951e8
--- /dev/null
+++ b/_nav/langs/et.lang
@@ -0,0 +1,17 @@
+;About&nbsp;us
+Üldine&nbsp;teave
+
+;Downloads
+Allalaadimine
+
+;Support
+Toetus
+
+;Community
+Kogukond
+
+;Contribute
+Abistamine
+
+;You
+Mina
diff --git a/_nav/lib.php b/_nav/lib.php
index b04484995..c86b42282 100644
--- a/_nav/lib.php
+++ b/_nav/lib.php
@@ -54,6 +54,8 @@ class l10n
*/
function _mgnav_html($wrap = false, $lang = 'en', $inject = null, $vhost = '//www.mageia.org')
{
+ $lang = _lang_simple($lang);
+
l10n::load($lang);
$tn = array(
@@ -102,3 +104,15 @@ function _mgnav_style()
{
return '<style>' . file_get_contents(__DIR__ . '/css/source.css') . '</style>';
}
+
+/**
+ * Get the primary language subtag only.<p></p>
+*/
+function _lang_simple($s = null)
+{
+ if (!is_null($s)) {
+ $s = explode('-', $s);
+ $s = strtolower($s[0]);
+ }
+ return $s;
+}