* move hardcoded colons into message files
authorRaimond Spekking <raymond@users.mediawiki.org>
Thu, 10 May 2007 16:12:43 +0000 (16:12 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Thu, 10 May 2007 16:12:43 +0000 (16:12 +0000)
* make input forms nicer for RTL wikis. Should not make any difference to LTR wikis.

includes/SpecialBlockip.php
includes/SpecialIpblocklist.php
languages/messages/MessagesDe.php
languages/messages/MessagesEn.php

index d21b6d2..1df8a71 100644 (file)
@@ -65,7 +65,7 @@ class IPBlockForm {
        }
 
        function showForm( $err ) {
-               global $wgOut, $wgUser, $wgSysopUserBans;
+               global $wgOut, $wgUser, $wgSysopUserBans, $wgContLang;
 
                $wgOut->setPagetitle( wfMsg( 'blockip' ) );
                $wgOut->addWikiText( wfMsg( 'blockiptext' ) );
@@ -84,6 +84,7 @@ class IPBlockForm {
 
                $titleObj = SpecialPage::getTitleFor( 'Blockip' );
                $action = $titleObj->escapeLocalURL( "action=submit" );
+               $alignRight = $wgContLang->isRtl() ? 'left' : 'right';
 
                if ( "" != $err ) {
                        $wgOut->setSubtitle( wfMsgHtml( 'formerror' ) );
@@ -150,8 +151,8 @@ class IPBlockForm {
 <form id=\"blockip\" method=\"post\" action=\"{$action}\">
        <table border='0'>
                <tr>
-                       <td align=\"right\">{$mIpaddress}:</td>
-                       <td align=\"left\">
+                       <td align=\"$alignRight\">{$mIpaddress}</td>
+                       <td>
                                " . Xml::input( 'wpBlockAddress', 45, $this->BlockAddress,
                                        array(
                                                'tabindex' => '1',
@@ -162,8 +163,8 @@ class IPBlockForm {
                <tr>");
                if ($showblockoptions) {
                        $wgOut->addHTML("
-                       <td align=\"right\">{$mIpbexpiry}:</td>
-                       <td align=\"left\">
+                       <td align=\"$alignRight\">{$mIpbexpiry}</td>
+                       <td>
                                <select tabindex='2' id='wpBlockExpiry' name=\"wpBlockExpiry\" onchange=\"considerChangingExpiryFocus()\">
                                        $blockExpiryFormOptions
                                </select>
@@ -173,8 +174,8 @@ class IPBlockForm {
                $wgOut->addHTML("
                </tr>
                <tr id='wpBlockOther'>
-                       <td align=\"right\">{$mIpbother}:</td>
-                       <td align=\"left\">
+                       <td align=\"$alignRight\">{$mIpbother}</td>
+                       <td>
                                " . Xml::input( 'wpBlockOther', 45, $this->BlockOther,
                                        array( 'tabindex' => '3', 'id' => 'mw-bi-other' ) ) . "
                        </td>
@@ -182,8 +183,8 @@ class IPBlockForm {
                if ( $blockReasonList != '' ) {
                        $wgOut->addHTML("
                        <tr>
-                               <td align=\"right\">{$mIpbreasonother}:</td>
-                               <td align=\"left\">
+                               <td align=\"$alignRight\">{$mIpbreasonother}</td>
+                               <td>
                                        <select tabindex='4' id=\"wpBlockReasonList\" name=\"wpBlockReasonList\">
                                                $blockReasonList
                                                </select>
@@ -192,15 +193,15 @@ class IPBlockForm {
                }
                $wgOut->addHTML("
                <tr id=\"wpBlockReason\">
-                       <td align=\"right\">{$mIpbreason}:</td>
-                       <td align=\"left\">
+                       <td align=\"$alignRight\">{$mIpbreason}</td>
+                       <td>
                                " . Xml::input( 'wpBlockReason', 45, $this->BlockReason,
                                        array( 'tabindex' => '5', 'id' => 'mw-bi-reason' ) ) . "
                        </td>
                </tr>
                <tr id='wpAnonOnlyRow'>
                        <td>&nbsp;</td>
-                       <td align=\"left\">
+                       <td>
                                " . wfCheckLabel( wfMsgHtml( 'ipbanononly' ),
                                        'wpAnonOnly', 'wpAnonOnly', $this->BlockAnonOnly,
                                        array( 'tabindex' => '6' ) ) . "
@@ -208,7 +209,7 @@ class IPBlockForm {
                </tr>
                <tr id='wpCreateAccountRow'>
                        <td>&nbsp;</td>
-                       <td align=\"left\">
+                       <td>
                                " . wfCheckLabel( wfMsgHtml( 'ipbcreateaccount' ),
                                        'wpCreateAccount', 'wpCreateAccount', $this->BlockCreateAccount,
                                        array( 'tabindex' => '7' ) ) . "
@@ -216,7 +217,7 @@ class IPBlockForm {
                </tr>
                <tr id='wpEnableAutoblockRow'>
                        <td>&nbsp;</td>
-                       <td align=\"left\">
+                       <td>
                                " . wfCheckLabel( wfMsgHtml( 'ipbenableautoblock' ),
                                                'wpEnableAutoblock', 'wpEnableAutoblock', $this->BlockEnableAutoblock,
                                                        array( 'tabindex' => '8' ) ) . "
@@ -228,7 +229,7 @@ class IPBlockForm {
                        $wgOut->addHTML("
                        <tr>
                        <td>&nbsp;</td>
-                               <td align=\"left\">
+                               <td>
                                        " . wfCheckLabel( wfMsgHtml( 'ipbhidename' ),
                                                        'wpHideName', 'wpHideName', $this->BlockHideName,
                                                                array( 'tabindex' => '9' ) ) . "
@@ -239,7 +240,7 @@ class IPBlockForm {
                $wgOut->addHTML("
                <tr>
                        <td style='padding-top: 1em'>&nbsp;</td>
-                       <td style='padding-top: 1em' align=\"left\">
+                       <td style='padding-top: 1em'>
                                " . Xml::submitButton( wfMsg( 'ipbsubmit' ),
                                                        array( 'name' => 'wpBlock', 'tabindex' => '10' ) ) . "
                        </td>
index 5a66433..9f705db 100644 (file)
@@ -77,7 +77,7 @@ class IPUnblockForm {
        }
 
        function showForm( $err ) {
-               global $wgOut, $wgUser, $wgSysopUserBans;
+               global $wgOut, $wgUser, $wgSysopUserBans, $wgContLang;
 
                $wgOut->setPagetitle( wfMsg( 'unblockip' ) );
                $wgOut->addWikiText( wfMsg( 'unblockiptext' ) );
@@ -87,6 +87,7 @@ class IPUnblockForm {
                $ipus = wfMsgHtml( 'ipusubmit' );
                $titleObj = SpecialPage::getTitleFor( "Ipblocklist" );
                $action = $titleObj->getLocalURL( "action=submit" );
+               $alignRight = $wgContLang->isRtl() ? 'left' : 'right';
 
                if ( "" != $err ) {
                        $wgOut->setSubtitle( wfMsg( "formerror" ) );
@@ -111,24 +112,24 @@ class IPUnblockForm {
                        Xml::openElement( 'form', array( 'method' => 'post', 'action' => $action, 'id' => 'unblockip' ) ) .
                        Xml::openElement( 'table', array( 'border' => '0' ) ).
                        "<tr>
-                               <td align='right'>
-                                       {$ipa}:
+                               <td align='$alignRight'>
+                                       {$ipa}
                                </td>
-                               <td align='left'>
+                               <td>
                                        {$addressPart}
                                </td>
                        </tr>
                        <tr>
-                               <td align='right'>
-                                       {$ipr}:
+                               <td align='$alignRight'>
+                                       {$ipr}
                                </td>
-                               <td align='left'>" .
+                               <td>" .
                                        Xml::input( 'wpUnblockReason', 40, $this->reason, array( 'type' => 'text', 'tabindex' => '2' ) ) .
                                "</td>
                        </tr>
                        <tr>
                                <td>&nbsp;</td>
-                               <td align='left'>" .
+                               <td>" .
                                        Xml::submitButton( $ipus, array( 'name' => 'wpBlock', 'tabindex' => '3' ) ) .
                                "</td>
                        </tr>" .
index b303776..ffa327f 100644 (file)
@@ -1538,10 +1538,10 @@ Im [[Special:Log/delete|Lösch-Logbuch]] finden Sie eine Übersicht der kürzlic
 'blockiptext'                 => 'Benutzen Sie das Formular, um einen Benutzer oder eine IP-Adresse zu sperren.
 Dies sollte nur erfolgen, um Vandalismus zu verhindern und in Übereinstimmung mit den [[{{MediaWiki:policy-url}}|Richtlinien]].
 Bitte geben Sie den Grund für die Sperre an.',
-'ipaddress'                   => 'IP-Adresse oder Benutzername',
-'ipadressorusername'          => 'IP-Adresse oder Benutzername',
-'ipbexpiry'                   => 'Sperrdauer',
-'ipbreason'                   => 'Begründung',
+'ipaddress'                   => 'IP-Adresse oder Benutzername:',
+'ipadressorusername'          => 'IP-Adresse oder Benutzername:',
+'ipbexpiry'                   => 'Sperrdauer:',
+'ipbreason'                   => 'Begründung:',
 'ipbreasonotherlist'          => 'Andere Begründung',
 'ipbreason-dropdown'          => '
 * Allgemeine Sperrgründe
@@ -1558,10 +1558,10 @@ Bitte geben Sie den Grund für die Sperre an.',
 'ipbcreateaccount'            => 'Erstellung von Benutzerkonten verhindern',
 'ipbenableautoblock'          => 'Sperre die aktuell von diesem Benutzer genutzte IP-Adresse sowie automatisch alle folgenden, von denen aus er Bearbeitungen oder das Anlegen von Benutzeraccounts versucht',
 'ipbsubmit'                   => 'IP-Adresse/Benutzer sperren',
-'ipbother'                    => 'Andere Dauer (englisch)',
+'ipbother'                    => 'Andere Dauer (englisch):',
 'ipboptions'                  => '1 Stunde:1 hour,2 Stunden:2 hours,6 Stunden:6 hours,1 Tag:1 day,3 Tage:3 days,1 Woche:1 week,2 Wochen:2 weeks,1 Monat:1 month,3 Monate:3 months,1 Jahr:1 year,Unbeschränkt:infinite',
 'ipbotheroption'              => 'Andere Dauer',
-'ipbotherreason'              => 'Andere/ergänzende Begründung',
+'ipbotherreason'              => 'Andere/ergänzende Begründung:',
 'ipbhidename'                => 'Benutzername/IP-Adresse im Sperr-Logbuch, der Liste aktiver Sperren und dem Benutzerverzeichnis verstecken.',
 'badipaddress'                => 'Die IP-Adresse hat ein falsches Format.',
 'blockipsuccesssub'           => 'Sperre erfolgreich',
index 1036a53..40b22d3 100644 (file)
@@ -1963,10 +1963,10 @@ This should be done only to prevent vandalism, and in
 accordance with [[{{MediaWiki:policy-url}}|policy]].
 Fill in a specific reason below (for example, citing particular
 pages that were vandalized).",
-'ipaddress'            => 'IP Address',
-'ipadressorusername' => 'IP Address or username',
-'ipbexpiry'            => 'Expiry',
-'ipbreason'            => 'Reason',
+'ipaddress'            => 'IP Address:',
+'ipadressorusername' => 'IP Address or username:',
+'ipbexpiry'            => 'Expiry:',
+'ipbreason'            => 'Reason:',
 'ipbreasonotherlist'    => 'Other reason',
 
 // These are examples only. They can be translated but should be adjusted via
@@ -1988,10 +1988,10 @@ pages that were vandalized).",
 'ipbcreateaccount' => 'Prevent account creation',
 'ipbenableautoblock' => 'Automatically block the last IP address used by this user, and any subsequent IPs they try to edit from',
 'ipbsubmit'            => 'Block this user',
-'ipbother'             => 'Other time',
+'ipbother'             => 'Other time:',
 'ipboptions'           => '2 hours:2 hours,1 day:1 day,3 days:3 days,1 week:1 week,2 weeks:2 weeks,1 month:1 month,3 months:3 months,6 months:6 months,1 year:1 year,infinite:infinite',
 'ipbotheroption'       => 'other',
-'ipbotherreason'        => 'Other/additional reason',
+'ipbotherreason'        => 'Other/additional reason:',
 'ipbhidename'          => 'Hide username/IP from the block log, active block list and user list',
 'badipaddress' => 'Invalid IP address',
 'blockipsuccesssub' => 'Block succeeded',