Jonas Kress (WMDE) has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/315948

Change subject: Add title attribute to "add" for adding a statement and 
statement group 
......................................................................

Add title attribute to "add" for adding a statement and statement group 

Bug: T139360
Change-Id: I71c62b3d4e9fdb2bfab468adf12fbbed791456a5
---
M repo/i18n/en.json
M repo/i18n/qqq.json
M view/resources/jquery/wikibase/jquery.wikibase.statementgrouplistview.js
M view/resources/jquery/wikibase/jquery.wikibase.statementlistview.js
M view/resources/jquery/wikibase/resources.php
M view/resources/wikibase/view/StructureEditorFactory.js
M view/resources/wikibase/view/ViewFactory.js
7 files changed, 24 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/48/315948/1

diff --git a/repo/i18n/en.json b/repo/i18n/en.json
index 177580b..48a98ef 100644
--- a/repo/i18n/en.json
+++ b/repo/i18n/en.json
@@ -26,6 +26,10 @@
        "wikibase-addreference": "add reference",
        "wikibase-save-inprogress": "Saving…",
        "wikibase-remove-inprogress": "Removing…",
+       "wikibase-statementlistview-add": "add",
+       "wikibase-statementlistview-add-tooltip": "Add a new value.",
+       "wikibase-statementgrouplistview-add": "add",
+       "wikibase-statementgrouplistview-add-tooltip": "Add a new statement.",
        "wikibase-entitytermsview-entitytermsforlanguagelistview-toggler": "In 
more languages",
        
"wikibase-entitytermsview-entitytermsforlanguagelistview-configure-link": 
"https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Wikibase/Configuring_languages";,
        
"wikibase-entitytermsview-entitytermsforlanguagelistview-configure-link-label": 
"Configure",
diff --git a/repo/i18n/qqq.json b/repo/i18n/qqq.json
index 2e4151b..0ad830f 100644
--- a/repo/i18n/qqq.json
+++ b/repo/i18n/qqq.json
@@ -57,6 +57,10 @@
        "wikibase-addreference": "Label of the link to add a reference to a 
statement (see [[d:Wikidata:Glossary]]).",
        "wikibase-save-inprogress": "[[File:Screenshot WikidataRepo 2012-05-25 
L.png|right|350px]]\n[[File:Screenshot WikidataRepo 2012-05-25 
J.png|right|350px]]\n[[File:Screenshot WikidataRepo 2012-05-25 
K.png|right|350px]]\nThis is a generic placeholder message used while a save is 
in progress, and replaces the save and cancel links.\n{{Identical|Saving}}",
        "wikibase-remove-inprogress": "[[File:Screenshot WikidataRepo 
2012-05-25 L.png|right|350px]]\n[[File:Screenshot WikidataRepo 2012-05-25 
M.png|right|350px]]\nThis is a generic placeholder message used while a remove 
is in progress, and replaces the edit and remove.",
+       "wikibase-statementlistview-add": "[[File:Screenshot WikidataRepo 
2012-05-13 F.png|right|0x150px]]\n[[File:Screenshot WikidataRepo 2012-05-13 
A.png|right|0x150px]]\nThis is a text used for a link (fig. 3 on 
[[m:Wikidata/Notes/JavaScript ui implementation]]) that puts the user interface 
into edit mode for an additional element of type statement.\n{{Identical|Add}}",
+       "wikibase-statementlistview-add-tooltip": "[[File:Screenshot 
WikidataRepo 2012-05-13 F.png|right|0x150px]]\n[[File:Screenshot WikidataRepo 
2012-05-13 A.png|right|0x150px]]\nThis is a tooltip text used for a link (fig. 
3 on [[m:Wikidata/Notes/JavaScript ui implementation]]) that puts the user 
interface into edit mode for an additional element of type 
statement.\n{{Identical|Add}}",
+       "wikibase-statementgrouplistview-add": "[[File:Screenshot WikidataRepo 
2012-05-13 F.png|right|0x150px]]\n[[File:Screenshot WikidataRepo 2012-05-13 
A.png|right|0x150px]]\nThis is a text used for a link (fig. 3 on 
[[m:Wikidata/Notes/JavaScript ui implementation]]) that puts the user interface 
into edit mode for an additional element of type statement 
list.\n{{Identical|Add}}",
+       "wikibase-statementgrouplistview-add-tooltip": "[[File:Screenshot 
WikidataRepo 2012-05-13 F.png|right|0x150px]]\n[[File:Screenshot WikidataRepo 
2012-05-13 A.png|right|0x150px]]\nThis is a tooltip text used for a link (fig. 
3 on [[m:Wikidata/Notes/JavaScript ui implementation]]) that puts the user 
interface into edit mode for an additional element of type statement 
list.\n{{Identical|Add}}",
        "wikibase-entitytermsview-entitytermsforlanguagelistview-toggler": 
"Link to show/hide the list of labels, aliases and descriptions in the user's 
languages. The list is part of an entity's user interface representation header 
and may be used to view and alter labels, aliases and descriptions in the 
languages configured by the user.",
        
"wikibase-entitytermsview-entitytermsforlanguagelistview-configure-link": "Link 
to (URL of) the help page providing information about how to configure the list 
of languages. The link is shown next to the link to show/hide the language list 
if the user has JavaScript enabled and not yet configured one or more 
[[mw:Extension:Babel|Babel boxes]] on his/her user page.",
        
