diff options
author | Filip Komar <filip@mageia.org> | 2014-01-21 02:15:17 +0000 |
---|---|---|
committer | Filip Komar <filip@mageia.org> | 2014-01-21 02:15:17 +0000 |
commit | 24779c5b13e6c1830462169c36fec6d888cc2949 (patch) | |
tree | 34450d517eb3685ec5cf59ce1f1a962181c662e3 /en/doc | |
parent | dc811306a35d9ecb3625e2d6126f20e603f54016 (diff) | |
download | www-24779c5b13e6c1830462169c36fec6d888cc2949.tar www-24779c5b13e6c1830462169c36fec6d888cc2949.tar.gz www-24779c5b13e6c1830462169c36fec6d888cc2949.tar.bz2 www-24779c5b13e6c1830462169c36fec6d888cc2949.tar.xz www-24779c5b13e6c1830462169c36fec6d888cc2949.zip |
doc entry page converted to table
Diffstat (limited to 'en/doc')
-rw-r--r-- | en/doc/archive.php | 7 | ||||
-rw-r--r-- | en/doc/doc.php | 41 | ||||
-rw-r--r-- | en/doc/index.php | 12 |
3 files changed, 36 insertions, 24 deletions
diff --git a/en/doc/archive.php b/en/doc/archive.php index f0c66e2ec..61264ad2e 100644 --- a/en/doc/archive.php +++ b/en/doc/archive.php @@ -9,14 +9,14 @@ require 'doc.php'; <html lang="<?php echo $locale; ?>" dir="ltr"> <head> <meta charset="utf-8"> - <title><?php _e("Mageia Documentation's Archive")?></title> + <title><?php _e('Mageia Documentation\'s Archive')?></title> <meta name="description" content="<?php _e('Old documentation for Mageia distribution and its tools.')?>"> <meta name="keywords" content="<?php _e('doc,documentation,help,guide,installer,installation,mageia,linux')?>"> <link rel="stylesheet" href="/g/style/all.css" type="text/css"> </head> <body class="doc"> <?php echo $hsnav; ?> - <h1 id="mgnavt"><?php _e("Mageia Documentation's Archive")?></h1> + <h1 id="mgnavt"><?php _e('Mageia Documentation\'s Archive')?></h1> <div id="doc" class="yui-t7"> <div id="bd" role="main"> <div class="yui-g"> @@ -27,9 +27,8 @@ require 'doc.php'; <hr> <h3>Mageia 2</h3> <div style="float: left; margin: 2em;"> - <h4><?php _e('Installer')?></h4> <p><?php - doc_list($mga2_installer, '<a href="//doc.mageia.org/installer/2/%s/content/index.html">%s</a>'); + doc_list(_t('Installer'), $mga2_installer, '<a href="//doc.mageia.org/installer/2/%s/content/index.html">HTML</a>'); ?></p> </div> </div> diff --git a/en/doc/doc.php b/en/doc/doc.php index 5b70c0612..25dc0a742 100644 --- a/en/doc/doc.php +++ b/en/doc/doc.php @@ -8,7 +8,7 @@ $mga3_control_center = array('en','et','fr'); $mga2_installer = array('de','el','en','eo','fr','nl','pt_br','uk'); -function doc_list($languages, $link, $epub_link = null, $pdf_link = null) +function doc_list($documentation_name, $languages, $link, $epub_link = null, $pdf_link = null) { global $locale; global $langs; @@ -17,6 +17,9 @@ function doc_list($languages, $link, $epub_link = null, $pdf_link = null) $text_others = ''; $your_language_present = FALSE; $other_languages_present = FALSE; + $table = PHP_EOL . '<table class="dlt2 dlinfo" style="font-size: 10pt;">' . PHP_EOL; +// $table .= '<thead><tr><th></th></tr></thead>'; + $table .= "\t<tbody>" . PHP_EOL; foreach ($languages as $lng) { // hopefully temporary exception for pt-br as convention for lang-abbrev in /langs.inc.php is different as link in doc.mageia.org if ($lng == 'pt_br') { @@ -30,31 +33,45 @@ function doc_list($languages, $link, $epub_link = null, $pdf_link = null) if ($locale == $lng) { $your_language_present = TRUE; if (is_null($epub_link) or is_null($pdf_link)) { - $your_language = sprintf($lng_name . ' ~> ' . $link . '<br/><br/>', $lng, $lng_name) . PHP_EOL; + $your_language = sprintf(_t('%s available in %s') . '<br/>%s', + '<span style="font-weight:bold">' . $documentation_name . '</span>', $lng_name, sprintf($link, $lng)); } else { - $your_language = sprintf($lng_name . ' ~> ' . $link . - ' <span style="font-size: 07pt;">( ' . _t('available in:') . - $epub_link . ', ' . $pdf_link . ')</span><br/><br/>', - $lng, $lng, $lng) . PHP_EOL; + $your_language = sprintf(_t('%s available in %s') . '<br/>%s <span style="font-size: 07pt;">('. + _t('also as') . '%s , %s)</span>', + '<span style="font-weight:bold">' . $documentation_name . '</span>', + $lng_name, sprintf($link, $lng), sprintf($epub_link, $lng), sprintf($pdf_link, $lng)); } } else { $other_languages_present = TRUE; if (is_null($epub_link) or is_null($pdf_link)) { - $others .= sprintf($lng_name . ' ~> ' . $link . '<br/>', $lng, $lng_name) . PHP_EOL; + $others[] = sprintf('%s<br/>%s', $lng_name, sprintf($link, $lng)); } else { - $others .= sprintf($lng_name . ' ~> ' . $link . - ' <span style="font-size: 07pt;">( ' . $epub_link . - ', ' . $pdf_link . ')</span><br/>', $lng, $lng, $lng) . PHP_EOL; + $others[] = sprintf('%s<br/>%s <span style="font-size: 07pt;">(%s , %s)</span>', + $lng_name, sprintf($link, $lng), sprintf($epub_link, $lng), sprintf($pdf_link, $lng), sprintf($link, $lng)); } } } if ($your_language_present) { $text_your_language = '<span style="font-weight:bold">' . _t('Documentation in your language:') . '</span><br/>'; if ($other_languages_present) { - $text_others = '<span style="font-weight:bold">' . _t('There are also:') . '</span><br/>'; + $text_others = '<span style="font-weight:bold">' . _t('Other languages:') . '</span>'; } + $table .= sprintf("\t\t<tr><td>%s</td></tr>" . PHP_EOL . + "\t\t<tr><td> </td></tr>" . PHP_EOL . + "\t\t<tr><td>%s</td></tr>" . PHP_EOL, + $your_language, $text_others); } else { $text_your_language = _t('Please help <a href="../community/">us</a> translate it in your language.') . '<br/>'; + $table .= sprintf("\t\t<tr><td>%s</td></tr>" . PHP_EOL . + "\t\t<tr><td>%s</td></tr>" . PHP_EOL . + "\t\t<tr><td> </td></tr>" . PHP_EOL, + '<span style="font-weight:bold">' . $documentation_name . '</span>', $text_your_language); } - echo $text_your_language . $your_language . $text_others . $others; + foreach ($others as $other_languages) { + $table .= sprintf("\t\t<tr><td>%s</td></tr>" . PHP_EOL, $other_languages); + } + $table .= "\t</tbody>" . PHP_EOL; + $table .= "</table>" . PHP_EOL; + + echo $table; } diff --git a/en/doc/index.php b/en/doc/index.php index 25ffbfaf7..94512db55 100644 --- a/en/doc/index.php +++ b/en/doc/index.php @@ -31,17 +31,15 @@ require 'doc.php'; <hr> <h3>Mageia 4</h3> <div style="float: left; margin: 2em;"> - <h4><?php _e('Installer')?></h4> <p style="margin-left: 2em;"><?php - doc_list($mga4_installer, '<a href="//doc.mageia.org/installer/4/%s/content/index.html">HTML</a>', + doc_list(_t('Installer'), $mga4_installer, '<a href="//doc.mageia.org/installer/4/%s/content/index.html">HTML</a>', '<a href="//doc.mageia.org/installer/4/%s/content/index.html">EPUB</a>', '<a href="//doc.mageia.org/installer/4/%s/content/index.html">PDF</a>'); ?></p> </div> <div style="float: right; margin: 2em;"> - <h4><?php _e('Control Center')?></h4> <p style="margin-left: 2em;"><?php - doc_list($mga4_control_center, '<a href="//doc.mageia.org/mcc/4/%s/content/index.html">HTML</a>', + doc_list(_t('Control Center'), $mga4_control_center, '<a href="//doc.mageia.org/mcc/4/%s/content/index.html">HTML</a>', '<a href="//doc.mageia.org/mcc/4/%s/content/index.html">EPUB</a>', '<a href="//doc.mageia.org/mcc/4/%s/content/index.html">PDF</a>'); ?></p> @@ -49,15 +47,13 @@ require 'doc.php'; <hr style="clear: both;"> <h3>Mageia 3</h3> <div style="float: left; margin: 2em;"> - <h4><?php _e('Installer')?></h4> <p style="margin-left: 2em;"><?php - doc_list($mga3_installer, '<a href="//doc.mageia.org/installer/3/%s/content/index.html">HTML</a>'); + doc_list(_t('Installer'), $mga3_installer, '<a href="//doc.mageia.org/installer/3/%s/content/index.html">HTML</a>'); ?></p> </div> <div style="float: right; margin: 2em;"> - <h4><?php _e('Control Center')?></h4> <p style="margin-left: 2em;"><?php - doc_list($mga3_control_center, '<a href="//doc.mageia.org/mcc/3/%s/content/index.html">HTML</a>'); + doc_list(_t('Control Center'), $mga3_control_center, '<a href="//doc.mageia.org/mcc/3/%s/content/index.html">HTML</a>'); ?></p> </div> </div> |