Hoo man has uploaded a new change for review.
https://gerrit.wikimedia.org/r/176249
Change subject: Always use 'wikibase-statements' as statement section header
......................................................................
Always use 'wikibase-statements' as statement section header
Change-Id: I1f4093ca07c13b6588461ded5f8998c62514e174
---
M repo/i18n/en.json
M repo/includes/ItemView.php
M repo/includes/PropertyView.php
M repo/includes/View/ClaimsView.php
4 files changed, 4 insertions(+), 13 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/49/176249/1
diff --git a/repo/i18n/en.json b/repo/i18n/en.json
index 5b82521..42b79a6 100644
--- a/repo/i18n/en.json
+++ b/repo/i18n/en.json
@@ -48,9 +48,7 @@
"wikibase-description-input-help-message": "Enter a short description
for this entity in $1.",
"wikibase-fingerprintgroupview-input-help-message": "Enter a label of
this entity, a short description and aliases per language.",
"wikibase-fingerprintview-input-help-message": "Enter the label of this
entity, a short description and aliases in $1.",
- "wikibase-claims": "Claims",
"wikibase-statements": "Statements",
- "wikibase-attributes": "Attributes",
"wikibase-terms": "In other languages",
"wikibase-sitelinkgroupview-input-help-message": "Add a site link by
specifying a site and a page of that site, edit or remove existing site links.",
"wikibase-sitelinks-empty": "No page is linked to this item yet.",
diff --git a/repo/includes/ItemView.php b/repo/includes/ItemView.php
index e506d21..f791ebd 100644
--- a/repo/includes/ItemView.php
+++ b/repo/includes/ItemView.php
@@ -35,8 +35,7 @@
$html = parent::getMainHtml( $entityRevision, $entityInfo,
$editable );
$html .= $this->claimsView->getHtml(
$item->getStatements()->toArray(),
- $entityInfo,
- 'wikibase-statements'
+ $entityInfo
);
return $html;
diff --git a/repo/includes/PropertyView.php b/repo/includes/PropertyView.php
index 6e8786b..9929e65 100644
--- a/repo/includes/PropertyView.php
+++ b/repo/includes/PropertyView.php
@@ -40,8 +40,7 @@
// @fixme Property::getClaims no longer returns any
statements for properties!
$html .= $this->claimsView->getHtml(
$property->getStatements()->toArray(),
- $entityInfo,
- 'wikibase-attributes'
+ $entityInfo
);
}
diff --git a/repo/includes/View/ClaimsView.php
b/repo/includes/View/ClaimsView.php
index 6ba6369..451c9e4 100644
--- a/repo/includes/View/ClaimsView.php
+++ b/repo/includes/View/ClaimsView.php
@@ -5,12 +5,8 @@
use Linker;
use Wikibase\ClaimHtmlGenerator;
use Wikibase\DataModel\Claim\Claim;
-use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\DataModel\Entity\Property;
use Wikibase\DataModel\Snak\Snak;
-use Wikibase\Lib\Store\EntityInfoBuilderFactory;
use Wikibase\Lib\Store\EntityTitleLookup;
-use Wikibase\ReferencedEntitiesFinder;
/**
* Generates HTML to display claims.
@@ -67,10 +63,9 @@
*
* @param Claim[] $claims the claims to render
* @param array $entityInfo
- * @param string $heading the message key of the heading
* @return string
*/
- public function getHtml( array $claims, array $entityInfo, $heading =
'wikibase-claims' ) {
+ public function getHtml( array $claims, array $entityInfo ) {
// aggregate claims by properties
$claimsByProperty = $this->groupClaimsByProperties( $claims );
@@ -82,7 +77,7 @@
$claimgrouplistviewHtml = wfTemplate( 'wb-claimgrouplistview',
$claimsHtml, '' );
// TODO: Add link to SpecialPage that allows adding a new claim.
- $sectionHeading = $this->getHtmlForSectionHeading( $heading );
+ $sectionHeading = $this->getHtmlForSectionHeading(
'wikibase-statements' );
// FIXME: claimgrouplistview should be the topmost claims
related template
$html = wfTemplate( 'wb-claimlistview',
$claimgrouplistviewHtml, '', '' );
return $sectionHeading . $html;
--
To view, visit https://gerrit.wikimedia.org/r/176249
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f4093ca07c13b6588461ded5f8998c62514e174
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: wmf/1.25wmf10
Gerrit-Owner: Hoo man <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits