Tobias Gritschacher has submitted this change and it was merged.
Change subject: Add dt/dd msgs for of the datatypes in Special:ListDatatypes
......................................................................
Add dt/dd msgs for of the datatypes in Special:ListDatatypes
These messages are used at the "List all datatypes" -special page.
In those cases some datatypes exists that can be added as configuration,
the messages can be set upp manually in as local system messages.
Patchset 9: Only a rebase
Change-Id: I66ed2cf6e82d50fc0904c89d37e09daa88a2a6ad
---
M repo/Wikibase.i18n.php
M repo/includes/specials/SpecialListDatatypes.php
2 files changed, 79 insertions(+), 5 deletions(-)
Approvals:
Tobias Gritschacher: Verified; Looks good to me, approved
jenkins-bot: Checked
diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index 57634e1..0f799b6 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -288,6 +288,46 @@
// query - summary and autocomment
'wikibase-query-summary-special-create-query' => 'Created a [$2] query
with {{PLURAL:$1|value|values}}',
+ // datatype descriptions
+ 'wikibase-listdatatypes-wikibase-item-head' => 'Item',
+ 'wikibase-listdatatypes-wikibase-item-body' => 'Link to other items at
the project. During entry the "Item" namespace on Wikidata will be searced for
matching entries. It consists of a single text entry field.
+* scheme – implicit part of the Iri-string
+* hierarchicalpart – implicit part of the Iri-string
+* query – implicit part of the Iri-string
+* fragment – implicit part of the Iri-string',
+ 'wikibase-listdatatypes-commonsmedia-head' => 'Commons media',
+ 'wikibase-listdatatypes-commonsmedia-body' => 'Link to files stored at
Wikimedia Commons. During entry the "File" namespace on Commons will be
searched for matching entries.
+* scheme – implicit part of the Iri-string
+* hierarchicalpart – implicit part of the Iri-string
+* query – implicit part of the Iri-string
+* fragment – implicit part of the Iri-string',
+ 'wikibase-listdatatypes-geo-coordinate-head' => 'Geo coordinate',
+ 'wikibase-listdatatypes-geo-coordinate-body' => 'Literal data for a
geographical position given as a latitude-longitude pair in gms or decimal
degrees for the given stellar body. Defaults to "Earth" and then "WGS84". It
adds a resolution and range.
+* latitude – implicit first part (float, dms, dm, dd) of the coordinate
string, direction is either given by prefixed sign or by postfixed N/S
+* longitude – implicit second part (float, dms, dm, dd) of the coordinate
string, direction is either given by prefixed sign or by postfixed E/W
+* altitude (optional) – explicit (?) value for the height over a reference
plane , for the globe "Earth" that would be the "WGS84" reference globe
+* globe (optional) – explicit (?) data value, given as stellar body that
defaults to "Earth" and then "WGS84"',
+ 'wikibase-listdatatypes-quantity-head' => 'Quantity',
+ 'wikibase-listdatatypes-quantity-body' => 'Literal data field for a
quantity that relates to some kind of well-defined unit. The actual unit goes
in the data values that is entered.
+* value – implicit part of the string (mapping of unit prefix is unclear)
+* unit – implicit part of the string (mapping to standardizing body is unclear)
+* accuracy (optional) – explicit data value, has the same unit as the value',
+ 'wikibase-listdatatypes-monolingual-text-head' => 'Monolingual text',
+ 'wikibase-listdatatypes-monolingual-text-body' => 'Literal data field
for a string that is not translated into other languages. This type of string
is defined once and reused across all languages. Typical use is a geographical
names written in the local language, an identifier of some kind, a chemical
formula or a Latin scientific name.
+* language – explicit value for identifying the language for the text part
+* text – explicit value for the language specific variant string',
+ 'wikibase-listdatatypes-multilingual-text-head' => 'Multilingual text',
+ 'wikibase-listdatatypes-multilingual-text-body' => 'Literal data field
for a string that must be translated into other languages. Typical use is a
entity name of global interest that has non-local written forms. Those can
differ both in languages and script systems.
+* language – explicit value for identifying the language for the text part
+* text – explicit value for the language specific variant string',
+ 'wikibase-listdatatypes-time-head' => 'Time',
+ 'wikibase-listdatatypes-time-body' => 'Literal data field for a time
value. Given as a time with some precision and boundaries. The time are always
saved internally in proleptic Gregorian, but can use other formats during
parsing and formating.(?)
+* time – explicit value for point in time, represented per ISO8601, they year
always having 11 digits, the date always be signed, in the format
+00000002013-01-01T00:00:00Z
+* timezone – explicit value as a signed integer. Timezone information as an
offset from UTC in minutes.
+* before – explicit integer value for how many units after the given time it
could be. The unit is given by the precision.
+* after – explicit integer value for how many units before the given time it
could be. The unit is given by the precision.
+* precision – explicit value encoded in a shortint. The numbers have the
following meaning: 0 - billion years, 1 - hundred million years, ..., 6 -
millenia, 7 - century, 8 - decade, 9 - year, 10 - month, 11 - day, 12 - hour,
13 - minute, 14 - second.
+* calendarmodel – explicit value given as an URI. It will identify the
calendar model that should be used to display this time value.',
//content model names
'content-model-wikibase-item' => 'Wikibase item',
'content-model-wikibase-property' => 'Wikibase property',
@@ -755,6 +795,20 @@
'right-label-update' => '{{doc-right|label-update}}',
'right-description-remove' => '{{doc-right|description-remove}}',
'right-description-update' => '{{doc-right|description-update}}',
+
+ // datatype descriptions
+ 'wikibase-listdatatypes-wikibase-item-head' =>
'{{Wikibase-datatype-head|Item}}',
+ 'wikibase-listdatatypes-wikibase-item-body' =>
'{{Wikibase-datatype-body|Item}}',
+ 'wikibase-listdatatypes-commonsmedia-head' =>
'{{Wikibase-datatype-head|Commons media}}',
+ 'wikibase-listdatatypes-commonsmedia-body' =>
'{{Wikibase-datatype-body|Commons media}}',
+ 'wikibase-listdatatypes-geo-coordinate-head' =>
'{{Wikibase-datatype-head|Geo coordinate}}',
+ 'wikibase-listdatatypes-geo-coordinate-body' =>
'{{Wikibase-datatype-body|Geo coordinate}}',
+ 'wikibase-listdatatypes-quantity-head' =>
'{{Wikibase-datatype-head|Quantity}}',
+ 'wikibase-listdatatypes-quantity-body' =>
'{{Wikibase-datatype-body|Quantity}}',
+ 'wikibase-listdatatypes-monolingual-text-head' =>
'{{Wikibase-datatype-head|Monolingual text}}',
+ 'wikibase-listdatatypes-monolingual-text-body' =>
'{{Wikibase-datatype-body|Monolingual text}}',
+ 'wikibase-listdatatypes-multilingual-text-head' =>
'{{Wikibase-datatype-head|Multilingual text}}',
+ 'wikibase-listdatatypes-multilingual-text-body' =>
'{{Wikibase-datatype-body|Multilingual text}}',
);
/** Achinese (Acèh)
diff --git a/repo/includes/specials/SpecialListDatatypes.php
b/repo/includes/specials/SpecialListDatatypes.php
index 07b3abc..3c7a887 100644
--- a/repo/includes/specials/SpecialListDatatypes.php
+++ b/repo/includes/specials/SpecialListDatatypes.php
@@ -39,13 +39,33 @@
}
public function execute( $subPage ) {
parent::execute( $subPage );
+
$this->getOutput()->addHTML( $this->msg(
'wikibase-listdatatypes-intro' ) );
- $this->getOutput()->addHTML( Html::openElement( 'ul' ));
+ $this->getOutput()->addHTML( Html::openElement( 'dl' ));
+
+ // some of the datatype descriptions
+ // 'wikibase-listdatatypes-wikibase-item-head'
+ // 'wikibase-listdatatypes-wikibase-item-body'
+ // 'wikibase-listdatatypes-commonsmedia-head'
+ // 'wikibase-listdatatypes-commonsmedia-body'
+ // 'wikibase-listdatatypes-geo-coordinate-head'
+ // 'wikibase-listdatatypes-geo-coordinate-body'
+ // 'wikibase-listdatatypes-quantity-head'
+ // 'wikibase-listdatatypes-quantity-body'
+ // 'wikibase-listdatatypes-monolingual-text-head'
+ // 'wikibase-listdatatypes-monolingual-text-body'
+ // 'wikibase-listdatatypes-multilingual-text-head'
+ // 'wikibase-listdatatypes-multilingual-text-body'
+ // 'wikibase-listdatatypes-time-head'
+ // 'wikibase-listdatatypes-text-body'
+
foreach (\Wikibase\Settings::get( 'dataTypes' ) as $dataTypeId
) {
- $this->getOutput()->addHTML( Html::openElement( 'li' ));
- $this->getOutput()->addHTML( htmlspecialchars(
$dataTypeId ) );
- $this->getOutput()->addHTML( Html::closeElement( 'li'
));
+ $baseKey = 'wikibase-listdatatypes-' . mb_strtolower(
$dataTypeId );
+ $out = Html::rawElement( 'dt', array(), $this->msg(
$baseKey . '-head' )->parse() )
+ . Html::rawElement( 'dd', array(), $this->msg( $baseKey
. '-body' )->parse() );
+ $this->getOutput()->addHTML( $out );
}
- $this->getOutput()->addHTML( Html::closeElement( 'ul' ));
+
+ $this->getOutput()->addHTML( Html::closeElement( 'dl' ));
}
}
--
To view, visit https://gerrit.wikimedia.org/r/47817
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I66ed2cf6e82d50fc0904c89d37e09daa88a2a6ad
Gerrit-PatchSet: 9
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: John Erling Blad <[email protected]>
Gerrit-Reviewer: Anja Jentzsch <[email protected]>
Gerrit-Reviewer: Denny Vrandecic <[email protected]>
Gerrit-Reviewer: Jens Ohlig <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: John Erling Blad <[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