diff options
-rw-r--r-- | langs/diff.php | 12 | ||||
-rw-r--r-- | langs/missing.php | 16 |
2 files changed, 23 insertions, 5 deletions
diff --git a/langs/diff.php b/langs/diff.php index 9986bf1b2..fcc0f93ff 100644 --- a/langs/diff.php +++ b/langs/diff.php @@ -70,7 +70,13 @@ $s = '<a href="report.php?l=' . $target_lang . '">« back to the report pag $s .= sprintf('<h1>Differences between %s source and %s target</h1>', $source_file, $target_lang); -$s .= '<p>You can translate most of our web page resources online in <a href="http://www.transifex.com/organization/MageiaLinux/dashboard/all_resources/' . $target_lang . '/#1/?c=Webpages">Transifex</a>.</p>'; +$tx_resource_name = 'page-' . str_replace(array('../_nav/langs/en', '/'), array('nav', '-'), $resource); +$tx_language_code = locale_hyphen_underscore($target_lang, true); +$s .= '<p>You can translate most of our web page resources online in '; +$s .= "<a href=\"http://www.transifex.com/organization/MageiaLinux/dashboard/all_resources/"; +$s .= "$tx_language_code/#1/?s=$tx_resource_name&c=Webpages\">Transifex</a>.</p>"; + + $s .= '<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>'; $additional_file = ''; @@ -96,7 +102,9 @@ if($license) { $num_of_untranslated_strings = $license_numbers["untran"]; // number of all license sentences $diff['untranslated_sentences_in_license'] = $license_numbers['untranslated_sentences']; // add untranslated license sentences $s .= '<h2 style="color: red;">Please translate <a href="http://gitweb.mageia.org/software/drakx/tree/perl-install/share/po/' . $target_lang . '.po">separate license file</a> fully into ' . $langs[$target_lang] . ' first</h2>'; - $s .= sprintf('<p>You can find it as a part of a separate <a href="http://gitweb.mageia.org/software/drakx/tree/perl-install/share/po/' . $target_lang . '.po">drakx translation file in git</a> or in <a href="https://www.transifex.com/organization/MageiaLinux/dashboard/all_resources/' . $target_lang . '/#1/?s=drakx_share">Transifex</a>. ', $target_lang); // git doesn't work yet on https + $s .= '<p>You can find it as a part of a separate <a href="http://gitweb.mageia.org/software/drakx/tree/perl-install/share/po/' . $target_lang . '.po">'; + $s .= 'drakx translation file in git</a> or in <a href="https://www.transifex.com/organization/MageiaLinux/dashboard/all_resources/'; + $s .= $tx_language_code . '/#1/?s=drakx_share">Transifex</a>. '; // git doesn't work yet on https $issues['untranslated_sentences_in_license'] = 'untranslated msgid strings in ' . $num_of_untranslated_strings . ' license sentences as a part of a separate <a href="http://gitweb.mageia.org/software/drakx/tree/perl-install/share/po/' . $target_lang . '.po">drakx translation file</a> (it starts before the line with the string "1. License Agreement")'; } diff --git a/langs/missing.php b/langs/missing.php index 552cf4abe..345e9035e 100644 --- a/langs/missing.php +++ b/langs/missing.php @@ -45,10 +45,15 @@ if($constitution) { $constitution_or_license .= '<p>You can find it in <a href="http://gitweb.mageia.org/web/www/tree/en/about/constitution/">git</a>.'; } +$tx_resource_name = 'page-' . str_replace(array('../_nav/langs/en', '/'), array('nav', '-'), $resource); +$tx_language_code = locale_hyphen_underscore($l, true); $num_of_untranslated_strings = 0; if($license) { $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 + $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/'; + $constitution_or_license .= $l . '.po">drakx translation file in git</a> or in <a href="https://www.transifex.com/organization/MageiaLinux/dashboard/all_resources/'; + $constitution_or_license .= $tx_language_code . '/#1/?s=drakx_share">Transifex</a> (it starts before '; + $constitution_or_license .= 'the line with the string "1. License Agreement").'; // git doesn't work yet on https } if($constitution || $license) { @@ -67,14 +72,19 @@ if($constitution || $license) { <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 - <?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>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 $tx_language_code; +?>/#1/?c=Webpages&o=priority">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 -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; +echo ' <li>You can start translating the source file ' . $to_translate; +echo ' in <a href="http://www.transifex.com/organization/MageiaLinux/dashboard/all_resources/'; +echo $tx_language_code . '/#1/?s=' . $tx_resource_name . '&c=Webpages">Transifex</a> or any other gettext editor '; +echo 'of your choice and rename it to <code>' . $file . '</code>.' . $note . '</li>' . PHP_EOL; ?> <li>Then: <ul> |