i18nize [[Special:RandomInCategory]] submit button
authorDouglas Gardner <douglas@chippy.ch>
Mon, 8 Jun 2015 19:17:42 +0000 (20:17 +0100)
committerUmherirrender <umherirrender_de.wp@web.de>
Sun, 5 Jul 2015 17:45:01 +0000 (17:45 +0000)
This commit fixes a regression caused by an earlier refactor of the
Special:RandomInCategory page, which introduced message reuse. This
commit splits the message again.

Bug: T101717
Change-Id: Iabfe172b2e1d8464262b244337789bca388460f8

includes/specials/SpecialRandomInCategory.php
languages/i18n/en.json
languages/i18n/qqq.json

index b5c9e19..e21eaeb 100644 (file)
@@ -89,6 +89,10 @@ class SpecialRandomInCategory extends FormSpecialPage {
                return false;
        }
 
+       protected function alterForm( HTMLForm $form ) {
+               $form->setSubmitTextMsg( 'randomincategory-submit' );
+       }
+
        protected function setParameter( $par ) {
                // if subpage present, fake form submission
                $this->onSubmit( array( 'category' => $par ) );
index 2a22479..3a47bce 100644 (file)
        "randomincategory-nopages": "There are no pages in the [[:Category:$1|$1]] category.",
        "randomincategory-category": "Category:",
        "randomincategory-legend": "Random page in category",
+       "randomincategory-submit": "Go",
        "randomredirect": "Random redirect",
        "randomredirect-nopages": "There are no redirects in the namespace \"$1\".",
        "statistics": "Statistics",
index 777c7f1..915e175 100644 (file)
        "randomincategory-nopages": "Message shown from [[Special:RandomInCategory]] if the category is empty.\n\nParameters:\n* $1 - the category name (without the namespace prefix)",
        "randomincategory-category": "Shown on [[Special:RandomInCategory]] as a label for a text box allowing the user to input a category name.\n{{Identical|Category}}",
        "randomincategory-legend": "Used as fieldset label for the form on [[Special:RandomInCategory]].",
+       "randomincategory-submit": "Used as label for the Submit button on [[Special:RandomInCategory]].\n{{Identical|Go}}",
        "randomredirect": "{{doc-special|RandomRedirect}}",
        "randomredirect-nopages": "Parameters:\n* $1 - list of namespaces\n* $2 - (Unused) number of namespaces\nSee also:\n* {{msg-mw|Randompage-nopages}}",
        "statistics": "{{doc-special|Statistics}}\n{{Identical|Statistics}}",