jenkins-bot has submitted this change and it was merged.
Change subject: Per legal, add "license prompt"
..
Per legal, add "license prompt"
Add extra license prefix text in front of the
license name:
Data available under Creative Commons Zero
where the license name is a URL link
Bug: T152553
Change-Id: If5c149aeac55c820772e89512e9f3ee37d8292be
---
M i18n/en.json
M i18n/qqq.json
M includes/JCDataContent.php
3 files changed, 15 insertions(+), 9 deletions(-)
Approvals:
MaxSem: Looks good to me, approved
jenkins-bot: Verified
diff --git a/i18n/en.json b/i18n/en.json
index 7f73a52..e4e452f 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -39,8 +39,9 @@
"jsonconfig-type-name-number": "number",
"jsonconfig-type-abbr-boolean": "(B)",
"jsonconfig-type-name-boolean": "boolean",
+ "jsonconfig-license": "Data available under $1",
"jsonconfig-license-or-later": "$1, or (at your option) any later
version",
- "jsonconfig-license-CC0-1.0": "Creative Commons Zero v1.0 Universal",
+ "jsonconfig-license-CC0-1.0": "Creative Commons Zero",
"jsonconfig-license-url-CC0-1.0":
"https://creativecommons.org/publicdomain/zero/1.0/;,
"right-jsonconfig-flush": "Manipulate JsonConfig via API",
"apihelp-jsonconfig-description": "Allows direct access to JsonConfig
subsystem.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index a40a222..c6aea8e 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -47,7 +47,8 @@
"jsonconfig-type-name-number": "Description of the type of data
contained in this column. Shown for columns that contain
numbers\n{{Identical|Number}}",
"jsonconfig-type-abbr-boolean": "A very short indicator of the type of
data contained in this column. Shown for columns that contain booleans (true or
false)",
"jsonconfig-type-name-boolean": "Description of the type of data
contained in this column. Shown for columns that contain booleans (true or
false)\n{{Identical|Boolean}}",
- "jsonconfig-license-or-later": "In case the data can be used with any
future versions of a license, this string will be used instead of
'jsonconfig-license-*' message.\n\nParameters:\n* $1 - license name, as defined
in the 'jsonconfig-license-*' messages",
+ "jsonconfig-license": "Shows license text prefix before giving the
specific license.\n\nParameters:\n* $1 - *
{{msg-mw|jsonconfig-license-or-later}} or {{msg-mw|jsonconfig-license-CC0-1.0}}
or other similar license messages",
+ "jsonconfig-license-or-later": "In case the data can be used with any
future versions of a license, this string will be used instead of
'jsonconfig-license-*' message.\n\nParameters:\n* $1 - license name, as defined
in the {{msg-mw|jsonconfig-license-CC0-1.0}} and similar messages",
"jsonconfig-license-CC0-1.0": "Name of the license",
"jsonconfig-license-url-CC0-1.0": "URL to the license description,
localized if available",
"right-jsonconfig-flush": "{{doc-right|jsonconfig-flush}}",
diff --git a/includes/JCDataContent.php b/includes/JCDataContent.php
index 0188d4f..b71fb02 100644
--- a/includes/JCDataContent.php
+++ b/includes/JCDataContent.php
@@ -72,10 +72,11 @@
$license = $this->getLicenseObject();
if ( $license ) {
$text = $license['text']->inLanguage( $lang )->plain();
- if ( $license['laterVersion'] ) {
- $text = wfMessage(
'jsonconfig-license-or-later', $text )
- ->inLanguage( $lang )->plain();
- }
+ // Legal suggested we don't add this just yet
+// if ( $license['laterVersion'] ) {
+// $text = wfMessage(
'jsonconfig-license-or-later', $text )
+// ->inLanguage( $lang )->plain();
+// }
$result->license = (object)[
'code' => $license['code'],
'text' => $text,
@@ -112,9 +113,12 @@
'href' => $license['url']->plain()
], $license['text']->plain() );
- if ( $license['laterVersion'] ) {
- $text = wfMessage(
'jsonconfig-license-or-later', $text )->plain();
- }
+ // Legal suggested we don't add this just yet
+// if ( $license['laterVersion'] ) {
+// $text = wfMessage(
'jsonconfig-license-or-later', $text )->plain();
+// }
+
+ $text = wfMessage( 'jsonconfig-license' )->rawParams(
$text )->parse();
$html = Html::rawElement( 'p', [ 'class' =>
'mw-jsonconfig-license' ], $text );
} else {