diff options
author | filip <filip.komar@gmail.com> | 2014-08-04 19:11:09 +0200 |
---|---|---|
committer | filip <filip.komar@gmail.com> | 2014-08-04 19:11:09 +0200 |
commit | 10b4de915588b381c94bed83b777ebbe953d8cba (patch) | |
tree | fa809402bb7a613d1eef277586148812398e989c /langs/missing.php | |
parent | 6b48f9a23cb7c70fa96996ea52241a505f004554 (diff) | |
download | www-10b4de915588b381c94bed83b777ebbe953d8cba.tar www-10b4de915588b381c94bed83b777ebbe953d8cba.tar.gz www-10b4de915588b381c94bed83b777ebbe953d8cba.tar.bz2 www-10b4de915588b381c94bed83b777ebbe953d8cba.tar.xz www-10b4de915588b381c94bed83b777ebbe953d8cba.zip |
transition of missing.php to gettext only, move from svn to git, minor improvements
Diffstat (limited to 'langs/missing.php')
-rw-r--r-- | langs/missing.php | 61 |
1 files changed, 25 insertions, 36 deletions
diff --git a/langs/missing.php b/langs/missing.php index db267864e..552cf4abe 100644 --- a/langs/missing.php +++ b/langs/missing.php @@ -12,54 +12,47 @@ if (is_null($s)) { die; } -if (strrpos($s, '.pot')) { - $gettext = true; - $resource = _extract_resource($s); - $file = _po_file_switch($s, $l); - $to_translate = '<a href="/langs/' . $s . '">/langs/' .$s . '</a>'; -} else { - $gettext = false; - $resource = _extract_resource($s, '.en.lang'); - $file = _lang_file_switch($s, $l); - $to_translate = '<iframe src="//' . $_SERVER['SERVER_NAME'] .'/langs/'. $s . '" style="width: 60em; height: 30em;"></iframe>'; -} +$resource = _extract_resource($s); +$to_translate = '<a href="/langs/' . $s . '">/langs/' .$s . '</a>'; -if($resource =='constitution') { +if($resource =='about/constitution') { $constitution = true; } else { $constitution = false; } -if($resource =='license') { +if($resource =='about/license') { $license = true; } else { $license = false; } -if ($s == '../_nav/langs/en.lang') { - $file = substr(_lang_file_switch($s, $l), 14); +if ($s == '../_nav/langs/en.pot') { + $file = substr(_po_file_switch($s, $l), 14); $note = '<span style="color: red; font-weight: bold"> NOTE: THIS IS TRANSLATION OF NAVIGATION SO LOCATION FOR COMMIT IS DIFFERENT!</span>'; - $commit = '<a href="//svnweb.mageia.org/web/www/trunk/_nav/langs/">web/www/trunk/_nav/langs/</a>' . $file . ' and for now to the <a href="//svnweb.mageia.org/web/nav/langs/">web/nav/langs/</a>' . $file . ' too'; - $to_translate = '<iframe src="//' . $_SERVER['SERVER_NAME'] .'/_nav/langs/en.lang" style="width: 60em; height: 30em;"></iframe>'; + $commit = '<a href="http://gitweb.mageia.org/web/nav/tree/langs/' . $file . '">/_nav/langs/' . $file . '</a>'; + $file = '/_nav/langs/' . $file; + $to_translate = '<a href="../_nav/langs/en.pot">/_nav/langs/en.pot</a>'; } else { + $file = '/langs/' . _po_file_switch($s, $l); $note = ''; - $commit = '<a href="//svnweb.mageia.org/web/www/trunk/langs/">web/www/trunk/langs</a>/' . $file; + $commit = '<a href="http://gitweb.mageia.org/web/www/tree' . $file . '">' . $file . '</a>'; } $constitution_or_license = ''; if($constitution) { - $constitution_or_license .= '<h2 style="color: red;">Please translate constitution first</h2>'; - $constitution_or_license .= '<p>You can find it in <a href="//svnweb.mageia.org/org/constitution/">svn</a>. '; + $constitution_or_license .= '<h2 style="color: red;">Please translate <a href="http://gitweb.mageia.org/web/www/tree/en/about/constitution/">separate constitution file</a> fully into ' . $langs[$l] . ' first</h2>'; + $constitution_or_license .= '<p>You can find it in <a href="http://gitweb.mageia.org/web/www/tree/en/about/constitution/">git</a>.'; } $num_of_untranslated_strings = 0; if($license) { - $constitution_or_license .= '<h2 style="color: red;">Please translate license into ' . $langs[$l] . ' first</h2>'; - $constitution_or_license .= sprintf('<p>You can find it in <a href="http://gitweb.mageia.org/software/drakx/tree/perl-install/share/po/%s.po">git</a>. ', $l); // git doesn't work yet on https + $constitution_or_license .= '<h2 style="color: red;">Please translate <a href="http://gitweb.mageia.org/software/drakx/tree/perl-install/share/po/">separate license file</a> into ' . $langs[$l] . ' first</h2>'; + $constitution_or_license .= '<p>You can find it as a part of a separate <a href="http://gitweb.mageia.org/software/drakx/tree/perl-install/share/po/' . $l . '.po">drakx translation file in git</a> or in <a href="https://www.transifex.com/organization/MageiaLinux/dashboard/all_resources/' . $l . '/#1/?s=drakx_share">Transifex</a> (it starts before the line with the string "1. License Agreement").'; // git doesn't work yet on https } if($constitution || $license) { - $constitution_or_license .= 'Please read <a href="https://wiki.mageia.org/en/Internationalisation_Team_%28i18n%29#Special_cases_of_web_pages">page on wiki for more information</a> about that.</p><p>Then:</p>'; + $constitution_or_license .= ' Please read <a href="https://wiki.mageia.org/en/Internationalisation_Team_%28i18n%29#Special_cases_of_web_pages">page on wiki for more information</a> about that.</p><p>Then:</p>'; } ?><!DOCTYPE html> @@ -72,30 +65,26 @@ if($constitution || $license) { <body> <p><a href="report.php<?php echo '?l=' . $l ?>">« back to the report page for <?php echo $langs[$l] ?></a></p> -<h1>Missing language file</h1> +<h1>Missing language file - <?php echo $file ?></h1> + +<p>Note that you can translate most of our web page resources online in <a href="http://www.transifex.com/organization/MageiaLinux/dashboard/all_resources/<?php echo $l ?>/#1/?c=Webpages">Transifex</a>.</p> +<p>Please take a look off the translation guide on the <a href="https://wiki.mageia.org/en/Internationalisation_Team_(i18n)#Website_translation">localization Wiki page</a> too.</p> + <p>So, <code><?php echo $file ?></code> language file is missing in <?php echo $langs[$l], ' (<code>', $l, '</code>)' ?>. What can you do to help us?</p> <?php echo $constitution_or_license; ?> <ol> <?php -if ($gettext) { - echo ' <li>Copy the source file ' . $to_translate . ' in gettext editor of your choice and rename it to <code>' . $file . '</code>.' . $note . '</li>' . PHP_EOL; - echo ' <li>You can also translate directly on our <a href="https://www.transifex.com/projects/p/mageia/language/' . $l . '/">project in transifex</a>.</li>' . PHP_EOL; - $to_translate = ''; // don't show it bellow -} else { - echo ' <li>Copy the source file from the frame below in a text editor and rename it to <code>' . $file . '</code>.' . $note . '</li>' . PHP_EOL; - echo ' <li>Replace and translate the strings that are just after the lines starting with a ";". Be careful to always keep your translated text on a single line.</li>' . PHP_EOL; -} ?> +echo ' <li>You can start translating the source file ' . $to_translate . ' in <a href="http://www.transifex.com/organization/MageiaLinux/dashboard/all_resources/' . $l . '/#1/?c=Webpages">Transifex</a> or any other gettext editor of your choice and rename it to <code>' . $file . '</code>.' . $note . '</li>' . PHP_EOL; +?> <li>Then: <ul> - <li>if you have a SVN account, you may commit it directly in <code><?php echo $commit ?></code>;</li> - <li>or attach it to a mail to Mageia localization team (<code>mageia-i18n</code>, <a href="irc://irc.freenode.net/#mageia-i18n">#mageia-i18n</a> on Freenode).</li> + <li>if you're in <a href="http://people.mageia.org/g/mga-i18n-committers.html">mga-i18n-committers group</a>, you may commit it directly in <code><?php echo $commit ?></code>;</li> + <li>or attach it to a mail to <a href="https://ml.mageia.org/l/info/i18n-discuss">Mageia localization team</a> (<code>mageia-i18n</code>, <a href="irc://irc.freenode.net/#mageia-i18n">#mageia-i18n</a> on Freenode).</li> </ul> </li> - <li>You can look to the translation guide on the <a href="https://wiki.mageia.org/en/Internationalisation_Team_(i18n)#Website_translation">localization Wiki page</a> too.</li> </ol> <p>Thanks!</p> -<?php echo $to_translate ?> <hr> </body> </html> |