aboutsummaryrefslogtreecommitdiffstats
path: root/en/doc/doc.php
diff options
context:
space:
mode:
authorFilip Komar <filip@mageia.org>2014-01-21 02:15:17 +0000
committerFilip Komar <filip@mageia.org>2014-01-21 02:15:17 +0000
commit24779c5b13e6c1830462169c36fec6d888cc2949 (patch)
tree34450d517eb3685ec5cf59ce1f1a962181c662e3 /en/doc/doc.php
parentdc811306a35d9ecb3625e2d6126f20e603f54016 (diff)
downloadwww-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/doc.php')
-rw-r--r--en/doc/doc.php41
1 files changed, 29 insertions, 12 deletions
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>&nbsp;</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>&nbsp;</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;
}