aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xen/5/download_index.php6
-rw-r--r--en/about/index.php6
-rw-r--r--en/doc/archive.php9
-rw-r--r--en/doc/index.php9
-rw-r--r--en/index.php29
-rw-r--r--en/map/index.php4
-rw-r--r--en/support/index.php6
-rw-r--r--g/style/common_footer.css48
-rw-r--r--langs.inc.php24
-rw-r--r--langs.php42
-rw-r--r--langs/.tx/config6
-rw-r--r--tools/web_projects.dat6
12 files changed, 140 insertions, 55 deletions
diff --git a/en/5/download_index.php b/en/5/download_index.php
index 058653ddd..1b01b5e98 100755
--- a/en/5/download_index.php
+++ b/en/5/download_index.php
@@ -13,7 +13,7 @@ define('HLANG', true);
define('ALIGNMENT', 'Center');
require '../../langs.php';
-$dictionary = read_translation_file($locale, "5");
+$dictionary = read_translation_file($locale, array('5', 'common_footer'));
function get_mageia($name, $version, $release)
{
@@ -133,6 +133,7 @@ input[type="radio"], input[type="submit"] {
border-radius: 6px;
}
</style>
+<link rel="stylesheet" type="text/css" href="/g/style/common_footer.css">
</head>
<body class="release downloads">
<?php echo $hsnav; ?>
@@ -140,7 +141,7 @@ input[type="radio"], input[type="submit"] {
<h1 id="mgnavt"><?php echo sprintf(_g('Download') . ' <strong>%s %s %s</strong>',$name, $version, $release)?></h1>
<?php include '../5/nav.php'; ?>
- <div id="doc4" class="yui-t7">
+ <div id="doc4" class="yui-t7" style="margin-bottom: 0px;">
<div id="bd" role="main">
<div class="yui-ge bb1">
<div class="yui-u first rb1">
@@ -626,5 +627,6 @@ $('img.lazy').each(function(){
});
</script>
+<?php echo common_footer($locale); ?>
</body>
</html>
diff --git a/en/about/index.php b/en/about/index.php
index 62043c885..4eadd7490 100644
--- a/en/about/index.php
+++ b/en/about/index.php
@@ -3,7 +3,7 @@ define('HLANG', true);
define('ALIGNMENT', 'Center');
require '../../langs.php';
-$dictionary = read_translation_file($locale, "about");
+$dictionary = read_translation_file($locale, array('about', 'common_footer'));
?><!DOCTYPE html>
<html dir="ltr" lang="<?php echo $locale ?>">
@@ -22,11 +22,12 @@ $dictionary = read_translation_file($locale, "about");
width: 500px;
}
</style>
+ <link rel="stylesheet" type="text/css" href="/g/style/common_footer.css">
</head>
<body class="about">
<?php echo $hsnav; ?>
<h1 id="mgnavtitle"><?php _g('About Mageia')?></h1>
- <div id="doc" class="yui-t7">
+ <div id="doc" class="yui-t7" style="margin-bottom: 0px;">
<div id="bd" role="main">
<div class="yui-g"><div class="para" style="padding-top: 2em;">
<img src="/g/media/logo/mageia-2013.svg" id="abtlg" alt="Mageia">
@@ -92,5 +93,6 @@ $dictionary = read_translation_file($locale, "about");
</div></div>
</div>
</div>
+<?php echo common_footer($locale); ?>
</body>
</html>
diff --git a/en/doc/archive.php b/en/doc/archive.php
index f67c870eb..a873f946c 100644
--- a/en/doc/archive.php
+++ b/en/doc/archive.php
@@ -2,7 +2,7 @@
define('HLANG', true);
define('ALIGNMENT', 'Center');
require '../../langs.php';
-$dictionary = read_translation_file($locale, 'documentation');
+$dictionary = read_translation_file($locale, array('documentation', 'common_footer'));
require 'doc.php';
?><!DOCTYPE html>
@@ -13,6 +13,7 @@ require 'doc.php';
<meta name="description" content="<?php _g('Documentation for previous releases of Mageia distribution and its tools.')?>">
<meta name="keywords" content="<?php _g('doc,documentation,help,guide,installer,installation,mageia,linux')?>">
<link rel="stylesheet" href="/g/style/all.css" type="text/css">
+ <link rel="stylesheet" type="text/css" href="/g/style/common_footer.css">
<?php include '../../analytics.php'; ?>
</head>
<body class="doc">
@@ -58,10 +59,6 @@ require 'doc.php';
</div>
</div>
</div>
- <div style="margin-left: 2em;">
- <hr>
- <p><a href="/<?php echo $locale; ?>/map/"><?php _g('Mageia sitemap')?></a>
- | <a href="/<?php echo $locale; ?>/support/"><?php _g('Support')?></a></p>
- </div>
+<?php echo common_footer($locale); ?>
</body>
</html>
diff --git a/en/doc/index.php b/en/doc/index.php
index 880b2549d..12027bfb5 100644
--- a/en/doc/index.php
+++ b/en/doc/index.php
@@ -2,7 +2,7 @@
define('HLANG', true);
define('ALIGNMENT', 'Center');
require '../../langs.php';
-$dictionary = read_translation_file($locale, 'documentation');
+$dictionary = read_translation_file($locale, array('documentation', 'common_footer'));
require 'doc.php';
@@ -15,6 +15,7 @@ require 'doc.php';
<meta name="description" content="<?php _g('Documentation for Mageia distribution and its tools.')?>">
<meta name="keywords" content="<?php _g('doc,documentation,help,guide,installer,installation,mageia,linux')?>">
<link rel="stylesheet" href="/g/style/all.css" type="text/css">
+ <link rel="stylesheet" type="text/css" href="/g/style/common_footer.css">
<?php include '../../analytics.php'; ?>
</head>
<body class="doc">
@@ -41,10 +42,6 @@ require 'doc.php';
</div>
</div>
</div>
- <div style="margin-left: 2em;">
- <hr>
- <p><a href="/<?php echo $locale; ?>/map/"><?php _g('Mageia sitemap')?></a>
- | <a href="/<?php echo $locale; ?>/support/"><?php _g('Support')?></a></p>
- </div>
+<?php echo common_footer($locale); ?>
</body>
</html>
diff --git a/en/index.php b/en/index.php
index 7ee7499eb..a72dd5339 100644
--- a/en/index.php
+++ b/en/index.php
@@ -4,15 +4,7 @@
define('HLANG', true);
define('ALIGNMENT', 'Center');
require '../langs.php';
-$dictionary_1 = read_translation_file($locale, 'index');
-$dictionary_2 = read_translation_file($locale, 'news');
-$dictionary = array_merge($dictionary_1, $dictionary_2);
-
-$nav = array(
- 'nav-support' => array('support/', _r('Support')),
- 'nav-community' => array('community/', _r('Community')),
- 'nav-about' => array('about/', _r('About&nbsp;Mageia.Org'))
-);
+$dictionary = read_translation_file($locale, array('index', 'news', 'common_footer'));
?><!DOCTYPE html>
<html dir="ltr" lang="<?php echo $locale; ?>">
@@ -141,7 +133,7 @@ $nav = array(
font: 60%/1.2 Verdana,Arial,sans-serif;
color: #f0f0f0;
}
- #fnotes a { color: #ccc; text-decoration: none; }
+ #fnotes a { color: #aaa; text-decoration: none; }
.free-dl { color: green; font-weight: bold; }
/* Landscape phones and down */
@@ -285,22 +277,7 @@ $nav = array(
</div>
</div>
</div>
-<hr>
-<div id="down">
- <div class="container">
- <ul id="navb"><?php foreach ($nav as $k => $v)
- echo sprintf(
- '<li><a class="%s" href="%s">%s</a></li>',
- $k, $v[0], $v[1]
- );
- ?></ul>
- <hr>
- <p id="fnotes">
- <a href="/<?php echo $locale ?>/map/"><?php _g('Sitemap')?></a>
- | <a href="/<?php echo $locale ?>/about/policies/privacy/"><?php _g('Privacy policy')?></a>
- </p>
- </div>
-</div>
+<?php echo common_footer($locale); ?>
</body>
</html>
diff --git a/en/map/index.php b/en/map/index.php
index af3c263af..3fe54c3a9 100644
--- a/en/map/index.php
+++ b/en/map/index.php
@@ -2,7 +2,7 @@
define('HLANG', true);
define('ALIGNMENT', 'Center');
require '../../langs.php';
-$dictionary = read_translation_file($locale, 'map');
+$dictionary = read_translation_file($locale, array('map', 'common_footer'));
$map = array(
'about' => array(
@@ -126,6 +126,7 @@ $sMap .= '</ul>';
<meta name="robots" content="noindex,nofollow,nosnippet">
<link rel="canonical" href="/<?php echo $locale; ?>/map/">
<link rel="stylesheet" href="map.css">
+ <link rel="stylesheet" type="text/css" href="/g/style/common_footer.css">
<?php include '../../analytics.php'; ?>
</head>
<body class="map">
@@ -141,5 +142,6 @@ $sMap .= '</ul>';
<p><form><input type="search"><input type="submit"></form></p>
-->
</div>
+<?php echo common_footer($locale); ?>
</body>
</html>
diff --git a/en/support/index.php b/en/support/index.php
index 9d41238cb..fd298062c 100644
--- a/en/support/index.php
+++ b/en/support/index.php
@@ -2,7 +2,7 @@
define('HLANG', true);
define('ALIGNMENT', 'Center');
require '../../langs.php';
-$dictionary = read_translation_file($locale, 'support');
+$dictionary = read_translation_file($locale, array('support', 'common_footer'));
?><!DOCTYPE html>
<html dir="ltr" lang="<?php echo $locale; ?>">
@@ -13,6 +13,7 @@ $dictionary = read_translation_file($locale, 'support');
<meta name="keywords" content="<?php _g('mageia, linux, support, help, hardware, qa, test')?>">
<meta name="author" content="Mageia">
<link rel="stylesheet" type="text/css" href="/g/style/all.css">
+ <link rel="stylesheet" type="text/css" href="/g/style/common_footer.css">
<?php include '../../analytics.php'; ?>
</head>
<body class="support">
@@ -29,7 +30,7 @@ $dictionary = read_translation_file($locale, 'support');
<li><a href="//bugs.mageia.org/"><?php _g('Bugs Reports')?></a></li>
</ul>
</header>
- <div id="doc" class="yui-t7">
+ <div id="doc" class="yui-t7" style="margin-bottom: 0px;">
<div id="bd" role="main">
<div class="yui-g">
<div class="para donate" style="padding-top: 2em;">
@@ -103,5 +104,6 @@ $dictionary = read_translation_file($locale, 'support');
</div>
</div>
</div>
+<?php echo common_footer($locale); ?>
</body>
</html>
diff --git a/g/style/common_footer.css b/g/style/common_footer.css
new file mode 100644
index 000000000..dfa4eb297
--- /dev/null
+++ b/g/style/common_footer.css
@@ -0,0 +1,48 @@
+hr.divider { display: none; }
+
+.container {
+ margin: 0 auto;
+ max-width: 1024px;
+ padding-bottom: 40px;
+}
+
+#navb { line-height: 1.4; }
+
+#navb {
+padding: 0;
+margin: 0 auto;
+display: table;
+border-radius: 4px;
+font-size: 80%;
+margin-bottom: 20px;
+}
+
+#navb li {
+display: table-cell;
+padding: 0;
+border-right: 1px solid #f0f0f0;
+}
+
+#navb li:last-child { border: none; }
+
+#navb a {
+font: 12.8px Verdana,Arial,sans-serif;
+text-decoration: none;
+padding: 20px 1em 20px 1em;
+display: block;
+min-width: 80px;
+text-align: center;
+color: #444;
+}
+#navb a:hover {
+color: #2383C2;
+}
+
+
+#fnotes {
+text-align: center;
+font: 80%/1.2 Verdana,Arial,sans-serif;
+color: #f0f0f0;
+}
+
+#fnotes a { color: #aaa; text-decoration: none; }
diff --git a/langs.inc.php b/langs.inc.php
index 3a67aa463..c578dd2ee 100644
--- a/langs.inc.php
+++ b/langs.inc.php
@@ -438,21 +438,29 @@ function _lang_load($locale, $domain) { return i18n::_lang_load($locale, $domain
* Do not exit the process.
*
* @param string $locale from which we want to create dictionary
- * @param string $name_of_translation gettext filename
+ * @param mixed $name_of_translation string for one gettext filename or array for more
*
* @return array
*/
function read_translation_file($locale, $name_of_translation)
{
- if($name_of_translation == '../_nav/langs/en') {
- $path_filename = '/_nav/langs/' . $locale . '.po';
+ if(is_array($name_of_translation)) {
+ $dictionary = array();
+ foreach($name_of_translation as $single_filename) {
+ $dictionary = array_merge($dictionary, read_translation_file($locale, $single_filename));
+ }
+ return $dictionary;
} else {
- $path_filename = '/langs/' . $locale . '/' . $name_of_translation . '.po';
- }
- if($locale == 'en') {
- $path_filename .= 't';
+ if ($name_of_translation == '../_nav/langs/en') {
+ $path_filename = '/_nav/langs/' . $locale . '.po';
+ } else {
+ $path_filename = '/langs/' . $locale . '/' . $name_of_translation . '.po';
+ }
+ if ($locale == 'en') {
+ $path_filename .= 't';
+ }
+ return phpmo_parse_po_file(G_APP_ROOT . $path_filename);
}
- return phpmo_parse_po_file(G_APP_ROOT . $path_filename);
}
/**
diff --git a/langs.php b/langs.php
index 6849d781a..b3abe2d39 100644
--- a/langs.php
+++ b/langs.php
@@ -23,8 +23,8 @@ if ($_SERVER['HTTP_HOST'] == 'www-test.mageia.org') {
//$g_app_root = realpath(dirname(__FILE__));
//define('G_APP_ROOT', $g_app_root);
-$g_donate_amount = '--';
-$g_amount_remain = 'EUR&nbsp;10,244.46';
+// $g_donate_amount = '--';
+// $g_amount_remain = 'EUR&nbsp;10,244.46';
$G_coord_assos = <<<T
Association Mageia.Org
@@ -86,3 +86,41 @@ $hsfoot = '';
if (!defined('HLANG'))
echo $hsnav;
+
+/**
+ * Output common footer in passed language
+ *
+ * @param string $locale
+ *
+ * @return string $common_footer
+*/
+function common_footer($locale = 'en')
+{
+ $nav = array(
+ 'nav-support' => array('support/', _r('Support')),
+ 'nav-community' => array('community/', _r('Community')),
+ 'nav-about' => array('about/', _r('About&nbsp;Mageia.Org'))
+ );
+
+ $common_footer = '<hr class="divider">' . PHP_EOL;
+ $common_footer .= '<div id="down">' . PHP_EOL;
+ $common_footer .= ' <div class="container">' . PHP_EOL;
+ $common_footer .= ' <ul id="navb">';
+ foreach ($nav as $k => $v) {
+ $common_footer .= sprintf(
+ '<li><a class="%s" href="%s">%s</a></li>',
+ $k, $v[0], $v[1]
+ );
+ }
+ $common_footer .= '</ul>' . PHP_EOL;
+ $common_footer .= ' <hr class="divider">' . PHP_EOL;
+ $common_footer .= ' <p id="fnotes">' . PHP_EOL;
+ $common_footer .= " <a href=\"/$locale/map/\">" . _r('Sitemap') . '</a>' . PHP_EOL;
+ $common_footer .= " | <a href=\"/$locale/about/policies/privacy/\">";
+ $common_footer .= _r('Privacy policy') . '</a>' . PHP_EOL;
+ $common_footer .= ' </p>' . PHP_EOL;
+ $common_footer .= ' </div>' . PHP_EOL;
+ $common_footer .= '</div>' . PHP_EOL;
+
+ return $common_footer;
+}
diff --git a/langs/.tx/config b/langs/.tx/config
index 611f60406..6c2372193 100644
--- a/langs/.tx/config
+++ b/langs/.tx/config
@@ -49,6 +49,12 @@ source_file = en/cauldron.pot
source_lang = en
type = PO
+[mageia.page-common_footer]
+file_filter = <lang>/common_footer.po
+source_file = en/common_footer.pot
+source_lang = en
+type = PO
+
[mageia.page-community]
file_filter = <lang>/community.po
source_file = en/community.pot
diff --git a/tools/web_projects.dat b/tools/web_projects.dat
index a50754a9c..5614638aa 100644
--- a/tools/web_projects.dat
+++ b/tools/web_projects.dat
@@ -1,3 +1,5 @@
+# database of l10n resources for rebuild_gettext_catalogs.sh script
+
resources[about/code-of-conduct]="en/about/code-of-conduct/index.php"
resources[about/constitution]="en/about/constitution/index.php"
resources[about/license]="en/about/license/index.php"
@@ -6,11 +8,14 @@ resources[about/policies/privacy]="en/about/policies/privacy/index.php"
resources[about/reports]="en/about/reports/index.php"
resources[about/values]="en/about/values/index.php"
resources[downloads/get]="en/downloads/get/index.php"
+
resources[2]="en/2/download_index.php en/2/for-pc/index.php en/2/for-server/index.php en/2/index.php en/2/nav.php"
resources[3]="en/3/download_index.php en/3/for-pc/index.php en/3/for-server/index.php en/3/index.php en/3/nav.php"
resources[4]="en/4/download_index.php en/4/nav.php en/4/index.php"
resources[5]="en/5/download_index.php en/5/nav.php en/5/index.php"
+
resources[cauldron]="en/6/download_index.php en/6/nav.php en/6/index.php"
+
resources[404]="404.php"
resources[about]="en/about/index.php"
resources[calendar]="en/calendar/index.php"
@@ -26,3 +31,4 @@ resources[support]="en/support/index.php"
resources[thank-you]="en/thank-you/index.php"
resources[timeline]="en/timeline/index.php"
resources[mognase]="_nav/lib.php"
+resources[common_footer]="langs.php"