diff options
author | Filip Komar <filip@mageia.org> | 2014-01-28 18:55:20 +0000 |
---|---|---|
committer | Filip Komar <filip@mageia.org> | 2014-01-28 18:55:20 +0000 |
commit | e560c751132d5dc7c962ae0604ef1e17708c5b62 (patch) | |
tree | bf211ade910b8baa37d36ee4ca96f94a2f3acf59 /en | |
parent | c27a80f106854ba8df3506d04d6d5c5186c139dc (diff) | |
download | www-e560c751132d5dc7c962ae0604ef1e17708c5b62.tar www-e560c751132d5dc7c962ae0604ef1e17708c5b62.tar.gz www-e560c751132d5dc7c962ae0604ef1e17708c5b62.tar.bz2 www-e560c751132d5dc7c962ae0604ef1e17708c5b62.tar.xz www-e560c751132d5dc7c962ae0604ef1e17708c5b62.zip |
small bugfix for pt-br and another for abandoned translations
Diffstat (limited to 'en')
-rw-r--r-- | en/doc/doc.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/en/doc/doc.php b/en/doc/doc.php index abd991774..ca93060a3 100644 --- a/en/doc/doc.php +++ b/en/doc/doc.php @@ -13,6 +13,12 @@ function doc_list($documentation_name, $type, $version, $link, $epub_link = null global $locale; global $langs; global $documentation; + preg_match("/(..)(-)(..)/", $locale, $parsed_locale); + if(isset($parsed_locale[3])) { // create pt_br.po from pt-br and alike + $link_locale = $parsed_locale[1] . '_' . $parsed_locale[3]; + } else { + $link_locale = $locale; + } $your_language = ''; $others = ''; $text_others = ''; @@ -31,7 +37,7 @@ function doc_list($documentation_name, $type, $version, $link, $epub_link = null $lng_name = $langs[$lng]; } - if ($locale == $lng) { + if ($link_locale == $lng) { $your_language_present = TRUE; if (is_null($epub_link) or is_null($pdf_link)) { $your_language = sprintf(_t('%s available in %s') . '<br/>%s', @@ -63,10 +69,11 @@ function doc_list($documentation_name, $type, $version, $link, $epub_link = null $your_language, $text_others); } else { foreach($documentation[$type] as $single_version => $all_languages) { - if($single_version < $version && in_array($locale, $all_languages)) { + if($single_version < $version && in_array($link_locale, $all_languages)) { $language_present_before = "\t\t<tr><td>" . sprintf("Translation was present in %s before.<br/>Maybe you can check documentation for %s in Mageia %s.", $langs[$locale], $documentation_name, $single_version) . "</td></tr>" . PHP_EOL; + break; } else { $language_present_before = ''; } |