aboutsummaryrefslogtreecommitdiffstats
path: root/langs/missing.php
diff options
context:
space:
mode:
authorFilip Komar <filip@mageia.org>2014-03-10 15:49:38 +0000
committerFilip Komar <filip@mageia.org>2014-03-10 15:49:38 +0000
commite906073f3faef013d5c706012edca0d7a43db30f (patch)
treee5ec2e3915aef375a9b7244b56544572b4a37fa8 /langs/missing.php
parentcf897b808191883c3be8af3cf88cb303f17dd42f (diff)
downloadwww-e906073f3faef013d5c706012edca0d7a43db30f.tar
www-e906073f3faef013d5c706012edca0d7a43db30f.tar.gz
www-e906073f3faef013d5c706012edca0d7a43db30f.tar.bz2
www-e906073f3faef013d5c706012edca0d7a43db30f.tar.xz
www-e906073f3faef013d5c706012edca0d7a43db30f.zip
some improvements for gettext system
Diffstat (limited to 'langs/missing.php')
-rw-r--r--langs/missing.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/langs/missing.php b/langs/missing.php
index 870835337..952232704 100644
--- a/langs/missing.php
+++ b/langs/missing.php
@@ -16,10 +16,12 @@ 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>';
}
if($resource =='constitution') {
@@ -38,12 +40,10 @@ if ($s == '../_nav/langs/en.lang') {
$file = substr(_lang_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';
- $iframe = '//' . $_SERVER['SERVER_NAME'] .'/_nav/langs/en.lang';
+ $to_translate = '<iframe src="//' . $_SERVER['SERVER_NAME'] .'/_nav/langs/en.lang" style="width: 60em; height: 30em;"></iframe>';
} else {
-// $file = _lang_file_switch($s, $l);
$note = '';
$commit = '<a href="//svnweb.mageia.org/web/www/trunk/langs/">web/www/trunk/langs</a>/' . $file;
- $iframe = '//' . $_SERVER['SERVER_NAME'] .'/langs/'.$s;
}
$constitution_or_license = '';
@@ -76,8 +76,15 @@ if($constitution || $license) {
<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>
- <li>Copy the source file from the frame below in a text editor and rename it <code><?php echo $file?></code>.<?php echo $note ?></li>
- <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
+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;
+} ?>
<li>Then:
<ul>
<li>if you have a SVN account, you may commit it directly in <code><?php echo $commit ?></code>;</li>
@@ -88,7 +95,7 @@ if($constitution || $license) {
</ol>
<p>Thanks!</p>
-<iframe src="<?php echo $iframe ?>" style="width: 60em; height: 30em;"></iframe>
+<?php echo $to_translate ?>
<hr>
</body>
</html>