r45454 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45453‎ | r45454 | r45455 >
Date:20:11, 6 January 2009
Author:harddisk
Status:deferred
Tags:
Comment:
added initial support for localization using gettext. beware though, that it doesn't work :D
Modified paths:
  • /trunk/tools/alertbot/de.po (added) (history)
  • /trunk/tools/alertbot/en.po (added) (history)
  • /trunk/tools/alertbot/l18n (added) (history)
  • /trunk/tools/alertbot/l18n/l18n-init.php (added) (history)
  • /trunk/tools/alertbot/locale (added) (history)
  • /trunk/tools/alertbot/locale/de_DE (added) (history)
  • /trunk/tools/alertbot/locale/de_DE/LC_MESSAGES (added) (history)
  • /trunk/tools/alertbot/locale/de_DE/LC_MESSAGES/messages.mo (added) (history)
  • /trunk/tools/alertbot/locale/de_DE/LC_MESSAGES/webinterface.mo (added) (history)
  • /trunk/tools/alertbot/locale/de_DE/LC_MESSAGES/webinterface.po (added) (history)
  • /trunk/tools/alertbot/locale/en_US (added) (history)
  • /trunk/tools/alertbot/locale/en_US/LC_MESSAGES (added) (history)
  • /trunk/tools/alertbot/locale/en_US/LC_MESSAGES/webinterface.po (added) (history)
  • /trunk/tools/alertbot/messages.txt (added) (history)
  • /trunk/tools/alertbot/web/config.php (modified) (history)
  • /trunk/tools/alertbot/web/warning.php (modified) (history)

Diff [purge]

Index: trunk/tools/alertbot/en.po
@@ -0,0 +1,56 @@
 2+msgid ""
 3+msgstr ""
 4+"Project-Id-Version: PACKAGE VERSION\n"
 5+"PO-Revision-Date: 2009-01-06 19:44+0100\n"
 6+"Last-Translator: Marco Schuster <marco@vmsoft-gbr.de>\n"
 7+"Language-Team: English\n"
 8+"MIME-Version: 1.0\n"
 9+"Content-Type: text/plain; charset=ASCII\n"
 10+"Content-Transfer-Encoding: 8bit\n"
 11+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
 12+
 13+msgid "Wikipedia emergency problem report"
 14+msgstr "Wikipedia emergency problem report"
 15+
 16+msgid ""
 17+"Is your problem related to a Wikimedia project being unreachable or broken?"
 18+"<br />If not, please think of filing a bug at <a href=\"http://bugzilla."
 19+"wikimedia.org\">Bugzilla</a> instead."
 20+msgstr ""
 21+"Is your problem related to a Wikimedia project being unreachable or broken?"
 22+"<br />If not, please think of filing a bug at <a href=\"http://bugzilla."
 23+"wikimedia.org\">Bugzilla</a> instead."
 24+
 25+msgid "Have you understood this script is <em>only</em> for emergencies?"
 26+msgstr "Have you understood this script is <em>only</em> for emergencies?"
 27+
 28+msgid "<strong>Is your problem listed on the list at the page end?</strong>"
 29+msgstr "<strong>Is your problem listed on the list at the page end?</strong>"
 30+
 31+msgid "On which project did you encounter the problem?"
 32+msgstr "On which project did you encounter the problem?"
 33+
 34+msgid ""
 35+"What language version of the project is it?<br />Please fill in the language "
 36+"code (de, en, etc.)"
 37+msgstr ""
 38+"What language version of the project is it?<br />Please fill in the language "
 39+"code (de, en, etc.)"
 40+
 41+msgid "What is your problem? Choose:"
 42+msgstr "What is your problem? Choose:"
 43+
 44+msgid "Who is affected?"
 45+msgstr "Who is affected?"
 46+
 47+msgid "Submit your problem report:"
 48+msgstr "Submit your problem report:"
 49+
 50+msgid "Submit problem"
 51+msgstr "Submit problem"
 52+
 53+msgid "Your IP address will be recorded to prevent abuse."
 54+msgstr "Your IP address will be recorded to prevent abuse."
 55+
 56+msgid "Current problems"
 57+msgstr "Current problems"