"wikibase-entitytermsview-entitytermsforlanguagelistview-configure-link-label": 
"Label of the link to the help page providing information about how to 
configure the list of languages. The link is shown next to the link to 
show/hide the language list if the user has JavaScript enabled and not yet 
configured one or more [[mw:Extension:Babel|Babel boxes]] on his/her user 
page.\n{{Identical|Configure}}",
diff --git 
a/view/resources/jquery/wikibase/jquery.wikibase.statementgrouplistview.js 
b/view/resources/jquery/wikibase/jquery.wikibase.statementgrouplistview.js
index 1c8a1a0..68d983a 100644
--- a/view/resources/jquery/wikibase/jquery.wikibase.statementgrouplistview.js
+++ b/view/resources/jquery/wikibase/jquery.wikibase.statementgrouplistview.js
@@ -1,4 +1,4 @@
-( function( wb, $ ) {
+( function( mw, wb, $ ) {
        'use strict';
 
        var PARENT = $.ui.TemplatedWidget;
@@ -74,7 +74,7 @@
 
                this.element.statementgrouplabelscroll();
 
-               this._statementGroupAdder = this.options.getAdder( 
this.enterNewItem.bind( this ), this.element );
+               this._statementGroupAdder = this.options.getAdder( 
this.enterNewItem.bind( this ), this.element, mw.msg( 
'wikibase-statementgrouplistview-add' ), mw.msg( 
'wikibase-statementgrouplistview-add-tooltip' ) );
        },
 
        /**
@@ -236,4 +236,4 @@
        }
 } );
 
-}( wikibase, jQuery ) );
+}( mediaWiki, wikibase, jQuery ) );
diff --git 
a/view/resources/jquery/wikibase/jquery.wikibase.statementlistview.js 
b/view/resources/jquery/wikibase/jquery.wikibase.statementlistview.js
index 2464492..9f9c1d8 100644
--- a/view/resources/jquery/wikibase/jquery.wikibase.statementlistview.js
+++ b/view/resources/jquery/wikibase/jquery.wikibase.statementlistview.js
@@ -123,7 +123,7 @@
                        $containerWrapper = mw.wbTemplate( 
'wikibase-toolbar-wrapper', '' ).appendTo( this.element );
                }
 
-               this._statementAdder = this.options.getAdder( 
this.enterNewItem.bind( this ), $containerWrapper );
+               this._statementAdder = this.options.getAdder( 
this.enterNewItem.bind( this ), $containerWrapper, mw.msg( 
'wikibase-statementlistview-add' ), mw.msg( 
'wikibase-statementlistview-add-tooltip' ) );
        },
 
        /**
diff --git a/view/resources/jquery/wikibase/resources.php 
b/view/resources/jquery/wikibase/resources.php
index 2c70db8..3bda4f2 100644
--- a/view/resources/jquery/wikibase/resources.php
+++ b/view/resources/jquery/wikibase/resources.php
@@ -71,6 +71,10 @@
                                'jquery.wikibase.listview',
                                'wikibase.datamodel.StatementGroupSet',
                        ),
+                       'messages' => array(
+                               'wikibase-statementgrouplistview-add',
+                               'wikibase-statementgrouplistview-add-tooltip',
+                       ),
                ),
 
                'jquery.wikibase.statementgroupview' => $moduleTemplate + array(
@@ -95,6 +99,10 @@
                                'jquery.wikibase.listview',
                                'wikibase.datamodel.StatementList',
                        ),
+                       'messages' => array(
+                                       'wikibase-statementlistview-add',
+                                       
'wikibase-statementlistview-add-tooltip',
+                       ),
                ),
 
                'jquery.wikibase.descriptionview' => $moduleTemplate + array(
diff --git a/view/resources/wikibase/view/StructureEditorFactory.js 
b/view/resources/wikibase/view/StructureEditorFactory.js
index c36659f..6e4ac0e 100644
--- a/view/resources/wikibase/view/StructureEditorFactory.js
+++ b/view/resources/wikibase/view/StructureEditorFactory.js
@@ -16,8 +16,8 @@
                this._toolbarFactory = toolbarFactory;
        };
 
-       SELF.prototype.getAdder = function( add, $dom, label ) {
-               var options = { label: label };
+       SELF.prototype.getAdder = function( add, $dom, label, title ) {
+               var options = { label: label, title: title };
                $dom = this._toolbarFactory.getToolbarContainer( $dom );
                $dom.on(
                        'addtoolbaradd.addtoolbar',
diff --git a/view/resources/wikibase/view/ViewFactory.js 
b/view/resources/wikibase/view/ViewFactory.js
index 9bec537..f5cd926 100644
--- a/view/resources/wikibase/view/ViewFactory.js
+++ b/view/resources/wikibase/view/ViewFactory.js
@@ -306,11 +306,11 @@
 
        SELF.prototype._getAdderWithStartEditing = function( 
startEditingCallback ) {
                var structureEditorFactory = this._structureEditorFactory;
-               return function( doAdd, $dom, label ) {
+               return function( doAdd, $dom, label, title ) {
                        var newDoAdd = function() {
                                return startEditingCallback().then( doAdd );
                        };
-                       return structureEditorFactory.getAdder( newDoAdd, $dom, 
label );
+                       return structureEditorFactory.getAdder( newDoAdd, $dom, 
label, title );
                };
        };
 

-- 
To view, visit https://gerrit.wikimedia.org/r/315948
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I71c62b3d4e9fdb2bfab468adf12fbbed791456a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) <jonas.kr...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to