Page MenuHomePhabricator

Explore how to make page translation syntax explained when editing a page
Closed, ResolvedPublic

Description

Current status

  • Added a notice that appears on top of the wiki text editor or wiki mode when using Visual editor. This notice contains links to documentation related to marking up translatable pages
  • If the user edits a translatable page using Visual editor - visual mode, a warning dialog is shown stating that editing of translatable page is not supported.

Possible enhancement

QA plan

Affected projects: All Wikimedia projects using Translate
Pre (or post)-deployment testing: Try editing a translatable source page with the wiki-text editor, and with VE in visual and wikitext mode. We should be seeing the documentation notice, and incase of VE in visual mode, we should see the warning dialog. The warning dialog should only appear once when a user starts editing a page, irrespective of how many times the the user switches between the visual and wikitext mode in VE.

Original requirement

As an editor, who doesn't know anything about Translate, tries to edit a translatable page, I don't know how to deal with the mark-up.

Translate extension has documentation, but it is not easily accessible from the edit view.

Expected outcome

Make it easier for editors editing translatable pages to find documentation describing the Translate extension specific markup.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 12 2018, 5:52 AM

Change 597759 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/Translate@master] Display help message when editing a source translation page

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

abi_ claimed this task.May 21 2020, 11:39 AM
abi_ added a subscriber: abi_.

I've added a short notice when users are editing a source translation page -

It links to this URL.

Feedback welcome.

abi_ moved this task from Incoming to In Development on the Design board.May 21 2020, 11:40 AM
abi_ added a comment.May 21 2020, 12:35 PM

I think the following pages would be helpful to provide to user's when editing a source translation page,

  1. Page translation administration > Markup examples
  2. Changing the source text
  3. Making changes to a translatable page

The third link may not be necessary as the second link already provides similar information in more detail.


There are a couple of options on how to display these to end users,

  1. Have it at the top of the page as a a message to users, similar to the previous screenshot.
  2. Have a link at the bottom of the page (similar to editing help) which pops out a dialog that displays these links.

Thoughts?

The third link may not be necessary as the second link already provides similar information in more detail.

I think so too. The second link also seems more approachable as it does not feel like a wall of text.

There are a couple of options on how to display these to end users,

I was thinking of a banner myself. That's what Semantic MediaWiki does by default these days.

One additional question though is do we want to it work also in visual editor, and whether to show different message there.

abi_ added a comment.May 28 2020, 11:52 AM

Task objective: Make it easier for editors editing translatable pages to find documentation describing the Translate extension specific markup.

abi_ updated the task description. (Show Details)May 28 2020, 12:04 PM
abi_ updated the task description. (Show Details)May 28 2020, 12:27 PM
abi_ added a comment.Jun 9 2020, 11:10 AM

There are three different editors / editor modes that we've to handle,

  1. Wikitext
  2. VisualEditor - Visual mode
  3. VisualEditor - Source mode

All three can be handled by using the TitleGetEditNotices, but for the VE - Visual mode we want to show an additional warning to users that,

You are editing a translatable page. Editing these in this editor is not yet officially supported. Please shift to the source editor.
[Accept] [Ignore]

This can be shown as a dialog box message to users. This was requested in T241278: Make a warning modal for when editing pages that use <translate> with VE.

Currently VE already shows a notice to users that can be removed once we make these changes.

abi_ added a comment.EditedJun 30 2020, 11:38 AM

Now displaying some documentation related to the Translate markup when the user edits a source translation page. See screenshots below for more details on how this looks.

Screenshots

Wikitext editor

VE - Visual mode
Additional warning given that modification of translatable pgaes is not supported via the visual mode of the VE editor.

VE - Source mode

After removing the warning from VE

TODO

  1. Remove the additional notice that appears when users try to edit the source translation page on VE - source mode.
  2. See if it is possible to switch the mode from Visual to Source by providing an additional button to the user on the warning dialog.
abi_ moved this task from In Development to For Review on the Design board.Jun 30 2020, 11:38 AM

Change 609906 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/VisualEditor@master] Remove warning shown when editing a translatable page source

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

Change 597759 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Display help message when editing a translatable page source

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

Change 609906 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Remove warning shown when editing a translatable page source

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

abi_ updated the task description. (Show Details)Jul 9 2020, 1:20 PM
Amire80 added a subscriber: Amire80.Jul 9 2020, 7:21 PM

This has been deployed on Mediawiki.org. Tested this, and it is working as expected.

abi_ closed this task as Resolved.Jul 16 2020, 7:51 AM