From 2239e493bbcdbcbbff18014c40eb1acf3bd0b2b4 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Mon, 8 Jun 2015 20:17:42 +0100 Subject: [PATCH] i18nize [[Special:RandomInCategory]] submit button 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 | 4 ++++ languages/i18n/en.json | 1 + languages/i18n/qqq.json | 1 + 3 files changed, 6 insertions(+) diff --git a/includes/specials/SpecialRandomInCategory.php b/includes/specials/SpecialRandomInCategory.php index b5c9e19ae7..e21eaebbfe 100644 --- a/includes/specials/SpecialRandomInCategory.php +++ b/includes/specials/SpecialRandomInCategory.php @@ -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 ) ); diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 2a22479706..3a47bceca7 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1575,6 +1575,7 @@ "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", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 777c7f1a76..915e17504c 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1745,6 +1745,7 @@ "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}}", -- 2.20.1