From 7883f857247de404508c825b76c2668470c7736d Mon Sep 17 00:00:00 2001 From: Victor Vasiliev Date: Sun, 11 Nov 2007 12:27:40 +0000 Subject: [PATCH] * Add special page for getting random page from category --- RELEASE-NOTES | 1 + includes/AutoLoader.php | 3 ++- includes/SpecialPage.php | 1 + languages/messages/MessagesEn.php | 16 ++++++++++------ languages/messages/MessagesRu.php | 16 ++++++++++------ maintenance/language/messages.inc | 6 ++++++ 6 files changed, 30 insertions(+), 13 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 0c44a7cde0..1891782ed5 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -57,6 +57,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * OutputPage::getRedirect public method added. * (bug 11848) Allow URL parameters 'editintro' and 'preload' in Special:Mypage and Special:Mytalk +* Add special page for getting random page from category === Bug fixes in 1.12 === diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 10709378d7..e1930c325b 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -206,6 +206,8 @@ function __autoload($className) { 'PopularPagesPage' => 'includes/SpecialPopularpages.php', 'PreferencesForm' => 'includes/SpecialPreferences.php', 'SpecialPrefixindex' => 'includes/SpecialPrefixindex.php', + 'RandomPage' => 'includes/SpecialRandompage.php', + 'RandomPageInCategory' => 'includes/SpecialRandomincategory.php', 'PasswordResetForm' => 'includes/SpecialResetpass.php', 'RevisionDeleteForm' => 'includes/SpecialRevisiondelete.php', 'RevisionDeleter' => 'includes/SpecialRevisiondelete.php', @@ -290,7 +292,6 @@ function __autoload($className) { # Languages 'Language' => 'languages/Language.php', - 'RandomPage' => 'includes/SpecialRandompage.php', # API 'ApiBase' => 'includes/api/ApiBase.php', diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index 3932964df1..b5820034ba 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -90,6 +90,7 @@ class SpecialPage 'Listusers' => array( 'SpecialPage', 'Listusers' ), 'Statistics' => array( 'SpecialPage', 'Statistics' ), 'Randompage' => array( 'SpecialPage', 'Randompage' ), + 'Randomincategory' => array( 'SpecialPage', 'Randomincategory' ), 'Lonelypages' => array( 'SpecialPage', 'Lonelypages' ), 'Uncategorizedpages' => array( 'SpecialPage', 'Uncategorizedpages' ), 'Uncategorizedcategories' => array( 'SpecialPage', 'Uncategorizedcategories' ), diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index a3bbdb0383..49093b7461 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1550,9 +1550,16 @@ PICT # misc. 'unusedtemplatestext' => 'This page lists all pages in the template namespace which are not included in another page. Remember to check for other links to the templates before deleting them.', 'unusedtemplateswlh' => 'other links', -# Random redirect -'randomredirect' => 'Random redirect', -'randomredirect-nopages' => 'There are no redirects in this namespace.', +# Random pages +'randompage' => 'Random page', +'randompage-nopages' => 'There are no pages in this namespace.', +'randompage-url' => 'Special:Random', # don't translate or duplicate this message to other languages +'randomincategory' => 'Random page in category', +'randomincategory-nocategory' => 'Category $1 doesn\'t exist or is empty', +'randomincategory-label' => 'Category:', +'randomincategory-submit' => 'Go', +'randomredirect' => 'Random redirect', +'randomredirect-nopages' => 'There are no redirects in this namespace.', # Statistics 'statistics' => 'Statistics', @@ -1641,9 +1648,6 @@ The [http://meta.wikimedia.org/wiki/Help:Job_queue job queue] length is '''$7''' 'allpages-summary' => '', # only translate this message to other languages if you have to change it 'prefixindex' => 'Prefix index', 'prefixindex-summary' => '', # only translate this message to other languages if you have to change it -'randompage' => 'Random page', -'randompage-nopages' => 'There are no pages in this namespace.', -'randompage-url' => 'Special:Random', # don't translate or duplicate this message to other languages 'shortpages' => 'Short pages', 'shortpages-summary' => '', # only translate this message to other languages if you have to change it 'longpages' => 'Long pages', diff --git a/languages/messages/MessagesRu.php b/languages/messages/MessagesRu.php index 2dd4161283..250cbf3fd0 100644 --- a/languages/messages/MessagesRu.php +++ b/languages/messages/MessagesRu.php @@ -6,7 +6,7 @@ * * Maintainer: Alexander Sigachov (alexander.sigachov@gmail.com) * - * Изменения сделанные в этом файле будут потеряны при обновлении движка. + * Изменения сделанные в этом файле будут потеряны при обновлении MediaWiki. * * Если необходимо внести изменения в перевод отдельных строк интерфейса, * сделайте это посредством редактирования страниц вида «MediaWiki:*». @@ -1212,9 +1212,15 @@ $3 указал следующую причину: ''$2''", 'unusedtemplatestext' => 'На этой странице перечислены все страницы пространства имён «Шаблоны», которые не включены в другие страницы. Не забывайте проверить отсутствие других ссылок на шаблон, перед его удалением.', 'unusedtemplateswlh' => 'другие ссылки', -# Random redirect -'randomredirect' => 'Случайное перенаправление', -'randomredirect-nopages' => 'В данном пространстве имён нет пренаправлений.', +# Random pages +'randompage' => 'Случайная страница', +'randompage-nopages' => 'В данном пространстве имён отсутствуют страницы.', +'randomincategory' => 'Случайная страница в категории', +'randomincategory-nocategory' => 'Категория "$1" пуста или не существует', +'randomincategory-label' => 'Категория:', +'randomincategory-submit' => 'Перейти', +'randomredirect-nopages' => 'В данном пространстве имён нет перенаправлений.', +'randomredirect' => 'Случайное перенаправление', # Statistics 'statistics' => 'Статистика', @@ -1276,8 +1282,6 @@ $3 указал следующую причину: ''$2''", 'mostrevisions' => 'Наиболее часто редактировавшиеся страницы', 'allpages' => 'Все страницы', 'prefixindex' => 'Указатель по началу слов', -'randompage' => 'Случайная статья', -'randompage-nopages' => 'В данном пространстве имён отсутствуют страницы.', 'shortpages' => 'Короткие статьи', 'longpages' => 'Длинные страницы', 'deadendpages' => 'Тупиковые страницы', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 011fa2df23..26269affb8 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -943,6 +943,12 @@ $wgMessageStructure = array( 'unusedtemplatestext', 'unusedtemplateswlh', ), + 'randomincategory' => array( + 'randomincategory', + 'randomincategory-nocategory', + 'randomincategory-label', + 'randomincategory-submit', + ), 'randomredirect' => array( 'randomredirect', 'randomredirect-nopages', -- 2.20.1