Index: trunk/extensions/WikimediaIncubator/SpecialViewUserLang.php |
— | — | @@ -51,28 +51,18 @@ |
52 | 52 | */ |
53 | 53 | function showForm( $target ) { |
54 | 54 | global $wgScript, $wgOut; |
55 | | - $title = htmlspecialchars( $this->getTitle()->getPrefixedText() ); |
56 | | - $action = htmlspecialchars( $wgScript ); |
57 | | - $target = htmlspecialchars( $target ); |
58 | | - $ok = wfMsgHtml( 'wminc-viewuserlang-go' ); |
59 | | - $username = wfMsgHtml( 'wminc-viewuserlang-user' ); |
60 | | - $inputformtop = wfMsgHtml( 'wminc-viewuserlang' ); |
61 | 55 | |
62 | | - $wgOut->addHTML( <<<EOT |
63 | | -<fieldset> |
64 | | -<legend>$inputformtop</legend> |
65 | | -<form method="get" action="$action"> |
66 | | -<input type="hidden" name="title" value="{$title}" /> |
67 | | -<table border="0"> |
68 | | -<tr> |
69 | | -<td align="right">$username</td> |
70 | | -<td align="left"><input type="text" size="50" name="target" value="$target" /> |
71 | | -<td colspan="2" align="center"><input type="submit" name="submit" value="$ok" /></td> |
72 | | -</tr> |
73 | | -</table> |
74 | | -</form> |
75 | | -</fieldset> |
76 | | -EOT |
| 56 | + $wgOut->addHTML( |
| 57 | + Xml::fieldset( wfMsg( 'wminc-viewuserlang' ) ) . |
| 58 | + Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . |
| 59 | + Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . |
| 60 | + "<p>" . |
| 61 | + Xml::inputLabel( wfMsg( 'wminc-viewuserlang-user' ), 'target', 'viewuserlang-username', 40, $target ) . |
| 62 | + ' ' . |
| 63 | + Xml::submitButton( wfMsg( 'wminc-viewuserlang-go' ) ) . |
| 64 | + "</p>" . |
| 65 | + Xml::closeElement( 'form' ) . |
| 66 | + Xml::closeElement( 'fieldset' ) |
77 | 67 | ); |
78 | 68 | } |
79 | 69 | |
— | — | @@ -85,7 +75,7 @@ |
86 | 76 | $user = User::newFromName( $target ); |
87 | 77 | $langNames = Language::getLanguageNames(); |
88 | 78 | if ( $user == null || $user->getId() == 0 ) { |
89 | | - $wgOut->addWikiText( '<span class="error">' . wfMsgNoTrans( 'wminc-viewuserlang-unexisting', $target ) . '</span>' ); |
| 79 | + $wgOut->addWikiText( '<span class="error">' . wfMsgNoTrans( 'wminc-userdoesnotexist', $target ) . '</span>' ); |
90 | 80 | } else { |
91 | 81 | $name = $user->getName(); |
92 | 82 | $wgOut->addWikiText( '*' . wfMsg( 'username' ) . ' [[User:' . $name . '|' . $name . ']] (' . |
Index: trunk/extensions/WikimediaIncubator/WikimediaIncubator.i18n.php |
— | — | @@ -15,6 +15,7 @@ |
16 | 16 | 'wminc-viewuserlang' => 'Look up user language and test wiki', |
17 | 17 | 'wminc-viewuserlang-user' => 'Username:', |
18 | 18 | 'wminc-viewuserlang-go' => 'Go', |
| 19 | + 'wminc-userdoesnotexist' => 'The user "$1" does not exist.', |
19 | 20 | 'wminc-testwiki' => 'Test wiki:', |
20 | 21 | 'wminc-testwiki-none' => 'None/All', |
21 | 22 | 'wminc-prefinfo-language' => 'Your interface language - independent from your test wiki', |