aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-05-24 16:44:16 +0000
committerRomain d'Alverny <rda@mageia.org>2012-05-24 16:44:16 +0000
commit4feff619cb3057be353995675acdbe30319844f6 (patch)
tree5f17b64afd02821e6e94b3912e28ab90d459d2e1
parent19f7c7b9b310d4e971137dc6b16ec9675c287c42 (diff)
downloadwww-4feff619cb3057be353995675acdbe30319844f6.tar
www-4feff619cb3057be353995675acdbe30319844f6.tar.gz
www-4feff619cb3057be353995675acdbe30319844f6.tar.bz2
www-4feff619cb3057be353995675acdbe30319844f6.tar.xz
www-4feff619cb3057be353995675acdbe30319844f6.zip
guide translators for missing files
-rw-r--r--langs/missing.php44
-rw-r--r--langs/report.php26
2 files changed, 60 insertions, 10 deletions
diff --git a/langs/missing.php b/langs/missing.php
new file mode 100644
index 000000000..0aa78bda2
--- /dev/null
+++ b/langs/missing.php
@@ -0,0 +1,44 @@
+<?php
+/**
+*/
+
+$s = isset($_GET['s']) ? trim($_GET['s']) : null;
+$l = isset($_GET['l']) ? trim($_GET['l']) : null;
+
+if (is_null($s)) {
+ header('Location: /langs/report.php');
+ die;
+}
+
+include 'lib.php';
+
+
+?><!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <meta name="robots" content="noindex,nofollow,nosnippet">
+</head>
+<body>
+
+<p><a href="report.php">&laquo; back to the report page</a></p>
+
+<p>So, <code><?php echo $s ?></code> language file is missing in <?php echo $langs[$l], ' (<code>', $l, '</code>)' ?>. What can you do to help us?</p>
+
+<ol>
+ <li>Copy the source file from the frame below in a text editor and rename it <code><?php echo _lang_file_switch($s, $l)?></code>.</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>
+ <li>Then:
+ <ul>
+ <li>if you have a SVN account, you may commit it directly in <code><?php echo '<a href="http://svnweb.mageia.org/web/www/trunk/langs/">web/www/trunk/langs</a>/' . _lang_file_switch($s, $l)?></code>;</li>
+ <li>or attach it to a mail to Mageia i18n team (<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 Wiki too [TODO link].</li>
+</ol>
+
+<p>Thanks!</p>
+<iframe src="http://www.mageia.org/langs/<?php echo $s ?>" style="width: 60em; height: 30em;"></iframe>
+<hr>
+</body>
+</html> \ No newline at end of file
diff --git a/langs/report.php b/langs/report.php
index 13de503a5..ea253bed8 100644
--- a/langs/report.php
+++ b/langs/report.php
@@ -6,8 +6,7 @@
<title>www.mageia.org translation report</title>
<style>
.ok a,
- .strings a,
- .missing a {
+ .strings a {
text-decoration: none;
color: inherit;
}
@@ -17,7 +16,8 @@
.strings, .missing { font-size: 80%; }
.number, .strings, .missing { text-align: right; }
.small { font-size: 80%; }
- td { vertical-align: top; }
+ td, th { vertical-align: top; font-family: Arial; font-size: 80%; }
+ .lv { display: inline-block; -webkit-transform: rotate(-40deg); }
</style>
</head>
<body>
@@ -86,10 +86,10 @@
$f, $l);
if (count($test['missing']) > 0) {
- $s .= count($test['missing']) . ' missing<br>';
+ $s .= count($test['missing']) . '&nbsp;missing<br>';
}
if (count($test['notrans']) > 0) {
- $s .= count($test['notrans']) . ' untranslated';
+ $s .= count($test['notrans']) . '&nbsp;untranslated';
}
$s .= '</a></td>';
}
@@ -99,16 +99,19 @@
} else {
$stats[$l]['files'] += 0;
$stats[$l]['strings'] += 0;
- $s .= '<td class="missing">missing</td>';
+ $s .= sprintf('<td class="missing"><a href="missing.php?s=%s&l=%s">missing</a></td>',
+ $f, $l
+ );
}
}
$s .= '</tr>';
}
- $th = '';
+ $th = ''; $th2 = '';
array_shift($otherLangs);
foreach ($otherLangs as $l) {
- $th .= '<th>' . $langs[$l] . '<br>' . $l . '</th>';
+ $th .= '<th><span class="lv">' . $langs[$l] . '</span></th>';
+ $th2 .= '<th>' . $l . '</th>';
}
$ths = '';
@@ -121,16 +124,19 @@
<table border="1">
<thead>
<tr>
- <th colspan="2">English</th>
+ <th colspan="2" rowspan="2"><span class="lv">English</span></th>
{$th}
<th><a href="">How to add a new language</a></th>
</tr>
<tr>
+ {$th2}
+ </tr>
+ <tr>
<th colspan="2">Reference</th>
</tr>
<tr>
<th>{$stats['en']['files']} files</th>
- <th col="scol">{$stats['en']['strings']} strings</th>
+ <th col="scol">{$stats['en']['strings']}&nbsp;strings</th>
{$ths}
</tr>
</thead>