Mattflaschen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/85116
Change subject: Add 'first edit' tour for VE
......................................................................
Add 'first edit' tour for VE
Change-Id: Ifbf41d24175d84c4af2d88ec2c48c111dd306be1
---
M GuidedTour.i18n.php
M GuidedTourHooks.php
2 files changed, 34 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GuidedTour
refs/changes/16/85116/1
diff --git a/GuidedTour.i18n.php b/GuidedTour.i18n.php
index 99b410f..be7f5a6 100644
--- a/GuidedTour.i18n.php
+++ b/GuidedTour.i18n.php
@@ -66,6 +66,10 @@
'guidedtour-tour-firstedit-preview-description' => 'Clicking
"{{int:showpreview}}" allows you to check what the page will look like with
your changes. Just don\'t forget to save!',
'guidedtour-tour-firstedit-save-title' => 'You\'re almost done!',
'guidedtour-tour-firstedit-save-description' => 'When you\'re ready,
clicking "{{int:savearticle}}" will make your changes visible for everyone.',
+
+ 'guidedtour-tour-firsteditve-edit-page-description' => 'Click the
"{{int:vector-view-edit}} {{int:visualeditor-beta-appendix}}" button to make
your changes.',
+ 'guidedtour-tour-firsteditve-edit-section-description' => 'There are
"{{int:editsection}} {{int:visualeditor-beta-appendix}}" links for each major
section in an article, so you can focus on just that part.',
+ 'guidedtour-tour-firsteditve-save-description' => 'When you\'re ready,
clicking "{{int:visualeditor-toolbar-savedialog}}" will make your changes
visible for everyone.',
);
/** Message documentation (Message documentation)
@@ -149,6 +153,10 @@
See also:
* {{msg-mw|savearticle}}',
+
+ 'guidedtour-tour-firsteditve-edit-page-description' => 'Description of
the step of the firsteditve tour pointing to the VE edit button',
+ 'guidedtour-tour-firsteditve-edit-section-description' => 'Description
of the step of the firsteditve tour pointing to the VE section edit button',
+ 'guidedtour-tour-firsteditve-save-description' => 'Description of step
of the firsteditve tour explaining how to save in VE',
);
/** Arabic (العربية)
diff --git a/GuidedTourHooks.php b/GuidedTourHooks.php
index 4152177..02eeb44 100644
--- a/GuidedTourHooks.php
+++ b/GuidedTourHooks.php
@@ -203,7 +203,7 @@
*/
public static function onResourceLoaderRegisterModules(
&$resourceLoader ) {
$dir = __DIR__ . DIRECTORY_SEPARATOR;
- $module = array(
+ $firstEditModule = array(
'scripts' => 'firstedit.js',
'localBasePath' => $dir . 'modules/tours',
'remoteExtPath' => 'GuidedTour/modules/tours',
@@ -225,15 +225,37 @@
// Check whether VE is installed to determine which messages to
add.
if ( class_exists( 'VisualEditorHooks' ) ) {
array_push(
- $module['messages'],
+ $firstEditModule['messages'],
'visualeditor-ca-editsource',
'guidedtour-tour-firstedit-edit-page-visualeditor-description',
'visualeditor-ca-editsource-section',
'guidedtour-tour-firstedit-edit-section-visualeditor-description'
);
+
+ $resourceLoader->register(
'ext.guidedTour.tour.firsteditve', array(
+ 'scripts' => 'firsteditve.js',
+ 'localBasePath' => $dir .
'modules/tours',
+ 'remoteExtPath' =>
'GuidedTour/modules/tours',
+ 'dependencies' => array(
+ 'ext.guidedTour',
+ ),
+ 'messages' => array(
+ 'vector-view-edit',
+ 'visualeditor-beta-appendix',
+
'visualeditor-toolbar-savedialog',
+ 'editsection',
+
'guidedtour-tour-firstedit-edit-page-title',
+
'guidedtour-tour-firsteditve-edit-page-description',
+
'guidedtour-tour-firstedit-edit-section-title',
+
'guidedtour-tour-firsteditve-edit-section-description',
+
'guidedtour-tour-firstedit-save-title',
+
'guidedtour-tour-firsteditve-save-description',
+ ),
+ )
+ );
} else {
array_push(
- $module['messages'],
+ $firstEditModule['messages'],
'vector-view-edit',
'guidedtour-tour-firstedit-edit-page-description',
'editsection',
@@ -241,6 +263,6 @@
);
}
- $resourceLoader->register( 'ext.guidedTour.tour.firstedit',
$module );
+ $resourceLoader->register( 'ext.guidedTour.tour.firstedit',
$firstEditModule );
}
}
--
To view, visit https://gerrit.wikimedia.org/r/85116
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifbf41d24175d84c4af2d88ec2c48c111dd306be1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GuidedTour
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits