Trevor Parscal has uploaded a new change for review.

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


Change subject: [WIP] Add tools for accessing categories and interwiki directly
......................................................................

[WIP] Add tools for accessing categories and interwiki directly

Change-Id: I2d2c9b87554fb2a0c90ed6944a58b38a37efa712
TODO: Add jump-to-section functionality to meta dialog and use it when these 
buttons are clicked
---
M VisualEditor.i18n.php
M VisualEditor.php
M modules/ve-mw/ui/tools/ve.ui.MWDialogTool.js
3 files changed, 48 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/79/90379/1

diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php
index afa4862..f1de196 100644
--- a/VisualEditor.i18n.php
+++ b/VisualEditor.i18n.php
@@ -41,6 +41,7 @@
        'visualeditor-beta-label' => 'beta',
        'visualeditor-beta-warning' => 'VisualEditor is in \'beta\'. You may 
encounter software issues, and you may not be able to edit parts of the page. 
Click "{{int:visualeditor-ca-editsource}}" to switch to wikitext mode – unsaved 
changes will be lost.',
        'visualeditor-browserwarning' => 'You are using a browser which is not 
officially supported by VisualEditor.',
+       'visualeditor-categories-tool' => 'Categories',
        'visualeditor-ca-createsource' => 'Create source',
        'visualeditor-ca-editsource' => 'Edit source',
        'visualeditor-ca-editsource-section' => 'edit source',
@@ -134,6 +135,7 @@
        'visualeditor-indentationbutton-outdent-tooltip' => 'Decrease 
indentation',
        'visualeditor-inspector-close-tooltip' => 'Close',
        'visualeditor-inspector-remove-tooltip' => 'Remove',
+       'visualeditor-interwiki-tool' => 'Languages',
        'visualeditor-languageinspector-block-tooltip' => 'Language block: $1',
        'visualeditor-languageinspector-block-tooltip-rtldirection' => ': Right 
to Left',
        'visualeditor-languageinspector-title' => 'Language',
@@ -301,6 +303,7 @@
 
 Refers to {{msg-mw|Visualeditor-ca-editsource}}.",
        'visualeditor-browserwarning' => 'Edit notice shown when VisualEditor 
loads, warning users that their browser is not officially supported',
+       'visualeditor-categories-tool' => 'Tool for opening the categories 
section of the meta dialog.',
        'visualeditor-ca-createsource' => 'Text for the create source link in 
the tab dropdown, if the page doesn\'t exist. It\'s shown next to the message 
{{msg-mw|vector-view-create}}, so they should be similar (for example, use a 
similar translation for "Create").
 
 If the page exists, the following link text is used: 
{{msg-mw|Visualeditor-ca-editsource}}',
@@ -484,6 +487,7 @@
        'visualeditor-indentationbutton-outdent-tooltip' => 'Tooltip text for 
list outdent button',
        'visualeditor-inspector-close-tooltip' => '{{Identical|Close}}',
        'visualeditor-inspector-remove-tooltip' => 'Tooltip text for the button 
to remove an annotation in an inspector',
+       'visualeditor-interwiki-tool' => 'Tool for opening the interwiki 
language links section of the meta dialog.',
        'visualeditor-languageinspector-block-tooltip' => 'Tooltip identifying 
language block properties inside VisualEditor.
 
 A "language block" is an element that is written in a language that is 
different from the surrounding language. For example, it can be the Belarusian 
name of a Belarusian person in the French Wikipedia.
diff --git a/VisualEditor.php b/VisualEditor.php
index 11f4224..74cf42d 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -584,6 +584,7 @@
                        'visualeditor-beta-label',
                        'visualeditor-beta-warning',
                        'visualeditor-browserwarning',
+                       'visualeditor-categories-tool',
                        'visualeditor-clearbutton-tooltip',
                        'visualeditor-dialog-action-apply',
                        'visualeditor-dialog-action-cancel',
@@ -661,6 +662,7 @@
                        'visualeditor-indentationbutton-outdent-tooltip',
                        'visualeditor-inspector-close-tooltip',
                        'visualeditor-inspector-remove-tooltip',
+                       'visualeditor-interwiki-tool',
                        'visualeditor-linkinspector-illegal-title',
                        'visualeditor-linkinspector-suggest-external-link',
                        'visualeditor-linkinspector-suggest-matching-page',
diff --git a/modules/ve-mw/ui/tools/ve.ui.MWDialogTool.js 
b/modules/ve-mw/ui/tools/ve.ui.MWDialogTool.js
index f318b7e..9dd92c2 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWDialogTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWDialogTool.js
@@ -134,3 +134,45 @@
 ve.ui.MWMetaDialogTool.static.dialog = 'meta';
 ve.ui.MWMetaDialogTool.static.autoAdd = false;
 ve.ui.toolFactory.register( ve.ui.MWMetaDialogTool );
+
+/**
+ * MediaWiki UserInterface categories tool.
+ *
+ * @class
+ * @extends ve.ui.DialogTool
+ * @constructor
+ * @param {ve.ui.Toolbar} toolbar
+ * @param {Object} [config] Configuration options
+ */
+ve.ui.MWCategoriesDialogTool = function VeUiMWCategoriesDialogTool( toolbar, 
config ) {
+       ve.ui.DialogTool.call( this, toolbar, config );
+};
+ve.inheritClass( ve.ui.MWCategoriesDialogTool, ve.ui.DialogTool );
+ve.ui.MWCategoriesDialogTool.static.name = 'categories';
+ve.ui.MWCategoriesDialogTool.static.group = 'utility';
+ve.ui.MWCategoriesDialogTool.static.icon = 'tag';
+ve.ui.MWCategoriesDialogTool.static.titleMessage = 
'visualeditor-categories-tool';
+ve.ui.MWCategoriesDialogTool.static.dialog = 'meta';
+ve.ui.MWCategoriesDialogTool.static.autoAdd = false;
+ve.ui.toolFactory.register( ve.ui.MWCategoriesDialogTool );
+
+/**
+ * MediaWiki UserInterface interwiki tool.
+ *
+ * @class
+ * @extends ve.ui.DialogTool
+ * @constructor
+ * @param {ve.ui.Toolbar} toolbar
+ * @param {Object} [config] Configuration options
+ */
+ve.ui.MWInterwikiDialogTool = function VeUiMWInterwikiDialogTool( toolbar, 
config ) {
+       ve.ui.DialogTool.call( this, toolbar, config );
+};
+ve.inheritClass( ve.ui.MWInterwikiDialogTool, ve.ui.DialogTool );
+ve.ui.MWInterwikiDialogTool.static.name = 'interwiki';
+ve.ui.MWInterwikiDialogTool.static.group = 'utility';
+ve.ui.MWInterwikiDialogTool.static.icon = 'language';
+ve.ui.MWInterwikiDialogTool.static.titleMessage = 
'visualeditor-interwiki-tool';
+ve.ui.MWInterwikiDialogTool.static.dialog = 'meta';
+ve.ui.MWInterwikiDialogTool.static.autoAdd = false;
+ve.ui.toolFactory.register( ve.ui.MWInterwikiDialogTool );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2d2c9b87554fb2a0c90ed6944a58b38a37efa712
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to