Index: trunk/tools/alertbot/locale/de_DE/LC_MESSAGES/messages.mo
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/tools/alertbot/locale/de_DE/LC_MESSAGES/messages.mo
___________________________________________________________________
Name: svn:mime-type
158 + application/octet-stream
Index: trunk/tools/alertbot/locale/de_DE/LC_MESSAGES/webinterface.mo
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/tools/alertbot/locale/de_DE/LC_MESSAGES/webinterface.mo
___________________________________________________________________
Name: svn:mime-type
259 + application/octet-stream
Index: trunk/tools/alertbot/locale/de_DE/LC_MESSAGES/webinterface.po
@@ -0,0 +1,51 @@
 2+msgid ""
 3+msgstr ""
 4+"Project-Id-Version: PACKAGE VERSION\n"
 5+"PO-Revision-Date: 2009-01-06 19:54+0100\n"
 6+"Last-Translator: Marco Schuster <marco@vmsoft-gbr.de>\n"
 7+"Language-Team: German\n"
 8+"MIME-Version: 1.0\n"
 9+"Content-Type: text/plain; charset=ASCII\n"
 10+"Content-Transfer-Encoding: 8bit\n"
 11+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
 12+
 13+msgid "Wikipedia emergency problem report"
 14+msgstr "Wikimedias Notfall-Problemmelder"
 15+
 16+msgid ""
 17+"Is your problem related to a Wikimedia project being unreachable or broken?"
 18+"<br />If not, please think of filing a bug at <a href=\"http://bugzilla."
 19+"wikimedia.org\">Bugzilla</a> instead."
 20+msgstr "Besteht das Problem in der Nichterreichbarkeit eines Wikimedia-Projekts?"
 21+
 22+msgid "Have you understood this script is <em>only</em> for emergencies?"
 23+msgstr "Dieses Skript dient nur fuer Notfaelle"
 24+
 25+msgid "<strong>Is your problem listed on the list at the page end?</strong>"
 26+msgstr "Ist das Problem unten bereits aufgelistet?"
 27+
 28+msgid "On which project did you encounter the problem?"
 29+msgstr "Wo haben Sie das Problem bemerkt?"
 30+
 31+msgid ""
 32+"What language version of the project is it?<br />Please fill in the language "
 33+"code (de, en, etc.)"
 34+msgstr "Welche Sprachversion ist es?<br />Bitte fuellen Sie die Sprache aus"
 35+
 36+msgid "What is your problem? Choose:"
 37+msgstr "Worum handelt es sich bei Ihrem Problem? Bitte waehlen:"
 38+
 39+msgid "Who is affected?"
 40+msgstr "Wen betrifft das Problem?"
 41+
 42+msgid "Submit your problem report:"
 43+msgstr "Problembericht abschicken:"
 44+
 45+msgid "Submit problem"
 46+msgstr "OK"
 47+
 48+msgid "Your IP address will be recorded to prevent abuse."
 49+msgstr "Ihre IP-Addresse wird zur Vermeidung von Missbrauch aufgezeichnet."
 50+
 51+msgid "Current problems"
 52+msgstr "Momentan bekannte Probleme:"
