Daniel Werner has submitted this change and it was merged.
Change subject: Correctly accessing entity object for anon edit warning
......................................................................
Correctly accessing entity object for anon edit warning
Change I40bcc945610fe6f32e89fc12ea3b0def3126317a caused building a wrong
message key
for the anonymous edit warning. This change set adds a default edit warning as
fallback.
Change-Id: Ib3eddeffcda90f5ffe9f86bff968c00af34dd4ff
---
M repo/Wikibase.i18n.php
M repo/resources/Resources.php
M repo/resources/wikibase.ui.entityViewInit.js
3 files changed, 12 insertions(+), 14 deletions(-)
Approvals:
Daniel Werner: Verified; Looks good to me, approved
diff --git a/repo/Wikibase.i18n.php b/repo/Wikibase.i18n.php
index 6c8eabf..56bb387 100644
--- a/repo/Wikibase.i18n.php
+++ b/repo/Wikibase.i18n.php
@@ -90,10 +90,8 @@
'wikibase-entityselector-more' => 'more',
- 'wikibase-anonymouseditwarning-item' => "Warning: You are not logged in.
-Your IP address will be recorded in this item's edit history.",
- 'wikibase-anonymouseditwarning-property' => "Warning: You are not
logged in.
-Your IP address will be recorded in this property's edit history.",
+ 'wikibase-anonymouseditwarning' => "Warning: You are not logged in.
+Your IP address will be recorded in the edit history of this $1.",
'wikibase-restrictionedit-tooltip-message' => 'This page is protected.
Editing is not allowed.',
'wikibase-blockeduser-tooltip-message' => 'You are blocked from
editing.',
@@ -436,18 +434,11 @@
'wikibase-copyrighttooltip-acknowledge' => 'Label of the link to not
show the copyright warning again. A copyright warning is presented to the user
whenever the user is about to alter any data unless the warning is not
suppressed permanently by clicking this link.',
'wikibase-entityselector-more' => 'The entity selector is a user
interface widget that allows selecting an entity (see [[d:Wikidata/Glossary]]).
It consists out of an input field and a list of suggestions that is filled
according to the text typed into the input field. Initially, the list of
suggestions is filled with a certain number of suggestions. Clicking the link
labeled with this message will fill the list of suggestions with additional
suggestions. If there are no additional suggestions or no suggestions at all,
the link does not show up.
{{Identical|More}}',
- 'wikibase-anonymouseditwarning-item' => 'Warning message that is
displayed using the MediaWiki notification system each time the user starts to
edit something on an item (see [[d:Wikidata/Glossary]]) page (e.g. by clicking
an edit button). Basically, the message shall make the user aware that his/her
IP will be recorded when saving as long as not being logged in.
+ 'wikibase-anonymouseditwarning' => 'Warning message that is displayed
using the MediaWiki notification system each time the user starts to edit
something on an entity (see [[d:Wikidata/Glossary]]) page (e.g. by clicking an
edit button). Basically, the message shall make the user aware that his/her IP
will be recorded when saving as long as not being logged in. $1 is the
entity\'s name.
See also:
* {{msg-mw|Anoneditwarning}}
-* {{msg-mw|Sf autoedit anoneditwarning}}
-* {{msg-mw|Wikibase-anonymouseditwarning-property}}',
- 'wikibase-anonymouseditwarning-property' => 'Warning message that is
displayed using the MediaWiki notification system each time the user starts to
edit something on a property (see [[d:Wikidata/Glossary]]) page (e.g. by
clicking an edit button). Basically, the message shall make the user aware that
his/her IP will be recorded when saving as long as not being logged in.
-
-See also:
-* {{msg-mw|Anoneditwarning}}
-* {{msg-mw|Sf autoedit anoneditwarning}}
-* {{msg-mw|Wikibase-anonymouseditwarning-item}}',
+* {{msg-mw|Sf autoedit anoneditwarning}}',
'wikibase-restrictionedit-tooltip-message' => 'When editing a page (a
data item) is restricted for the current user, this message is displayed in a
tooltip bubble when hovering a tooltip anchor next to an input element, an edit
button or any other button (add, save, remove) that might trigger an action
altering the data item.',
'wikibase-blockeduser-tooltip-message' => 'When the current user is
blocked from editing a page (a data item), this message is displayed in a
tooltip bubble when hovering a tooltip anchor next to an input element, an edit
button or any other button (add, save, remove) that might trigger an action
altering the data item or creating a new item.',
'wikibase-move-error' => 'The data namespace is blocked against moving
pages within it and moving pages into it, because that will make the content
inconsistent both within it and on external wikis. The message uses "pages" in
this case as name for whats moved, but within the data namespace usually
contains "items". See also Wikidatas glossary on
[[m:Wikidata/Glossary#page|page]] and [[m:Wikidata/Glossary#item|item]].',
diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php
index ed41942..026cac4 100644
--- a/repo/resources/Resources.php
+++ b/repo/resources/Resources.php
@@ -55,6 +55,9 @@
'wikibase-sitelinks',
'wikibase-statements',
'wikibase-copyrighttooltip-acknowledge',
+ 'wikibase-anonymouseditwarning',
+ 'wikibase-entity-item',
+ 'wikibase-entity-property',
)
),
diff --git a/repo/resources/wikibase.ui.entityViewInit.js
b/repo/resources/wikibase.ui.entityViewInit.js
index f8044aa..f0a97bb 100644
--- a/repo/resources/wikibase.ui.entityViewInit.js
+++ b/repo/resources/wikibase.ui.entityViewInit.js
@@ -171,7 +171,11 @@
// Display anonymous user edit warning:
if ( mw.user && mw.user.isAnon() ) {
- mw.notify( mw.message(
'wikibase-anonymouseditwarning-' + wb.entity.type ) );
+ mw.notify(
+ mw.msg( 'wikibase-anonymouseditwarning',
+ mw.msg( 'wikibase-entity-' +
wb.entity.getType() )
+ )
+ );
}
// add copyright warning to 'save' button if there is
one:
--
To view, visit https://gerrit.wikimedia.org/r/52044
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3eddeffcda90f5ffe9f86bff968c00af34dd4ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf11
Gerrit-Owner: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: Daniel Werner <[email protected]>
Gerrit-Reviewer: Henning Snater <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits