jenkins-bot has submitted this change and it was merged.
Change subject: Add flag 'D' for wikidata edits on old watchlist/recentchanges
..
Add flag 'D' for wikidata edits on old watchlist/recentchanges
Using $wgRecentChangesFlag for this,
which was added with If69de05c to core.
Change-Id: Idc666db1b1b2b6656fa7b593f564f3f9c885f35f
---
M client/WikibaseClient.i18n.php
M client/WikibaseClient.php
M client/includes/recentchanges/ExternalChangesLine.php
M client/tests/selenium/special/client_rc_and_wl_spec.rb
M selenium/lib/pages/client_recent_changes_page.rb
M selenium/lib/pages/watchlist_page.rb
6 files changed, 28 insertions(+), 8 deletions(-)
Approvals:
Tobias Gritschacher: Looks good to me, approved
jenkins-bot: Verified
diff --git a/client/WikibaseClient.i18n.php b/client/WikibaseClient.i18n.php
index 25d7ff2..bbdcb8d 100644
--- a/client/WikibaseClient.i18n.php
+++ b/client/WikibaseClient.i18n.php
@@ -58,6 +58,8 @@
'wikibase-property-notsupportedyet' => 'Wikibase does not yet support
property type for $1 property.',
'wikibase-rc-hide-wikidata' => '$1 Wikidata',
'wikibase-rc-show-wikidata-pref' => 'Show Wikidata edits in recent
changes',
+ 'wikibase-rc-wikibase-edit-letter' => 'D',
+ 'wikibase-rc-wikibase-edit-title' => 'Wikidata edit',
'wikibase-watchlist-show-changes-pref' => 'Show Wikidata edits in your
watchlist',
'wikibase-error-serialize-error' => 'Failed to serialize data.',
'wikibase-error-invalid-entity-id' => 'The ID entered is unknown to the
system. Please use a valid entity ID.',
@@ -166,6 +168,8 @@
Parameters:
* $1 - a link with the text {{msg-mw|show}} or {{msg-mw|hide}}',
'wikibase-rc-show-wikidata-pref' => 'Option in the recent changes
section of preferences to show wikibase changes by default in recent changes.',
+ 'wikibase-rc-wikibase-edit-letter' => "Very short form of \"'''wikidata
edit'''\". Used in [[Special:RecentChanges]] and [[Special:Watchlist]].",
+ 'wikibase-rc-wikibase-edit-title' => 'Tooltip for
{{msg-mw|wikibase-rc-wikibase-edit-letter}}',
'wikibase-watchlist-show-changes-pref' => 'Option in the watchlist
section of preferences to always show wikibase edits by default in the
watchlist.',
'wikibase-error-serialize-error' => 'Generic error for when entity data
failed to serialize or cannot be handled.',
'wikibase-error-invalid-entity-id' => 'Generic error message when an
invalid entity ID was entered.',
diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php
index 0529a95..7bdaa41 100644
--- a/client/WikibaseClient.php
+++ b/client/WikibaseClient.php
@@ -49,7 +49,7 @@
call_user_func( function() {
global $wgExtensionCredits, $wgExtensionMessagesFiles,
$wgAutoloadClasses, $wgHooks;
global $wgAPIMetaModules, $wgSpecialPages, $wgSpecialPageGroups,
$wgResourceModules;
- global $wgWBClientStores, $wgWBClientSettings;
+ global $wgWBClientStores, $wgWBClientSettings, $wgRecentChangesFlags;
$wgExtensionCredits['wikibase'][] = array(
@@ -174,6 +174,11 @@
if ( defined( 'WB_EXPERIMENTAL_FEATURES' ) && WB_EXPERIMENTAL_FEATURES
) {
include_once( $dir . 'config/WikibaseClient.experimental.php' );
}
+
+ $wgRecentChangesFlags['wikibase-edit'] = array(
+ 'letter' => 'wikibase-rc-wikibase-edit-letter',
+ 'title' => 'wikibase-rc-wikibase-edit-title'
+ );
} );
$wgWBSettings =& $wgWBClientSettings; // B/C alias
diff --git a/client/includes/recentchanges/ExternalChangesLine.php
b/client/includes/recentchanges/ExternalChangesLine.php
index 68d9a7e..7c1cf18 100644
--- a/client/includes/recentchanges/ExternalChangesLine.php
+++ b/client/includes/recentchanges/ExternalChangesLine.php
@@ -100,6 +100,7 @@
}
$line .= self::changeSeparator();
+ $line .= $cl->recentChangesFlags( array( 'wikibase-edit' =>
true ), '' ) . ' ';
$title = $rc->getTitle();
$line .= \Linker::link( $title );
diff --git a/client/tests/selenium/special/client_rc_and_wl_spec.rb
b/client/tests/selenium/special/client_rc_and_wl_spec.rb
index bf59551..a3f2806 100644
--- a/client/tests/selenium/special/client_rc_and_wl_spec.rb
+++ b/client/tests/selenium/special/client_rc_and_wl_spec.rb
@@ -41,7 +41,6 @@
page.watch_article(article_title)
end
visit_page(WatchlistPage) do |page|
-
page.wlFirstResultUserLinkNoWikidata_element.text.downcase.include?(WIKI_ADMIN_USERNAME.downcase).should
be_false
page.show_wikibase
page.wlFirstResultDiffLink?.should be_true
page.wlFirstResultUserLink?.should be_true
@@ -51,6 +50,7 @@
page.wlFirstResultLabelLink_element.text.should == article_title
page.wlFirstResultIDLink?.should be_true
page.wlFirstResultIDLink_element.te