Index: trunk/tools/alertbot/locale/en_US/LC_MESSAGES/webinterface.po
@@ -0,0 +1,56 @@
 2+msgid ""
 3+msgstr ""
 4+"Project-Id-Version: PACKAGE VERSION\n"
 5+"PO-Revision-Date: 2009-01-06 19:55+0100\n"
 6+"Last-Translator: Marco Schuster <marco@vmsoft-gbr.de>\n"
 7+"Language-Team: English\n"
 8+"MIME-Version: 1.0\n"
 9+"Content-Type: text/plain; charset=ASCII\n"
 10+"Content-Transfer-Encoding: 8bit\n"
 11+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
 12+
 13+msgid "Wikipedia emergency problem report"
 14+msgstr "Wikipedia emergency problem report"
 15+
 16+msgid ""
 17+"Is your problem related to a Wikimedia project being unreachable or broken?"
 18+"<br />If not, please think of filing a bug at <a href=\"http://bugzilla."
 19+"wikimedia.org\">Bugzilla</a> instead."
 20+msgstr ""
 21+"Is your problem related to a Wikimedia project being unreachable or broken?"
 22+"<br />If not, please think of filing a bug at <a href=\"http://bugzilla."
 23+"wikimedia.org\">Bugzilla</a> instead."
 24+
 25+msgid "Have you understood this script is <em>only</em> for emergencies?"
 26+msgstr "Have you understood this script is <em>only</em> for emergencies?"
 27+
 28+msgid "<strong>Is your problem listed on the list at the page end?</strong>"
 29+msgstr "<strong>Is your problem listed on the list at the page end?</strong>"
 30+
 31+msgid "On which project did you encounter the problem?"
 32+msgstr "On which project did you encounter the problem?"
 33+
 34+msgid ""
 35+"What language version of the project is it?<br />Please fill in the language "
 36+"code (de, en, etc.)"
 37+msgstr ""
 38+"What language version of the project is it?<br />Please fill in the language "
 39+"code (de, en, etc.)"
 40+
 41+msgid "What is your problem? Choose:"
 42+msgstr "What is your problem? Choose:"
 43+
 44+msgid "Who is affected?"
 45+msgstr "Who is affected?"
 46+
 47+msgid "Submit your problem report:"
 48+msgstr "Submit your problem report:"
 49+
 50+msgid "Submit problem"
 51+msgstr "Submit problem"
 52+
 53+msgid "Your IP address will be recorded to prevent abuse."
 54+msgstr "Your IP address will be recorded to prevent abuse."
 55+
 56+msgid "Current problems"
 57+msgstr "Current problems"
Index: trunk/tools/alertbot/l18n/l18n-init.php
@@ -0,0 +1,7 @@
 2+<?PHP
 3+setlocale(LC_ALL, 'de_DE');
 4+
 5+// Specify location of translation tables
 6+bindtextdomain("webinterface", "./locale");
 7+textdomain("webinterface");
 8+?>
\ No newline at end of file
Index: trunk/tools/alertbot/de.po
@@ -0,0 +1,51 @@
 2+msgid ""
 3+msgstr ""
 4+"Project-Id-Version: PACKAGE VERSION\n"
 5+"PO-Revision-Date: 2009-01-06 19:45+0100\n"
 6+"Last-Translator: Marco Schuster <marco@vmsoft-gbr.de>\n"
 7+"Language-Team: German\n"
 8+"MIME-Version: 1.0\n"
 9+"Content-Type: text/plain; charset=ASCII\n"
 10+"Content-Transfer-Encoding: 8bit\n"
 11+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
 12+
 13+msgid "Wikipedia emergency problem report"
 14+msgstr ""
 15+
 16+msgid ""
 17+"Is your problem related to a Wikimedia project being unreachable or broken?"
 18+"<br />If not, please think of filing a bug at <a href=\"http://bugzilla."
 19+"wikimedia.org\">Bugzilla</a> instead."
 20+msgstr ""
 21+
 22+msgid "Have you understood this script is <em>only</em> for emergencies?"
 23+msgstr ""
 24+
 25+msgid "<strong>Is your problem listed on the list at the page end?</strong>"
 26+msgstr ""
 27+
 28+msgid "On which project did you encounter the problem?"
 29+msgstr ""
 30+
 31+msgid ""
 32+"What language version of the project is it?<br />Please fill in the language "
 33+"code (de, en, etc.)"
 34+msgstr ""
 35+
 36+msgid "What is your problem? Choose:"
 37+msgstr ""
 38+
 39+msgid "Who is affected?"
 40+msgstr ""
 41+
 42+msgid "Submit your problem report:"
 43+msgstr ""
 44+
 45+msgid "Submit problem"
 46+msgstr ""
 47+
 48+msgid "Your IP address will be recorded to prevent abuse."
 49+msgstr ""
 50+
 51+msgid "Current problems"
 52+msgstr ""
Index: trunk/tools/alertbot/messages.txt
@@ -0,0 +1,28 @@
 2+msgid "Wikipedia emergency problem report"
 3+msgstr ""
 4+msgid "Is your problem related to a Wikimedia project being unreachable or broken?<br />If not, please think of filing a bug at <a href=\"http://bugzilla.wikimedia.org\">Bugzilla</a> instead."
 5+msgstr ""
 6+msgid "Have you understood this script is <em>only</em> for emergencies?"
 7+msgstr ""
 8+msgid "<strong>Is your problem listed on the list at the page end?</strong>"
 9+msgstr ""
 10+msgid "On which project did you encounter the problem?"
 11+msgstr ""
 12+msgid "What language version of the project is it?<br />Please fill in the language code (de, en, etc.)"
 13+msgstr ""
 14+msgid "What is your problem? Choose:"
 15+msgstr ""
 16+msgid "Who is affected?"
 17+msgstr ""
 18+msgid "Submit your problem report:"
 19+msgstr ""
 20+msgid "Submit problem"
 21+msgstr ""
 22+msgid "Your IP address will be recorded to prevent abuse."
 23+msgstr ""
 24+msgid "Current problems"
 25+msgstr ""
 26+#msgid ""
 27+#msgstr ""
 28+#msgid ""
 29+#msgstr ""
\ No newline at end of file
Index: trunk/tools/alertbot/web/config.php
@@ -1,7 +1,7 @@
22 <?PHP
33 $mysql_host="localhost";
4 - $mysql_user="";
5 - $mysql_password="";
 4+ $mysql_user="alertbot";
 5+ $mysql_password="UypEtrLWvQzv3MCF";
66 $mysql_dbname="alertbot";
77 $mysql_link=mysqli_connect($mysql_host,$mysql_user,$mysql_password,$mysql_dbname);
88 ?>
\ No newline at end of file
Index: trunk/tools/alertbot/web/warning.php
@@ -26,16 +26,19 @@
2727 </head>
2828
2929 <body>
 30+<?
 31+require("../l18n/l18n-init.php");
 32+?>
3033 <form action="addwarn.php" method="post">
3134 <ol>
32 - <li>Is your problem related to a Wikimedia project being unreachable or broken?<br />
33 - If not, please think of filing a bug at <a href="http://bugzilla.wikimedia.org">Bugzilla</a> instead.</li>
 35+ <li><?=gettext("Is your problem related to a Wikimedia project being unreachable or broken?<br />
 36+ If not, please think of filing a bug at <a href=\"http://bugzilla.wikimedia.org\">Bugzilla</a> instead.");?></li>
3437
35 - <li>Have you understood this script is <em>only</em> for emergencies?</li>
 38+ <li><?=gettext("Have you understood this script is <em>only</em> for emergencies?");?></li>
3639
37 - <li><strong>Is your problem listed on the list at the page end?</strong></li>
 40+ <li><?=gettext("<strong>Is your problem listed on the list at the page end?");?></strong></li>
3841
39 - <li>On which project did you encounter the problem?<br />
 42+ <li><?=gettext("On which project did you encounter the problem?");?><br />
4043 <select name="project" onchange="chklang();">
4144 <?PHP
4245 foreach($acceptable_projects as $key=>$desc)
@@ -43,10 +46,10 @@
4447 ?>
4548 </select></li>
4649
47 - <div id="lang"><li>What language version of the project is it?<br />Please fill in the language code (de, en, etc.)<br />
 50+ <div id="lang"><li><?=gettext("What language version of the project is it?<br />Please fill in the language code (de, en, etc.)");?><br />
4851 <input type="text" size="5" maxlength="10" name="language"/></li></div>
4952
50 - <li>What is your problem? Choose:
 53+ <li><?=gettext("What is your problem? Choose:");?>
5154 <select name="problem" onchange="chkother();">
5255 <?PHP
5356 foreach($acceptable_problems as $key=>$desc)
@@ -55,7 +58,7 @@
5659 </select><div id="other-fe" style="visibility:hidden;">
5760 <input type="text" name="problem-other" maxlength="100" size="100" value=""/></div></li>
5861
59 - <li>Who is affected?
 62+ <li><?=gettext("Who is affected?");?>
6063 <select name="affected" >
6164 <?PHP
6265 foreach($acceptable_levels as $key=>$desc)
@@ -63,8 +66,8 @@
6467 ?>
6568 </select></li>
6669
67 - <li>Submit your problem report: <input type="submit" value="Submit problem" /><br />
68 - <small>Your IP address will be recorded to prevent abuse.</small></li>
 70+ <li><?=gettext("Submit your problem report:");?> <input type="submit" value="<?=gettext("Submit problem");?>" /><br />
 71+ <small><?=gettext("Your IP address will be recorded to prevent abuse.");?></small></li>
6972 </ol>
7073 </form>
7174

Status & tagging log