jenkins-bot has submitted this change and it was merged.
Change subject: Rename SpecialPage to AboutTopic
......................................................................
Rename SpecialPage to AboutTopic
Bug: T115020
Change-Id: I50a95d9082e399132429e0e918bfffb76958d49b
---
M ArticlePlaceholder.alias.php
M ArticlePlaceholder.php
R Specials/SpecialAboutTopic.php
M i18n/de.json
M i18n/en.json
M i18n/qqq.json
M i18n/zh-hans.json
M includes/Lua/EntityRenderer.lua
M includes/SearchHookHandler.php
R includes/Template/aboutTopic-template-module.xml
M modules/ext.articleplaceholder.createArticle.js
11 files changed, 79 insertions(+), 85 deletions(-)
Approvals:
Thiemo Mättig (WMDE): Looks good to me, approved
jenkins-bot: Verified
Objections:
Siebrand: There's a problem with this change, please improve
diff --git a/ArticlePlaceholder.alias.php b/ArticlePlaceholder.alias.php
index 124d871..42e7a35 100644
--- a/ArticlePlaceholder.alias.php
+++ b/ArticlePlaceholder.alias.php
@@ -11,5 +11,5 @@
/** English (English) */
$specialPageAliases['en'] = array(
- 'FancyUnicorn' => array( 'FancyUnicorn' ),
+ 'AboutTopic' => array( 'AboutTopic', 'FancyUnicorn' ),
);
diff --git a/ArticlePlaceholder.php b/ArticlePlaceholder.php
index a202960..3101aae 100644
--- a/ArticlePlaceholder.php
+++ b/ArticlePlaceholder.php
@@ -24,7 +24,7 @@
$dir = dirname( __FILE__ );
$dirbasename = basename( $dir );
-$wgAutoloadClasses['ArticlePlaceholder\Specials\SpecialFancyUnicorn'] = $dir .
'/Specials/SpecialFancyUnicorn.php';
+$wgAutoloadClasses['ArticlePlaceholder\Specials\SpecialAboutTopic'] = $dir .
'/Specials/SpecialAboutTopic.php';
$wgAutoloadClasses['ArticlePlaceholder\Hooks'] = __DIR__ .
'/includes/Hooks.php';
$wgAutoloadClasses['ArticlePlaceholder\SearchHookHandler'] = __DIR__ .
'/includes/SearchHookHandler.php';
$wgHooks['ScribuntoExternalLibraryPaths'][] =
'\ArticlePlaceholder\Hooks::registerScribuntoExternalLibraryPaths';
@@ -33,8 +33,8 @@
$wgMessagesDirs['ArticlePlaceholder'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['ArticlePlaceholderAliases'] = __DIR__ .
'/ArticlePlaceholder.alias.php';
-$wgSpecialPages['FancyUnicorn'] = array(
- 'ArticlePlaceholder\Specials\SpecialFancyUnicorn',
+$wgSpecialPages['AboutTopic'] = array(
+ 'ArticlePlaceholder\Specials\SpecialAboutTopic',
'newFromGlobalState'
);
@@ -53,8 +53,8 @@
'localBasePath' => __DIR__ . '/modules',
'remoteExtPath' => '..' . $remoteExtPath[0],
'messages' => array(
- 'articleplaceholder-fancyunicorn-create-article',
- 'articleplaceholder-fancyunicorn-article-exists-error',
- 'articleplaceholder-fancyunicorn-create-article-submit-button'
+ 'articleplaceholder-abouttopic-create-article',
+ 'articleplaceholder-abouttopic-article-exists-error',
+ 'articleplaceholder-abouttopic-create-article-submit-button'
)
);
diff --git a/Specials/SpecialFancyUnicorn.php b/Specials/SpecialAboutTopic.php
similarity index 90%
rename from Specials/SpecialFancyUnicorn.php
rename to Specials/SpecialAboutTopic.php
index 994fc6b..3e1818f 100644
--- a/Specials/SpecialFancyUnicorn.php
+++ b/Specials/SpecialAboutTopic.php
@@ -1,7 +1,7 @@
<?php
/**
- * The FancyUnicorn SpecialPage for the ArticlePlaceholder extension
+ * The AboutTopic SpecialPage for the ArticlePlaceholder extension
*
* @ingroup Extensions
* @author Lucie-Aimée Kaffee
@@ -25,7 +25,7 @@
use SpecialPage;
use OOUI;
-class SpecialFancyUnicorn extends SpecialPage {
+class SpecialAboutTopic extends SpecialPage {
public static function newFromGlobalState() {
$wikibaseClient = WikibaseClient::getDefaultInstance();
@@ -95,14 +95,14 @@
$this->siteGlobalID = $siteGlobalID;
$this->entityLookup = $entityLookup;
- parent::__construct( 'FancyUnicorn' );
+ parent::__construct( 'AboutTopic' );
}
/**
* @param string $sub
*/
public function execute( $sub ) {
- $this->getOutput()->setPageTitle( $this->msg(
'articleplaceholder-fancyunicorn' ) );
+ $this->getOutput()->setPageTitle( $this->msg(
'articleplaceholder-abouttopic' ) );
$this->showContent($sub);
}
@@ -146,8 +146,8 @@
array(
'method' => 'get',
'action' =>
$this->getPageTitle()->getFullUrl(),
- 'name' => 'ap-fancyunicorn',
- 'id' => 'ap-fancyunicorn-form1',
+ 'name' => 'ap-abouttopic',
+ 'id' => 'ap-abouttopic-form1',
'class' => 'ap-form'
)
)
@@ -160,7 +160,7 @@
$this->getOutput()->addHTML(
Html::input(
'submit',
- $this->msg(
'articleplaceholder-fancyunicorn-submit' )->text(),
+ $this->msg(
'articleplaceholder-abouttopic-submit' )->text(),
'submit',
array( 'id' => 'submit' )
)
@@ -179,16 +179,16 @@
return Html::rawElement(
'p',
array(),
- $this->msg( 'articleplaceholder-fancyunicorn-intro'
)->parse()
+ $this->msg( 'articleplaceholder-abouttopic-intro'
)->parse()
)
. Html::element( 'br' )
. Html::element(
'label',
array(
- 'for' => 'ap-fancyunicorn-entityid',
+ 'for' => 'ap-abouttopic-entityid',
'class' => 'ap-label'
),
- $this->msg( 'articleplaceholder-fancyunicorn-entityid'
)->text()
+ $this->msg( 'articleplaceholder-abouttopic-entityid'
)->text()
)
. Html::element( 'br' )
. Html::input(
@@ -196,7 +196,7 @@
$this->getRequest()->getVal( 'entityid' ),
'text', array(
'class' => 'ap-input',
- 'id' => 'ap-fancyunicorn-entityid'
+ 'id' => 'ap-abouttopic-entityid'
)
)
. Html::element( 'br' );
@@ -239,7 +239,7 @@
* @param ItemId $entityId
*/
private function showPlaceholder( ItemId $entityId ) {
- $this->getOutput()->addWikiText( "{{fancyUnicorn|" .
$entityId->getSerialization() . "}}" );
+ $this->getOutput()->addWikiText( "{{aboutTopic|" .
$entityId->getSerialization() . "}}" );
$label = $this->getLabel( $entityId );
$this->showTitle( $label );
$this->showCreateArticle( $label );
@@ -256,7 +256,7 @@
$button = new OOUI\ButtonWidget( array(
'id' => 'create-article-button',
'infusable' => true,
- 'label' => $this->msg(
'articleplaceholder-fancyunicorn-create-article-button' )->text(),
+ 'label' => $this->msg(
'articleplaceholder-abouttopic-create-article-button' )->text(),
'target' => 'blank'
) );
diff --git a/i18n/de.json b/i18n/de.json
index c8d2780..64250f2 100644
--- a/i18n/de.json
+++ b/i18n/de.json
@@ -4,7 +4,6 @@
"Metalhead64"
]
},
- "fancyunicorn": "Schickes Einhorn",
"articleplaceholder-desc": "Ergänzt eine Spezialseite mit
{{WBREPONAME}}-Informationen über ein bestimmtes Thema mit einer Einladung zum
Erstellen eines Artikels zum Thema",
"articleplaceholder-fancyunicorn": "Schickes Einhorn",
"articleplaceholder-fancyunicorn-intro": "Dies ist die Spezialseite
„Schickes Einhorn“ der Erweiterung „ArticlePlaceholder“. Sehr schick, sehr
Einhorn (so aufregend).",
diff --git a/i18n/en.json b/i18n/en.json
index 2ae3cee..20de4a2 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -4,20 +4,19 @@
"Lucie-Aimée Kaffee"
]
},
- "fancyunicorn": "fancyunicorn",
"articleplaceholder-desc": "Provides a special page with {{WBREPONAME}}
information about a certain topic, with invitation to create an article for the
topic",
- "articleplaceholder-fancyunicorn": "Fancy Unicorn",
- "articleplaceholder-fancyunicorn-intro": "This is the SpecialPage Fancy
Unicorn of the ArticlePlaceholder extension. Much fancy, very unicorn. (so
exciting)",
- "articleplaceholder-fancyunicorn-entityid": "Enter a entity ID to get a
auto generated Article Placeholder.",
- "articleplaceholder-fancyunicorn-submit": "craft",
- "articleplaceholder-fancyunicorn-no-entity-error": "This is not a valid
entity id.",
- "articleplaceholder-fancyunicorn-create-article": "Create a new article
with the title",
- "articleplaceholder-fancyunicorn-create-article-button": "Create an
article",
- "articleplaceholder-fancyunicorn-create-article-submit-button":
"Submit",
- "articleplaceholder-fancyunicorn-article-exists-error": "An article
with this name already exists",
- "articleplaceholder-fancyunicorn-lua-entity": "Entity",
- "articleplaceholder-fancyunicorn-lua-description": "Description:",
- "articleplaceholder-fancyunicorn-lua-reference": "Reference",
- "articleplaceholder-fancyunicorn-lua-qualifier": "Qualifier",
+ "articleplaceholder-abouttopic": "About Topic",
+ "articleplaceholder-abouttopic-intro": "This special page generates a
content page about a certain topic with {{WBREPONAME}} information",
+ "articleplaceholder-abouttopic-entityid": "Enter an entity id to get an
auto-generated article placeholder.",
+ "articleplaceholder-abouttopic-submit": "craft",
+ "articleplaceholder-abouttopic-no-entity-error": "This is not a valid
entity id.",
+ "articleplaceholder-abouttopic-create-article": "Create a new article
with the title",
+ "articleplaceholder-abouttopic-create-article-button": "Create an
article",
+ "articleplaceholder-abouttopic-create-article-submit-button": "Submit",
+ "articleplaceholder-abouttopic-article-exists-error": "An article with
this name already exists",
+ "articleplaceholder-abouttopic-lua-entity": "Entity",
+ "articleplaceholder-abouttopic-lua-description": "Description:",
+ "articleplaceholder-abouttopic-lua-reference": "Reference",
+ "articleplaceholder-abouttopic-lua-qualifier": "Qualifier",
"articleplaceholder-search-header": "Discover data on the topic"
}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index c84cf39..42d576d 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -5,20 +5,19 @@
"Liuxinyu970226"
]
},
- "fancyunicorn": "{{doc-special|fancyunicorn}}",
"articleplaceholder-desc":
"{{desc|what=extension|name=ArticlePlaceholder|url=https://www.mediawiki.org/wiki/Extension:ArticlePlaceholder}}",
- "articleplaceholder-fancyunicorn": "Title of SpecialFancyUnicorn.",
- "articleplaceholder-fancyunicorn-intro": "Intro paragraph shown on
SpecialFancyUnicorn.",
- "articleplaceholder-fancyunicorn-entityid": "Text to encourage the user
to enter an entity id.",
- "articleplaceholder-fancyunicorn-submit": "Label on the submit
button.\n{{Identical|Craft}}",
- "articleplaceholder-fancyunicorn-no-entity-error": "Error message in
case of a unvalid entity id.",
- "articleplaceholder-fancyunicorn-create-article": "Text in the popup
encouraging the user to create an article with a selectable title",
- "articleplaceholder-fancyunicorn-create-article-button": "Label on
create article button",
- "articleplaceholder-fancyunicorn-create-article-submit-button": "Label
on submit button\n{{Identical|Submit}}",
- "articleplaceholder-fancyunicorn-article-exists-error": "Error to
indicate the given article title already exists",
- "articleplaceholder-fancyunicorn-lua-entity": "Header of the entity
section\n{{Identical|Entity}}",
- "articleplaceholder-fancyunicorn-lua-description": "Word before the
description string\n{{Identical|Description}}",
- "articleplaceholder-fancyunicorn-lua-reference": "Header of the
reference section\n{{Identical|Reference}}",
- "articleplaceholder-fancyunicorn-lua-qualifier": "Header of the
qualifier section\n{{identical|Qualifier}}",
- "articleplaceholder-search-header": "Header in the search for the
results of Special:FancyUnicorn generated pages"
+ "articleplaceholder-abouttopic": "Title of Special:AboutTopic.",
+ "articleplaceholder-abouttopic-intro": "Intro paragraph shown on
Special:AboutTopic.",
+ "articleplaceholder-abouttopic-entityid": "Text to encourage the user
to enter an entity id.",
+ "articleplaceholder-abouttopic-submit": "Label on the submit
button.\n{{Identical|Craft}}",
+ "articleplaceholder-abouttopic-no-entity-error": "Error message in case
of an invalid entity id.",
+ "articleplaceholder-abouttopic-create-article": "Text in the popup
encouraging the user to create an article with a selectable title",
+ "articleplaceholder-abouttopic-create-article-button": "Label on create
article button",
+ "articleplaceholder-abouttopic-create-article-submit-button": "Label on
submit button\n{{Identical|Submit}}",
+ "articleplaceholder-abouttopic-article-exists-error": "Error to
indicate the given article title already exists",
+ "articleplaceholder-abouttopic-lua-entity": "Header of the entity
section\n{{Identical|Entity}}",
+ "articleplaceholder-abouttopic-lua-description": "Word before the
description string\n{{Identical|Description}}",
+ "articleplaceholder-abouttopic-lua-reference": "Header of the reference
section\n{{Identical|Reference}}",
+ "articleplaceholder-abouttopic-lua-qualifier": "Header of the qualifier
section\n{{Identical|Qualifier}}",
+ "articleplaceholder-search-header": "Header in the search for the
results of Special:AboutTopic generated pages"
}
diff --git a/i18n/zh-hans.json b/i18n/zh-hans.json
index 9c96adb..24f7a7a 100644
--- a/i18n/zh-hans.json
+++ b/i18n/zh-hans.json
@@ -4,7 +4,6 @@
"Liuxinyu970226"
]
},
- "fancyunicorn": "fancyunicorn",
"articleplaceholder-desc":
"提供包含有关特定主题的{{WBREPONAME}}信息的特殊页面,并带有邀请为主题创建条目的功能",
"articleplaceholder-fancyunicorn": "Fancy Unicorn",
"articleplaceholder-fancyunicorn-intro":
"这是ArticlePlaceholder扩展的特殊页面Fancy Unicorn。很花哨,超独特。(如此令人兴奋)",
diff --git a/includes/Lua/EntityRenderer.lua b/includes/Lua/EntityRenderer.lua
index f2ceb99..32c38ba 100644
--- a/includes/Lua/EntityRenderer.lua
+++ b/includes/Lua/EntityRenderer.lua
@@ -43,7 +43,7 @@
local referenceRenderer = function( referenceSnak )
local result = ""
if referenceSnak ~= nil then
- result = result .. "<h4>" .. mw.message.new(
'articleplaceholder-fancyunicorn-lua-reference' ):plain() .. "</h4>"
+ result = result .. "<h4>" .. mw.message.new(
'articleplaceholder-abouttopic-lua-reference' ):plain() .. "</h4>"
local i = 1
while referenceSnak[i] do
for k, v in pairs( referenceSnak[i]['snaks'] ) do
@@ -62,7 +62,7 @@
local qualifierRenderer = function( qualifierSnak )
local result = ""
if qualifierSnak ~= nil then
- result = result .. "<h4>" .. mw.message.new(
'articleplaceholder-fancyunicorn-lua-qualifier' ):plain() .. "</h4>"
+ result = result .. "<h4>" .. mw.message.new(
'articleplaceholder-abouttopic-lua-qualifier' ):plain() .. "</h4>"
for key, value in pairs(qualifierSnak) do
result = result .. "<p><b>" .. labelRenderer( key ) .. "</b>: "
result = result .. snaksRenderer( value ) .. "</p>"
@@ -185,11 +185,11 @@
result = result .. "__NOTOC__"
if description ~= nil then
- result = result .. mw.message.new(
'articleplaceholder-fancyunicorn-lua-description' ):plain() .. description
+ result = result .. mw.message.new(
'articleplaceholder-abouttopic-lua-description' ):plain() .. description
end
result = result .. image
if entityResult ~= "" then
- result = result .. "<h1>" .. mw.message.new(
'articleplaceholder-fancyunicorn-lua-entity' ):plain() .. "</h1>" ..
entityResult
+ result = result .. "<h1>" .. mw.message.new(
'articleplaceholder-abouttopic-lua-entity' ):plain() .. "</h1>" .. entityResult
end
return result
diff --git a/includes/SearchHookHandler.php b/includes/SearchHookHandler.php
index 0f557b2..078875f 100644
--- a/includes/SearchHookHandler.php
+++ b/includes/SearchHookHandler.php
@@ -102,7 +102,7 @@
*/
private function getSearchResults( $term ) {
$searchResults = $this->searchEntities( $term );
- $link = 'Special:FancyUnicorn/';
+ $link = 'Special:AboutTopic/';
$wikitext = null;
foreach ( $searchResults as $searchResult ) {
$wikitext .= '<div
class="article-placeholder-searchResult">'
diff --git a/includes/Template/fancy-lua.xml
b/includes/Template/aboutTopic-template-module.xml
similarity index 78%
rename from includes/Template/fancy-lua.xml
rename to includes/Template/aboutTopic-template-module.xml
index c5d3971..afc2477 100644
--- a/includes/Template/fancy-lua.xml
+++ b/includes/Template/aboutTopic-template-module.xml
@@ -3,7 +3,7 @@
<sitename>hey-hey-wiki</sitename>
<dbname>my_wiki</dbname>
<base>http://localhost/core/index.php/Main_Page</base>
- <generator>MediaWiki 1.26alpha</generator>
+ <generator>MediaWiki 1.27alpha</generator>
<case>first-letter</case>
<namespaces>
<namespace key="-2" case="first-letter">Media</namespace>
@@ -33,35 +33,16 @@
</namespaces>
</siteinfo>
<page>
- <title>Template:FancyUnicorn</title>
- <ns>10</ns>
- <id>17</id>
- <revision>
- <id>192</id>
- <parentid>190</parentid>
- <timestamp>2015-08-20T16:36:46Z</timestamp>
- <contributor>
- <ip>127.0.0.1</ip>
- </contributor>
- <model>wikitext</model>
- <format>text/x-wiki</format>
- <text xml:space="preserve" bytes="43">
-
-{{#invoke:FancyUnicorn|showData|{{{1}}}}}</text>
- <sha1>aj7tq9d2ompl5v5c0c7iil61fw4wiyz</sha1>
- </revision>
- </page>
- <page>
- <title>Module:FancyUnicorn</title>
+ <title>Module:AboutTopic</title>
<ns>828</ns>
- <id>18</id>
+ <id>31</id>
<revision>
- <id>272</id>
- <parentid>271</parentid>
- <timestamp>2015-09-17T16:18:39Z</timestamp>
+ <id>301</id>
+ <timestamp>2015-10-30T23:00:23Z</timestamp>
<contributor>
<ip>127.0.0.1</ip>
</contributor>
+ <comment>Created page with "local p = {} -- get the label of the
local entity p.showData = function(frame) entityRenderer = require(
'EntityRenderer' ) return entityRenderer.render( frame ) end return
p"</comment>
<model>Scribunto</model>
<format>text/plain</format>
<text xml:space="preserve" bytes="178">local p = {}
@@ -76,4 +57,21 @@
<sha1>raik6wqlcskycfu1y3hntowu9vyuu90</sha1>
</revision>
</page>
-</mediawiki>
+ <page>
+ <title>Template:AboutTopic</title>
+ <ns>10</ns>
+ <id>30</id>
+ <revision>
+ <id>300</id>
+ <timestamp>2015-10-30T23:00:03Z</timestamp>
+ <contributor>
+ <ip>127.0.0.1</ip>
+ </contributor>
+ <comment>Created page with
"{{#invoke:AboutTopic|showData|{{{1}}}}}"</comment>
+ <model>wikitext</model>
+ <format>text/x-wiki</format>
+ <text xml:space="preserve"
bytes="41">{{#invoke:AboutTopic|showData|{{{1}}}}}</text>
+ <sha1>hcui95310erytbs0eelk13obdz9xoga</sha1>
+ </revision>
+ </page>
+</mediawiki>
\ No newline at end of file
diff --git a/modules/ext.articleplaceholder.createArticle.js
b/modules/ext.articleplaceholder.createArticle.js
index b50bfdd..e755db7 100644
--- a/modules/ext.articleplaceholder.createArticle.js
+++ b/modules/ext.articleplaceholder.createArticle.js
@@ -29,7 +29,7 @@
document.location.href = link;
} else {
$( '#mw-article-placeholder-error' ).append(
- '<p>' + mw.message(
'articleplaceholder-fancyunicorn-article-exists-error' ).escaped() + '</p>'
+ '<p>' + mw.message(
'articleplaceholder-abouttopic-article-exists-error' ).escaped() + '</p>'
);
}
} );
@@ -51,10 +51,10 @@
} );
submitButton = new OO.ui.ButtonWidget( {
- label: mw.message(
'articleplaceholder-fancyunicorn-create-article-submit-button' ).text()
+ label: mw.message(
'articleplaceholder-abouttopic-create-article-submit-button' ).text()
} );
- dialogContent = $( '<p>' + mw.message(
'articleplaceholder-fancyunicorn-create-article' ).escaped() + '</p>' );
+ dialogContent = $( '<p>' + mw.message(
'articleplaceholder-abouttopic-create-article' ).escaped() + '</p>' );
dialogContent.append( titleInput.$element );
dialogContent.append( submitButton.$element );
dialogContent.append( '<div
id="mw-article-placeholder-error"></div>' );
--
To view, visit https://gerrit.wikimedia.org/r/250158
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I50a95d9082e399132429e0e918bfffb76958d49b
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/ArticlePlaceholder
Gerrit-Branch: master
Gerrit-Owner: Lucie Kaffee <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: Lucie Kaffee <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits