Daniel Kinzler has submitted this change and it was merged.
Change subject: Rename CreateEntity and CreateItem to NewEntity and NewItem
......................................................................
Rename CreateEntity and CreateItem to NewEntity and NewItem
This change makes the naming of the specal pages Special:CreateItem
and Special:NewProperty consistent as the create item page will be
Special:NewItem. There are also aliases to make Special:CreateItem
and Special:CreateProperty work.
This changeset has some consequences in messages, but unfortunatly
a lot of them has also changed keys.
Patchset 6: Rebased
Patchset 10: Rebased
Patchset 11: cleanup
Patchset 12: cleanup
Change-Id: Ic2d7c49f09f7222249b47dd3d946321d8e3302d3
---
M lib/resources/Resources.php
M repo/Wikibase.hooks.php
M repo/Wikibase.i18n.alias.php
M repo/Wikibase.i18n.php
M repo/Wikibase.php
M repo/includes/Autocomment.php
M repo/includes/EntityView.php
M repo/includes/content/ItemHandler.php
R repo/includes/specials/SpecialNewEntity.php
R repo/includes/specials/SpecialNewItem.php
M repo/includes/specials/SpecialNewProperty.php
R repo/tests/phpunit/includes/specials/SpecialNewItemTest.php
12 files changed, 130 insertions(+), 125 deletions(-)
Approvals:
Daniel Kinzler: Verified; Looks good to me, approved
jenkins-bot: Checked
diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index cd0501d..6d77ad6 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -50,7 +50,7 @@
),
'messages' => array(
'special-createitem',
- 'wb-special-createitem-new-item-notification'
+ 'wb-special-newitem-new-item-notification'
)
),
diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index 8040b26..c1d6c58 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -191,7 +191,7 @@
'content/PropertyContent',
'content/PropertyHandler',
- 'specials/SpecialCreateItem',
+ 'specials/SpecialNewItem',
'specials/SpecialItemDisambiguation',
'specials/SpecialItemByTitle',
diff --git a/repo/Wikibase.i18n.alias.php b/repo/Wikibase.i18n.alias.php
index 3163339..c83deab 100644
--- a/repo/Wikibase.i18n.alias.php
+++ b/repo/Wikibase.i18n.alias.php
@@ -17,8 +17,8 @@
/** English (English) */
$specialPageAliases['en'] = array(
'EntityData' => array( 'EntityData' ),
- 'CreateItem' => array( 'CreateItem' ),
- 'NewProperty' => array( 'NewProperty' ),
+ 'NewItem' => array( 'NewItem', 'CreateItem' ),
+ 'NewProperty' => array( 'NewProperty', 'CreateProperty' ),
'ItemByTitle' => array( 'ItemByTitle' ),
'ItemDisambiguation' => array( 'ItemDisambiguation' ),
'ListDatatypes' => array( 'ListDatatypes' ),
@@ -31,7 +31,7 @@
/** Arabic (العربية) */
$specialPageAliases['ar'] = array(
- 'CreateItem' => array( 'إنشاء_مدخلة' ),
+ 'NewItem' => array( 'إنشاء_مدخلة' ),
'ItemByTitle' => array( 'المدخلات_بالعنوان' ),
'ItemDisambiguation' => array( 'المدخلات_بالعلامة' ),
);
@@ -43,7 +43,7 @@
/** буряад (буряад) */
$specialPageAliases['bxr'] = array(
- 'CreateItem' => array( 'Зүйл_үүсхэхэ' ),
+ 'NewItem' => array( 'Зүйл_үүсхэхэ' ),
'NewProperty' => array( 'Шэнэ_шэнжэ_шанар' ),
'ItemByTitle' => array( 'Нэрээр_жагсааха' ),
'ItemDisambiguation' => array( 'Дэлгэрэнгы_нэрэ' ),
@@ -52,7 +52,7 @@
/** German (Deutsch) */
$specialPageAliases['de'] = array(
'EntityData' => array( 'Objektdaten' ),
- 'CreateItem' => array( 'Neues_Datenelement_erstellen' ),
+ 'NewItem' => array( 'Neues_Datenelement_erstellen' ),
'NewProperty' => array( 'Neues_Attribut_erstellen' ),
'ItemByTitle' => array( 'Datenelement_nach_Name' ),
'ItemDisambiguation' => array( 'Begriffsklärung_zu_Datenelement' ),
@@ -66,7 +66,7 @@
/** Zazaki (Zazaki) */
$specialPageAliases['diq'] = array(
- 'CreateItem' => array( 'LeteVırazê' ),
+ 'NewItem' => array( 'LeteVırazê' ),
'NewProperty' => array( 'XısusiyetêNewey' ),
'ItemByTitle' => array( 'SernuşteyêLeti' ),
'ItemDisambiguation' => array( 'EtiketêLeti' ),
@@ -77,7 +77,7 @@
/** Spanish (español) */
$specialPageAliases['es'] = array(
'EntityData' => array( 'DatosDeEntidad' ),
- 'CreateItem' => array( 'CrearElemento' ),
+ 'NewItem' => array( 'CrearElemento' ),
'NewProperty' => array( 'NuevaPropiedad' ),
'ItemByTitle' => array( 'ElementoPorTítulo' ),
'ItemDisambiguation' => array( 'DesambiguaciónDeElementos' ),
@@ -88,7 +88,7 @@
/** Finnish (suomi) */
$specialPageAliases['fi'] = array(
- 'CreateItem' => array( 'Luo_kohde' ),
+ 'NewItem' => array( 'Luo_kohde' ),
'NewProperty' => array( 'Uusi_ominaisuus' ),
'ItemByTitle' => array( 'Hae_kohdetta_otsikolla' ),
'ItemDisambiguation' => array( 'Kohteet_samalla_nimellä' ),
@@ -100,7 +100,7 @@
/** Icelandic (íslenska) */
$specialPageAliases['is'] = array(
- 'CreateItem' => array( 'Búa_til_hlut' ),
+ 'NewItem' => array( 'Búa_til_hlut' ),
'NewProperty' => array( 'Ný_staðhæfing' ),
'ItemByTitle' => array( 'Hlutur_eftir_nafni' ),
'ItemDisambiguation' => array( 'Hlutur_eftir_merkimiða' ),
@@ -112,7 +112,7 @@
/** Italian (italiano) */
$specialPageAliases['it'] = array(
'EntityData' => array( 'DatiEntità' ),
- 'CreateItem' => array( 'CreaElemento' ),
+ 'NewItem' => array( 'CreaElemento' ),
'NewProperty' => array( 'NuovaProprietà' ),
'ItemByTitle' => array( 'ElementiPerTitolo' ),
'ItemDisambiguation' => array( 'ElementiDisambigui' ),
@@ -129,7 +129,7 @@
/** Korean (한국어) */
$specialPageAliases['ko'] = array(
'EntityData' => array( '항목데이터' ),
- 'CreateItem' => array( '항목만들기', '아이템만들기' ),
+ 'NewItem' => array( '항목만들기', '아이템만들기' ),
'NewProperty' => array( '새속성' ),
'ItemByTitle' => array( '제목별항목', '제목별아이템' ),
'ItemDisambiguation' => array( '레이블별항목', '라벨별항목', '레이블별아이템', '라벨별아이템' ),
@@ -143,7 +143,7 @@
/** Macedonian (македонски) */
$specialPageAliases['mk'] = array(
'EntityData' => array( 'ЕдиницаПодатоци' ),
- 'CreateItem' => array( 'СоздајПредмет' ),
+ 'NewItem' => array( 'СоздајПредмет' ),
'NewProperty' => array( 'НовоСвојство' ),
'ItemByTitle' => array( 'ПредметПоНаслов' ),
'ItemDisambiguation' => array( 'ПредметПоЕтикета' ),
@@ -157,7 +157,7 @@
/** Dutch (Nederlands) */
$specialPageAliases['nl'] = array(
'EntityData' => array( 'Entiteitsgegevens' ),
- 'CreateItem' => array( 'ItemAanmaken' ),
+ 'NewItem' => array( 'ItemAanmaken' ),
'NewProperty' => array( 'NieuweEigenschap' ),
'ItemByTitle' => array( 'ItemPerTitel' ),
'ItemDisambiguation' => array( 'ItemPerLabel' ),
@@ -171,7 +171,7 @@
/** Sicilian (sicilianu) */
$specialPageAliases['scn'] = array(
'EntityData' => array( 'DatiEntità' ),
- 'CreateItem' => array( 'CreaElemento' ),
+ 'NewItem' => array( 'CreaElemento' ),
'NewProperty' => array( 'NuovaProprietà' ),
'ItemByTitle' => array( 'ElementiPerTitolo' ),
'ItemDisambiguation' => array( 'ElementiDisambigui' ),
@@ -183,7 +183,7 @@
/** Vietnamese (Tiếng Việt) */
$specialPageAliases['vi'] = array(
'EntityData' => array( 'Dữ_liệu_thực_thể' ),
- 'CreateItem' => array( 'Tạo_khoản_mục' ),
+ 'NewItem' => array( 'Tạo_khoản_mục' ),
'NewProperty' => array( 'Thuộc_tính_mới' ),
'ItemByTitle' => array( 'Khoản_mục_theo_tên' ),
'ItemDisambiguation' => array( 'Định_hướng_khoản_mục' ),
@@ -196,9 +196,9 @@
);
/** Simplified Chinese (中文(简体)) */
-$specialPageAliases['zh-hans'] = array(
+ $specialPageAliases['zh-hans'] = array(
'EntityData' => array( '实体数据' ),
- 'CreateItem' => array( '创建项目' ),
+ 'NewItem' => array( '创建项目' ),
'NewProperty' => array( '新建属性' ),
'ItemByTitle' => array( '按标题搜索项目' ),
'ItemDisambiguation' => array( '项目消歧义' ),
diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index 57634e1..1e89500 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -63,7 +63,7 @@
'wikibase-propertyedittool-counter-entrieslabel' =>
'{{PLURAL:$1|entry|entries}}',
'wikibase-sitelinksedittool-full' => 'Links to pages are already set
for all known sites.',
'wikibase-disambiguation-title' => 'Disambiguation for "$1"',
- 'wb-special-createitem-new-item-notification' => 'New item $1 created
and redirected to its page. Back to $2.',
+ 'wb-special-newitem-new-item-notification' => 'New item $1 created and
redirected to its page. Back to $2.',
'wikibase-aliases-label' => 'Also known as:',
'wikibase-aliases-input-help-message' => 'If this data set is known
under more than one particular name, you may enter aliases and synonyms, so it
can be found by its alternative names.',
'wikibase-aliases-empty' => 'No aliases defined.',
@@ -121,14 +121,14 @@
'wikibase-itembytitle-nothing-found' => 'No item was found by the
previous search. Please refine the query with better identification of the
external page.',
'wikibase-itembytitle-invalid-site' => 'The previous query could not be
used for a search. Please provide a valid site identifier.',
'wikibase-itembytitle-description' => 'Site is an identifier code, such
as "enwiki".',
- 'wikibase-itembytitle-create' => 'You can also
[{{fullurl:Special:CreateItem|site=$1&page=$2}} create an item].',
+ 'wikibase-itembytitle-create' => 'You can also
[{{fullurl:Special:NewItem|site=$1&page=$2}} create an item].',
'special-itemdisambiguation' => 'Item disambiguation',
'wikibase-itemdisambiguation-lookup-fieldset' => 'Search for items by
language and label',
'wikibase-itemdisambiguation-lookup-language' => 'Language:',
'wikibase-itemdisambiguation-lookup-label' => 'Label:',
'wikibase-itemdisambiguation-submit' => 'Search',
'wikibase-itemdisambiguation-nothing-found' => 'Sorry, no item with
that label was found.',
- 'wikibase-itemdisambiguation-create' => 'You can
[{{fullurl:Special:CreateItem|label=$1}} create the item].',
+ 'wikibase-itemdisambiguation-create' => 'You can
[{{fullurl:Special:NewItem|label=$1}} create the item].',
'wikibase-itemdisambiguation-invalid-langcode' => 'Sorry, the language
identifier you have provided is unknown to the system. Please use a valid
identifier like "en".',
'wikibase-itemdisambiguation-description' => 'Values used for searching
must be the complete text entry. Language is an identifier, such as "en".',
'special-newproperty' => 'Create a new property',
@@ -136,17 +136,17 @@
'wikibase-newproperty-fieldset' => 'Create a new property',
'wikibase-newproperty-datatype' => 'Data type:',
'wikibase-newproperty-invalid-datatype' => 'Invalid datatype specified',
- 'special-createitem' => 'Create a new item',
- 'wikibase-createitem-summary' => 'Make sure to
[[Special:ItemByTitle|check if the item already exists]]!<br />You should
create a [[Help:Label|label]] and a [[Help:Description|description]] for all
new items.',
- 'wikibase-createitem-fieldset' => 'Create a new item',
- 'wikibase-createitem-site' => 'Site of the first linked page',
- 'wikibase-createitem-page' => 'Name of the first linked page',
- 'wikibase-createitem-no-external-page' => 'The specified page could not
be found on the corresponding site.',
- 'wikibase-createitem-add-sitelink-failed' => 'The site link could not
be saved.',
- 'wikibase-createitem-not-recognized-siteid' => 'The supplied site
identifier was not recognized.',
- 'wikibase-createentity-label' => 'Label:',
- 'wikibase-createentity-description' => 'Description:',
- 'wikibase-createentity-submit' => 'Create',
+ 'special-newitem' => 'Create a new item',
+ 'wikibase-newitem-summary' => 'Make sure to [[Special:ItemByTitle|check
if the item already exists]]!<br />You should create a [[Help:Label|label]] and
a [[Help:Description|description]] for all new items.',
+ 'wikibase-newitem-fieldset' => 'Create a new item',
+ 'wikibase-newitem-site' => 'Site of the first linked page',
+ 'wikibase-newitem-page' => 'Name of the first linked page',
+ 'wikibase-newitem-no-external-page' => 'The specified page could not be
found on the corresponding site.',
+ 'wikibase-newitem-add-sitelink-failed' => 'The site link could not be
saved.',
+ 'wikibase-newitem-not-recognized-siteid' => 'The supplied site
identifier was not recognized.',
+ 'wikibase-newentity-label' => 'Label:',
+ 'wikibase-newentity-description' => 'Description:',
+ 'wikibase-newentity-submit' => 'Create',
'special-setlabel' => 'Set a label',
'wikibase-setlabel-introfull' => 'You are setting the label in $2 for
[[$1]].',
'wikibase-setlabel-intro' => 'This form allows you to set the label of
an entity. You need to provide the ID of the entity (e.g. Q23), a language code
(e.g. "en") and the label to set to.',
@@ -411,7 +411,7 @@
'wikibase-propertyedittool-counter-entrieslabel' => "Used in the
counter on top of the site-links table. The counter is giving information about
how many site-links exist in the following table. This is just the label for
the counter's subject, the site-links. The number of site-links is not part of
the message but they are given as parameter $1 for plural usage in the label.",
'wikibase-sitelinksedittool-full' => 'The list of elements the user can
enter is exhausted and there are no additional sites available. See also
Wikidatas glossary for [[m:Wikidata/Glossary#sitelinks|sitelinks]].',
'wikibase-disambiguation-title' => 'Disambiguation page title. $1 is
the label of the item being disambiguated.',
- 'wb-special-createitem-new-item-notification' => 'Message displayed
when a new item was created on [[Special:CreateItem]] and the user has been
redirected to the new items page. $1 is the new items id, $2 is a link back to
the special page with "special-createitem" as label',
+ 'wb-special-newitem-new-item-notification' => 'Message displayed when a
new item was created on [[Special:NewItem]] and the user has been redirected to
the new items page. $1 is the new items id, $2 is a link back to the special
page with "special-newitem" as label',
'wikibase-aliases-label' => 'Label for list of aliases, displayed in
front of the list. Aliases are alternate names and nicknames for the item. See
also [[m:Wikidata/Glossary]].',
'wikibase-aliases-input-help-message' => 'Bubble help message for
entering the aliases of the data set used for a specific item.',
'wikibase-aliases-empty' => 'Placeholder message when no aliases for
this data set representing a specific item have been defined.',
@@ -534,27 +534,27 @@
'wikibase-newproperty-summary' => 'Summary text for the NewProperty
special page. This message could contain links to policy pages and guidelines
for this specific type of entity.
See also:
-* {{msg-mw|Wikibase-createitem-summary}}',
+* {{msg-mw|Wikibase-newproperty-summary}}',
'wikibase-newproperty-fieldset' => 'Title for the fieldset on the
CreateProperty special page.',
'wikibase-newproperty-datatype' => 'Label for the data-type-dropdown
holding the data type of the new property.',
'wikibase-newproperty-invalid-datatype' => 'Error message shown when
the page gets an invalid datatype',
- 'special-createitem' => 'Title of the special page for creating new
items.
+ 'special-newitem' => 'Title of the special page for creating new items.
{{Identical|Create new item}}',
- 'wikibase-createitem-summary' => 'Summary text for the CreateItem
special page. This message could contain links to policy pages and guidelines
for this specific type of entity.
+ 'wikibase-newitem-summary' => 'Summary text for the CreateItem special
page. This message could contain links to policy pages and guidelines for this
specific type of entity.
See also:
* {{msg-mw|Wikibase-newproperty-summary}}',
- 'wikibase-createitem-fieldset' => 'Title for the fieldset on the
CreateItem special page.
+ 'wikibase-newitem-fieldset' => 'Title for the fieldset on the
CreateItem special page.
{{Identical|Create new item}}',
- 'wikibase-createitem-site' => 'Label for the site-textfield holding the
site id of the first linked page to add to the new item.',
- 'wikibase-createitem-page' => 'Label for the page-textfield holding the
page name of the first linked page to add to the new item',
- 'wikibase-createitem-no-external-page' => 'Error message shown when a
user tries to add a page that does not exist on the website choosen.',
- 'wikibase-createitem-add-sitelink-failed' => 'Error message shown when
the save of a link failed.',
- 'wikibase-createitem-not-recognized-siteid' => 'Error message shown
when a user tries to add a link to a site with an unknown identifier.',
- 'wikibase-createentity-label' => 'Label for the label textfield holding
the label of the new item.
+ 'wikibase-newitem-site' => 'Label for the site-textfield holding the
site id of the first linked page to add to the new item.',
+ 'wikibase-newitem-page' => 'Label for the page-textfield holding the
page name of the first linked page to add to the new item',
+ 'wikibase-newitem-no-external-page' => 'Error message shown when a user
tries to add a page that does not exist on the website choosen.',
+ 'wikibase-newitem-add-sitelink-failed' => 'Error message shown when the
save of a link failed.',
+ 'wikibase-newitem-not-recognized-siteid' => 'Error message shown when a
user tries to add a link to a site with an unknown identifier.',
+ 'wikibase-newentity-label' => 'Label for the label textfield holding
the label of the new item.
{{Identical|Label}}',
- 'wikibase-createentity-description' => 'Label for the description
textfield holding the description of the new item.',
- 'wikibase-createentity-submit' => 'Text for the submit button on the
CreateItem special page.
+ 'wikibase-newentity-description' => 'Label for the description
textfield holding the description of the new item.',
+ 'wikibase-newentity-submit' => 'Text for the submit button on the
CreateItem special page.
{{Identical|Create}}',
'special-setlabel' => 'Title of the special page that allows the user
to set a label for an entity',
'wikibase-setlabel-introfull' => 'Intro text when a label is to be set.
Parameters:
@@ -1612,9 +1612,11 @@
'wikibase-itemdisambiguation-invalid-langcode' => 'Det sprog-id, du har
angivet er ukendt for systemet. Brug venligst et gyldig id som "da".',
'wikibase-itemdisambiguation-description' => 'Værdierne, der bruges til
søgning skal være postens komplette tekst. Sprog er et id, som "da".',
'special-newproperty' => 'Opret en ny egenskab',
+ 'wikibase-newproperty-intro' => 'Før du opretter en ny egenskab, bør du
kontrolere, om egenskaben allerede findes. For at oprette en ny, skal du mindst
angive etiketten eller beskrivelse i $1, og en gyldig egenskabstype.',
'wikibase-newproperty-fieldset' => 'Opret en ny egenskab',
'wikibase-newproperty-datatype' => 'Datatype:',
'special-createitem' => 'Opret et nyt emne',
+ 'wikibase-createitem-intro' => 'Før du opretter et nyt emne, bør du
kontrollere, om dette emne allerede findes. For at oprette et nyt, skal du
mindst angive etiket eller beskrivelse i $1.',
'wikibase-createitem-fieldset' => 'Opret et nyt emne',
'wikibase-createitem-site' => 'Webstedet for den første sammenkædede
side',
'wikibase-createitem-page' => 'Navnet på den første sammenkædede side',
diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index 56187af..52acb68 100644
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -160,8 +160,8 @@
$wgAutoloadClasses['Wikibase\QueryHandler'] = $dir .
'includes/content/QueryHandler.php';
// includes/specials
-$wgAutoloadClasses['SpecialCreateEntity'] = $dir
. 'includes/specials/SpecialCreateEntity.php';
-$wgAutoloadClasses['SpecialCreateItem'] = $dir
. 'includes/specials/SpecialCreateItem.php';
+$wgAutoloadClasses['SpecialNewEntity'] = $dir
. 'includes/specials/SpecialNewEntity.php';
+$wgAutoloadClasses['SpecialNewItem'] = $dir .
'includes/specials/SpecialNewItem.php';
$wgAutoloadClasses['SpecialNewProperty'] = $dir
. 'includes/specials/SpecialNewProperty.php';
$wgAutoloadClasses['SpecialItemByTitle'] = $dir
. 'includes/specials/SpecialItemByTitle.php';
$wgAutoloadClasses['SpecialItemResolver'] = $dir
. 'includes/specials/SpecialItemResolver.php';
@@ -226,30 +226,31 @@
// Special page registration
-$wgSpecialPages['CreateItem'] =
'SpecialCreateItem';
-$wgSpecialPages['EntitiesWithoutLabel'] =
'SpecialEntitiesWithoutLabel';
+$wgSpecialPages['NewItem'] =
'SpecialNewItem';
+$wgSpecialPages['NewProperty']
= 'SpecialNewProperty';
$wgSpecialPages['ItemByTitle']
= 'SpecialItemByTitle';
$wgSpecialPages['ItemDisambiguation'] =
'SpecialItemDisambiguation';
$wgSpecialPages['ItemsWithoutSitelinks'] =
'SpecialItemsWithoutSitelinks';
-$wgSpecialPages['ListDatatypes'] =
'SpecialListDatatypes';
-$wgSpecialPages['NewProperty']
= 'SpecialNewProperty';
-$wgSpecialPages['SetAliases'] =
'SpecialSetAliases';
-$wgSpecialPages['SetDescription'] =
'SpecialSetDescription';
$wgSpecialPages['SetLabel'] =
'SpecialSetLabel';
+$wgSpecialPages['SetDescription'] =
'SpecialSetDescription';
+$wgSpecialPages['SetAliases'] =
'SpecialSetAliases';
+$wgSpecialPages['EntitiesWithoutLabel'] =
'SpecialEntitiesWithoutLabel';
+$wgSpecialPages['NewProperty']
= 'SpecialNewProperty';
+$wgSpecialPages['ListDatatypes'] =
'SpecialListDatatypes';
// Special page groups
-$wgSpecialPageGroups['CreateItem'] =
'wikibaserepo';
-$wgSpecialPageGroups['EntitiesWithoutLabel'] = 'wikibaserepo';
-$wgSpecialPageGroups['EntityData'] =
'wikibaserepo';
+$wgSpecialPageGroups['NewItem'] =
'wikibaserepo';
+$wgSpecialPageGroups['NewProperty'] =
'wikibaserepo';
$wgSpecialPageGroups['ItemByTitle'] =
'wikibaserepo';
$wgSpecialPageGroups['ItemDisambiguation'] =
'wikibaserepo';
$wgSpecialPageGroups['ItemsWithoutSitelinks'] = 'wikibaserepo';
-$wgSpecialPageGroups['ListDatatypes'] =
'wikibaserepo';
-$wgSpecialPageGroups['NewProperty'] =
'wikibaserepo';
-$wgSpecialPageGroups['SetAliases'] =
'wikibaserepo';
-$wgSpecialPageGroups['SetDescription'] =
'wikibaserepo';
$wgSpecialPageGroups['SetLabel'] =
'wikibaserepo';
+$wgSpecialPageGroups['SetDescription'] =
'wikibaserepo';
+$wgSpecialPageGroups['SetAliases'] =
'wikibaserepo';
+$wgSpecialPageGroups['EntitiesWithoutLabel'] = 'wikibaserepo';
+$wgSpecialPageGroups['EntityData'] =
'wikibaserepo';
+$wgSpecialPageGroups['ListDatatypes'] =
'wikibaserepo';
// Hooks
diff --git a/repo/includes/Autocomment.php b/repo/includes/Autocomment.php
index d10bb04..dda53c6 100644
--- a/repo/includes/Autocomment.php
+++ b/repo/includes/Autocomment.php
@@ -40,32 +40,33 @@
// If it is possible to avoid loading the whole page then the
code will be lighter on the server.
$title = $title === null ? $wgTitle : $title;
- if ( $title->getContentModel() === $model ) {
+ if ( $title->getContentModel() !== $model ) {
+ return true;
+ }
- if ( preg_match( '/^([\-a-z]+?)\s*(:\s*(.*?))?\s*$/',
$auto, $matches ) ) {
+ if ( preg_match( '/^([\-a-z]+?)\s*(:\s*(.*?))?\s*$/', $auto,
$matches ) ) {
- // turn the args to the message into an array
- $args = ( 3 < count( $matches ) ) ? explode(
'|', $matches[3] ) : array();
+ // turn the args to the message into an array
+ $args = ( 3 < count( $matches ) ) ? explode( '|',
$matches[3] ) : array();
- // look up the message
- $msg = wfMessage( $root . '-summary-' .
$matches[1] );
- if ( !$msg->isDisabled() ) {
- // parse the autocomment
- $auto = $msg->params( $args )->parse();
+ // look up the message
+ $msg = wfMessage( $root . '-summary-' . $matches[1] );
+ if ( !$msg->isDisabled() ) {
+ // parse the autocomment
+ $auto = $msg->params( $args )->parse();
- // add pre and post fragments
- if ( $pre ) {
- // written summary $presep
autocomment (summary /* section */)
- $pre .= wfMessage(
'autocomment-prefix' )->escaped();
- }
- if ( $post ) {
- // autocomment $postsep written
summary (/* section */ summary)
- $auto .= wfMessage(
'colon-separator' )->escaped();
- }
-
- $auto = '<span class="autocomment">' .
$auto . '</span>';
- $comment = $pre . $wgLang->getDirMark()
. '<span dir="auto">' . $auto . $post . '</span>';
+ // add pre and post fragments
+ if ( $pre ) {
+ // written summary $presep autocomment
(summary /* section */)
+ $pre .= wfMessage( 'autocomment-prefix'
)->escaped();
}
+ if ( $post ) {
+ // autocomment $postsep written summary
(/* section */ summary)
+ $auto .= wfMessage( 'colon-separator'
)->escaped();
+ }
+
+ $auto = '<span class="autocomment">' . $auto .
'</span>';
+ $comment = $pre . $wgLang->getDirMark() .
'<span dir="auto">' . $auto . $post . '</span>';
}
}
return true;
diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php
index d57735b..3fd5b7d 100644
--- a/repo/includes/EntityView.php
+++ b/repo/includes/EntityView.php
@@ -222,7 +222,7 @@
// make sure required client sided resources will be loaded:
$pout->addModules( 'wikibase.ui.entityViewInit' );
- //FIXME: some places, like Special:CreateItem, don't want to
override the page title.
+ //FIXME: some places, like Special:NewItem, don't want to
override the page title.
// But we still want to use OutputPage::addParserOutput
to apply the modules etc from the ParserOutput.
// So, for now, we leave it to the caller to override the
display title, if desired.
// set the display title
diff --git a/repo/includes/content/ItemHandler.php
b/repo/includes/content/ItemHandler.php
index 5ecb5e1..46ef44a 100644
--- a/repo/includes/content/ItemHandler.php
+++ b/repo/includes/content/ItemHandler.php
@@ -155,7 +155,7 @@
* @return string
*/
public function getSpecialPageForCreation() {
- return 'CreateItem';
+ return 'NewItem';
}
}
diff --git a/repo/includes/specials/SpecialCreateEntity.php
b/repo/includes/specials/SpecialNewEntity.php
similarity index 91%
rename from repo/includes/specials/SpecialCreateEntity.php
rename to repo/includes/specials/SpecialNewEntity.php
index 34d2c5f..9229a42 100644
--- a/repo/includes/specials/SpecialCreateEntity.php
+++ b/repo/includes/specials/SpecialNewEntity.php
@@ -32,11 +32,11 @@
* @author Jens Ohlig
* @author John Erling Blad < [email protected] >
*/
-abstract class SpecialCreateEntity extends SpecialWikibasePage {
+abstract class SpecialNewEntity extends SpecialWikibasePage {
/**
* Contains pieces of the sub-page name of this special page if a
subpage was called.
- * E.g. array( 'a', 'b' ) in case of 'Special:CreateEntity/a/b'
+ * E.g. array( 'a', 'b' ) in case of 'Special:NewEntity/a/b'
* @var string[]
*/
protected $parts = null;
@@ -100,7 +100,8 @@
$this->getLanguage()
);
$comment =
Autocomment::formatAutoComment(
- 'special-create-' .
$entityContent->getEntity()->getType(),
+ //'wbcreate' .
$entityContent->getEntity()->getType() . '-new',
+ 'wbcreate-new',
array( $counts,
$this->getLanguage()->getCode() )
);
$editEntity = new \Wikibase\EditEntity(
$entityContent, $this->getUser(), false, $this->getContext() );
@@ -200,17 +201,17 @@
return Html::element(
'label',
array(
- 'for' => 'wb-createentity-label',
+ 'for' => 'wb-newentity-label',
'class' => 'wb-label'
),
- $this->msg( 'wikibase-createentity-label' )->text()
+ $this->msg( 'wikibase-newentity-label' )->text()
)
. Html::input(
'label',
$this->label ? $this->label : '',
'text',
array(
- 'id' => 'wb-createentity-label',
+ 'id' => 'wb-newentity-label',
'size' => 12,
'class' => 'wb-input',
'lang' => $wgLang->getCode(),
@@ -221,17 +222,17 @@
. Html::element(
'label',
array(
- 'for' => 'wb-createentity-description',
+ 'for' => 'wb-newentity-description',
'class' => 'wb-label'
),
- $this->msg( 'wikibase-createentity-description'
)->text()
+ $this->msg( 'wikibase-newentity-description' )->text()
)
. Html::input(
'description',
$this->description ? $this->description : '',
'text',
array(
- 'id' => 'wb-createentity-description',
+ 'id' => 'wb-newentity-description',
'size' => 36,
'class' => 'wb-input',
'lang' => $wgLang->getCode(),
@@ -252,7 +253,7 @@
public function createForm( $legend = null, $additionalHtml = '' ) {
$this->getOutput()->addHTML(
/*
- $this->msg( 'wikibase-createentity-intro'
)->params(
+ $this->msg( 'wikibase-newentity-intro'
)->params(
Language::fetchLanguageName(
$this->getLanguage()->getCode() )
)->text()
. */ Html::openElement(
@@ -260,8 +261,8 @@
array(
'method' => 'post',
'action' =>
$this->getTitle()->getFullUrl(),
- 'name' => 'createentity',
- 'id' => 'mw-createentity-form1',
+ 'name' => 'newentity',
+ 'id' => 'mw-newentity-form1',
'class' => 'wb-form'
)
)
@@ -281,10 +282,10 @@
. $additionalHtml
. Html::input(
'submit',
- $this->msg(
'wikibase-createentity-submit' )->text(),
+ $this->msg( 'wikibase-newentity-submit'
)->text(),
'submit',
array(
- 'id' =>
'wb-createentity-submit',
+ 'id' => 'wb-newentity-submit',
'class' => 'wb-button'
)
)
diff --git a/repo/includes/specials/SpecialCreateItem.php
b/repo/includes/specials/SpecialNewItem.php
similarity index 80%
rename from repo/includes/specials/SpecialCreateItem.php
rename to repo/includes/specials/SpecialNewItem.php
index d7f6b8e..3b88e27 100644
--- a/repo/includes/specials/SpecialCreateItem.php
+++ b/repo/includes/specials/SpecialNewItem.php
@@ -26,7 +26,7 @@
* @licence GNU GPL v2+
* @author John Erling Blad < [email protected] >
*/
-class SpecialCreateItem extends SpecialCreateEntity {
+class SpecialNewItem extends SpecialNewEntity {
/**
* @var string|null
@@ -44,11 +44,11 @@
* @since 0.1
*/
public function __construct() {
- parent::__construct( 'CreateItem' );
+ parent::__construct( 'NewItem' );
}
/**
- * @see SpecialCreateEntity::prepareArguments
+ * @see SpecialNewEntity::prepareArguments
*
* @return boolean
*/
@@ -60,7 +60,7 @@
}
/**
- * @see SpecialCreateEntity::createEntityContent
+ * @see SpecialNewEntity::createEntityContent
*
* @return \Wikibase\ItemContent
*/
@@ -69,7 +69,7 @@
}
/**
- * @see SpecialCreateEntity::modifyEntity
+ * @see SpecialNewEntity::modifyEntity
*
* @param \Wikibase\EntityContent $itemContent
*
@@ -82,20 +82,20 @@
$site = \SiteSQLStore::newInstance()->getSite(
$this->site );
if ( $site === null ) {
- $status->error(
'wikibase-createitem-not-recognized-siteid' );
+ $status->error(
'wikibase-newitem-not-recognized-siteid' );
return $status;
}
$page = $site->normalizePageName( $this->page );
if ( $page === false ) {
- $status->error(
'wikibase-createitem-no-external-page' );
+ $status->error(
'wikibase-newitem-no-external-page' );
return $status;
}
$link = new \Wikibase\SiteLink( $site, $page );
$ret = $itemContent->getItem()->addSiteLink( $link,
'add' );
if ( $ret === false ) {
- $status->error(
'wikibase-createitem-add-sitelink-failed' );
+ $status->error(
'wikibase-newitem-add-sitelink-failed' );
return $status;
}
}
@@ -104,7 +104,7 @@
}
/**
- * @see SpecialCreateEntity::additionalFormElements
+ * @see SpecialNewEntity::additionalFormElements
*
* @return string
*/
@@ -117,17 +117,17 @@
. Html::element(
'label',
array(
- 'for' => 'wb-createitem-site',
+ 'for' => 'wb-newitem-site',
'class' => 'wb-label'
),
- $this->msg( 'wikibase-createitem-site' )->text()
+ $this->msg( 'wikibase-newitem-site' )->text()
)
. Html::input(
'site',
$this->site,
'text',
array(
- 'id' => 'wb-createitem-site',
+ 'id' => 'wb-newitem-site',
'size' => 12,
'class' => 'wb-input',
'readonly' => 'readonly'
@@ -137,17 +137,17 @@
. Html::element(
'label',
array(
- 'for' => 'wb-createitem-page',
+ 'for' => 'wb-newitem-page',
'class' => 'wb-label'
),
- $this->msg( 'wikibase-createitem-page' )->text()
+ $this->msg( 'wikibase-newitem-page' )->text()
)
. Html::input(
'page',
$this->page,
'text',
array(
- 'id' => 'wb-createitem-page',
+ 'id' => 'wb-newitem-page',
'size' => 12,
'class' => 'wb-input',
'readonly' => 'readonly'
@@ -157,12 +157,12 @@
}
/**
- * @see SpecialCreateEntity::getLegend
+ * @see SpecialNewEntity::getLegend
*
* @return string
*/
protected function getLegend() {
- return $this->msg( 'wikibase-createitem-fieldset' );
+ return $this->msg( 'wikibase-newitem-fieldset' );
}
/**
diff --git a/repo/includes/specials/SpecialNewProperty.php
b/repo/includes/specials/SpecialNewProperty.php
index 3466600..dcca532 100644
--- a/repo/includes/specials/SpecialNewProperty.php
+++ b/repo/includes/specials/SpecialNewProperty.php
@@ -29,7 +29,7 @@
* @licence GNU GPL v2+
* @author John Erling Blad < [email protected] >
*/
-class SpecialNewProperty extends SpecialCreateEntity {
+class SpecialNewProperty extends SpecialNewEntity {
/**
* @since 0.2
@@ -48,7 +48,7 @@
}
/**
- * @see SpecialCreateEntity::prepareArguments()
+ * @see SpecialNewEntity::prepareArguments()
*/
protected function prepareArguments() {
parent::prepareArguments();
@@ -57,7 +57,7 @@
}
/**
- * @see SpecialCreateEntity::hasSufficientArguments()
+ * @see SpecialNewEntity::hasSufficientArguments()
*/
protected function hasSufficientArguments() {
// TODO: Needs refinement
@@ -65,14 +65,14 @@
}
/**
- * @see SpecialCreateEntity::createEntityContent
+ * @see SpecialNewEntity::createEntityContent
*/
protected function createEntityContent() {
return \Wikibase\PropertyContent::newEmpty();
}
/**
- * @see SpecialCreateEntity::modifyEntity()
+ * @see SpecialNewEntity::modifyEntity()
*
* @param EntityContent $propertyContent
*
@@ -101,7 +101,7 @@
}
/**
- * @see SpecialCreateEntity::additionalFormElements()
+ * @see SpecialNewEntity::additionalFormElements()
*/
protected function additionalFormElements() {
$libRegistry = new \Wikibase\LibRegistry(
\Wikibase\Settings::singleton() );
@@ -123,7 +123,7 @@
}
/**
- * @see SpecialCreateEntity::getLegend()
+ * @see SpecialNewEntity::getLegend()
*/
protected function getLegend() {
return $this->msg( 'wikibase-newproperty-fieldset' );
diff --git a/repo/tests/phpunit/includes/specials/SpecialCreateItemTest.php
b/repo/tests/phpunit/includes/specials/SpecialNewItemTest.php
similarity index 91%
rename from repo/tests/phpunit/includes/specials/SpecialCreateItemTest.php
rename to repo/tests/phpunit/includes/specials/SpecialNewItemTest.php
index 7560e8a..0ffa316 100644
--- a/repo/tests/phpunit/includes/specials/SpecialCreateItemTest.php
+++ b/repo/tests/phpunit/includes/specials/SpecialNewItemTest.php
@@ -3,7 +3,7 @@
namespace Wikibase\Test;
/**
- * Tests for the SpecialCreateItem class.
+ * Tests for the SpecialSpecialItem class.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -34,10 +34,10 @@
* @author Jeroen De Dauw < [email protected] >
* @author Daniel Kinzler
*/
-class SpecialCreateItemTest extends SpecialPageTestBase {
+class SpecialNewItemTest extends SpecialPageTestBase {
protected function newSpecialPage() {
- return new \SpecialCreateItem();
+ return new \SpecialNewItem();
}
public function testExecute() {
--
To view, visit https://gerrit.wikimedia.org/r/32921
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2d7c49f09f7222249b47dd3d946321d8e3302d3
Gerrit-PatchSet: 13
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: John Erling Blad <[email protected]>
Gerrit-Reviewer: Anja Jentzsch <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: John Erling Blad <[email protected]>
Gerrit-Reviewer: Raimond Spekking <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits