r88795 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88794‎ | r88795 | r88796 >
Date:15:19, 25 May 2011
Author:mah
Status:ok (Comments)
Tags:
Comment:
Fixes Bug #29133: “Special:PasswordReset button text not i18n-able” by
adding the alterForm() method to set the submit button text.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialPasswordReset.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialPasswordReset.php
@@ -76,6 +76,10 @@
7777 return $a;
7878 }
7979
 80+ public function alterForm( HTMLForm $form ) {
 81+ $form->setSubmitText( wfMessage( "mailmypassword" ) );
 82+ }
 83+
8084 protected function preText() {
8185 global $wgPasswordResetRoutes;
8286 $i = 0;

Comments

#Comment by Wikinaut (talk | contribs)   20:59, 25 May 2011

checked and tested this with several languages (ok) in trunk version (works) I did not know, that this fix was so easy.

#Comment by MarkAHershberger (talk | contribs)   21:09, 25 May 2011

Most i18n fixes like this are easy. There should probably be a bit more done here, now that I think about it.

Adding 3 lines of code did take a while, though, since I hadn't touched HTMLForm till now.

Status & tagging log