Anomie has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/347434 )
Change subject: Add terms to the action API
......................................................................
Add terms to the action API
Bug: T42459
Change-Id: I6f50a552a8b2798e4c45654ab0cec7800db484df
---
M WikimediaMessages.hooks.php
M extension.json
M i18n/wikimedia/en.json
M i18n/wikimedia/qqq.json
4 files changed, 25 insertions(+), 0 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMessages
refs/changes/34/347434/1
diff --git a/WikimediaMessages.hooks.php b/WikimediaMessages.hooks.php
index b6dfa52..b210b3a 100644
--- a/WikimediaMessages.hooks.php
+++ b/WikimediaMessages.hooks.php
@@ -167,6 +167,24 @@
}
/**
+ * Override with Wikimedia's site-specific copyright message.
+ * @param Message &$msg
+ * @param IContextSource $context
+ * @return bool
+ */
+ public static function onAPICopyrightWarning( Message &$msg,
IContextSource $context ) {
+ global $wgDBname;
+
+ if ( in_array( $wgDBname, array( 'wikidatawiki',
'testwikidatawiki' ) ) ) {
+ $msg = $context->msg( 'wikidata-api-terms' );
+ } else {
+ $msg = $context->msg( 'wikimedia-api-terms' );
+ }
+
+ return true;
+ }
+
+ /**
* Override with Wikimedia's site-specific copyright message defaults
with the CC/GFDL
* semi-dual license fun!
*
diff --git a/extension.json b/extension.json
index df77512..48b391a 100644
--- a/extension.json
+++ b/extension.json
@@ -66,6 +66,9 @@
"EditPageCopyrightWarning": [
"WikimediaMessagesHooks::onEditPageCopyrightWarning"
],
+ "APICopyrightWarning": [
+ "WikimediaMessagesHooks::onAPICopyrightWarning"
+ ],
"MobileLicenseLink": [
"WikimediaMessagesHooks::onMobileLicenseLink"
],
diff --git a/i18n/wikimedia/en.json b/i18n/wikimedia/en.json
index a168afb..3115bdf 100644
--- a/i18n/wikimedia/en.json
+++ b/i18n/wikimedia/en.json
@@ -194,6 +194,8 @@
"wikimedia-copyright": "Text is available under the <a
href=\"https://creativecommons.org/licenses/by-sa/3.0/\">Creative Commons
Attribution-ShareAlike License</a>;\nadditional terms may apply.\nSee <a
href=\"https://wikimediafoundation.org/wiki/Terms_of_Use\">Terms of Use</a> for
details.",
"wikidata-copyright": "All structured data from the main and property
namespace is available under the <a
href=\"https://creativecommons.org/publicdomain/zero/1.0/\" title=\"Definition
of the Creative Commons CC0 License\">Creative Commons CC0 License</a>;\ntext
in the other namespaces is available under the <a
href=\"https://creativecommons.org/licenses/by-sa/3.0/\" title=\"Definition of
the Creative Commons Attribution-ShareAlike License\">Creative Commons
Attribution-ShareAlike License</a>;\nadditional terms may apply.\nSee <a
href=\"https://wikimediafoundation.org/wiki/Terms_of_Use\" title=\"Wikimedia
Foundation Terms of Use\">Terms of Use</a> for details.",
"wikimedia-copyrightwarning": "By saving changes, you agree to the
[https://wikimediafoundation.org/wiki/Terms_of_Use Terms of Use], and you
irrevocably agree to release your contribution under the
[https://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License
CC BY-SA 3.0 License] and the
[https://en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License
GFDL].\nYou agree that a hyperlink or URL is sufficient attribution under the
Creative Commons license.",
+ "wikimedia-api-terms": "Terms: By using this API, you agree to
Wikimedia's [[wmf:Terms of Use|Terms of Use]] and [[wmf:Privacy policy|Privacy
Policy]], and you irrevocably agree to release modifications or additions made
through the API under the [https://creativecommons.org/licenses/by-sa/3.0/
CC-BY-SA 3.0 License] and the [https://www.gnu.org/copyleft/fdl.html GFDL].",
+ "wikidata-api-terms": "Terms: By using this API, you agree to
Wikimedia's [[wmf:Terms of Use|Terms of Use]] and [[wmf:Privacy policy|Privacy
Policy]], and you irrevocably agree to release modifications or additions made
through the API under the [https://creativecommons.org/publicdomain/zero/1.0/
Creative Commons CC0 License], or the
[https://creativecommons.org/licenses/by-sa/3.0/ CC-BY-SA 3.0 License] and the
[https://www.gnu.org/copyleft/fdl.html GFDL], as appropriate for the namespace
contributed to.",
"wikimedia-mobile-license-links": "<a
href=\"https://creativecommons.org/licenses/by-sa/3.0/\" title=\"Definition of
the Creative Commons Attribution-ShareAlike License\" target=\"_blank\">CC
BY-SA 3.0</a> and <a href=\"https://www.gnu.org/licenses/fdl.html\"
title=\"Definition of the GFDL\" target=\"_blank\">GFDL</a>",
"wikibase-repo-name": "Wikidata",
"wikibase-statementsection-identifiers": "Identifiers",
diff --git a/i18n/wikimedia/qqq.json b/i18n/wikimedia/qqq.json
index dc255fe..30ba05d 100644
--- a/i18n/wikimedia/qqq.json
+++ b/i18n/wikimedia/qqq.json
@@ -222,6 +222,8 @@
"wikimedia-copyright": "{{Identical/Wikimedia-licensing}}\nThis message
is displayed in the site footer. It is the default licensing policy for most
Wikimedia sites. Replace Terms_of_Use in the URL with
Special:MyLanguage/Terms_of_Use/<your_language>, for example,
Special:MyLanguage/Terms_of_Use/fr for French.",
"wikidata-copyright": "This message is displayed in the site footer. It
is the special licensing policy for the Wikidata project.\n\nThe attribute
\"<code>title</code>\" values (\"Definition of the Creative Commons CC0
License\", \"Definition of the Creative Commons Attribution-ShareAlike
License\" and \"Wikimedia Foundation Terms of Use\") are also translatable.
Replace Terms_of_Use in the URL with
Special:MyLanguage/Terms_of_Use/<your_language>, for example,
Special:MyLanguage/Terms_of_Use/fr for French.",
"wikimedia-copyrightwarning": "* Warning: the correct default licenses
links are to the creativecommons.org
([https://creativecommons.org/licenses/by-sa/3.0/] or e.g.
[https://creativecommons.org/licenses/by-sa/3.0/deed.fr]) and fsf.org
([https://www.gnu.org/copyleft/fdl.html]) pages, which should be used in the
translations to languages other than English. Customisation may be possible on
local wikis upon community consensus.\n* Replace Terms_of_Use in the URL with
Special:MyLanguage/Terms_of_Use/<your_language>, for example,
Special:MyLanguage/Terms_of_Use/fr for French.\n* You can translate the terms
of use at [[m:Terms of use]] and link that version instead, if no translation
is available on wikimediafoundation.org.\n\nRefers to
{{msg-mw|Savearticle}}.\n\n{{Identical/Wikimedia-licensing}}",
+ "wikimedia-api-terms": "* Warning: the correct default licenses links
are to the creativecommons.org
([https://creativecommons.org/licenses/by-sa/3.0/] or e.g.
[https://creativecommons.org/licenses/by-sa/3.0/deed.fr]) and fsf.org
([https://www.gnu.org/copyleft/fdl.html]) pages, which should be used in the
translations to languages other than English. Customisation may be possible on
local wikis upon community consensus.\n* Replace Terms_of_Use in the URL with
Special:MyLanguage/Terms_of_Use/<your_language>, for example,
Special:MyLanguage/Terms_of_Use/fr for French.\n* You can translate the terms
of use at [[m:Terms of use]] and link that version instead, if no translation
is available on wikimediafoundation.org.\n\nSee also
{{msg-wm|wikimedia-copyrightwarning}}",
+ "wikidata-api-terms": "* Warning: the correct default licenses links
are to the creativecommons.org
([https://creativecommons.org/licenses/by-sa/3.0/] or e.g.
[https://creativecommons.org/licenses/by-sa/3.0/deed.fr]) and fsf.org
([https://www.gnu.org/copyleft/fdl.html]) pages, which should be used in the
translations to languages other than English. Customisation may be possible on
local wikis upon community consensus.\n* Replace Terms_of_Use in the URL with
Special:MyLanguage/Terms_of_Use/<your_language>, for example,
Special:MyLanguage/Terms_of_Use/fr for French.\n* You can translate the terms
of use at [[m:Terms of use]] and link that version instead, if no translation
is available on wikimediafoundation.org.\n\nSee also
{{msg-wm|wikimedia-copyrightwarning}}",
"wikimedia-mobile-license-links": "Links to the licenses used by most
Wikimedia projects. Warning: the correct default licenses links are to the
creativecommons.org ([https://creativecommons.org/licenses/by-sa/3.0/] or e.g.
[https://creativecommons.org/licenses/by-sa/3.0/deed.fr]) and fsf.org
([https://www.gnu.org/copyleft/fdl.html]) pages, which should be used in the
translations to languages other than English. Customisation may be possible on
local wikis upon community consensus. Refers to
{{msg-mw|Wikimedia-copyrightwarning}}.",
"wikibase-repo-name": "Site name of Wikibase repository that the
Wikibase Clients are connected to. Used in \"WBREPONAME\" magic word in the
client in messages that refer to it, so to be more clear to end users than
saying \"Wikibase\" in the user interface. For example, instead of \"Wikibase
item changed\" as a summary in recent changes, it can say \"Wikidata item
changed\" or \"Show Wikidata edits in your watchlist\"\n{{Identical|Wikidata}}",
"wikibase-statementsection-identifiers": "Section heading on Wikidata
entity pages for identifier
statements.\n{{Related|wikibase-statementsection-statements}}\n{{Identical|Identifier}}",
--
To view, visit https://gerrit.wikimedia.org/r/347434
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f50a552a8b2798e4c45654ab0cec7800db484df
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits