Page MenuHomePhabricator

Link to Special:PageMigration in the MediaWiki:Tpt-saveok (or in the new msg)
Closed, ResolvedPublic

Description

Standard text of "MediaWiki:Tpt-saveok" (displayed after successfully marking for translation) in mediawiki.org was updated by @Nemo_bis with addition folowing phrase:

Please import any pre-existing translations: you can use [[Special:PageMigration]] for this purpose.

May be useful, if this text will be included into core functionality

  1. as addition to "MediaWiki:Tpt-saveok"
  2. or as separate message like "MediaWiki:Tpt-saveok-firstly", will be displayed only after first marking for translation.

Second option look more preferable.

Event Timeline

Kaganer renamed this task from Link to Special:PageMigration in the MediaWiki:Tpt-saveok (or) to Link to Special:PageMigration in the MediaWiki:Tpt-saveok (or in the new msg).Oct 20 2017, 12:33 AM
Nikerabbit triaged this task as Medium priority.Feb 25 2019, 1:24 PM

The second option makes sense to me. I think the wording should be as follows: "You can import pre-existing translation for this page (if any) using [[Special:PageMigration]]".

@Nikerabbit - Just wanted to confirm that the additional message will only be shown when the page is marked for revision for the first time, but not for the subsequent revision of the page.

@Nikerabbit - Just wanted to confirm that the additional message will only be shown when the page is marked for revision for the first time, but not for the subsequent revision of the page.

Yes, I think that is a good implementation, assuming it isn't difficult to determine whether page is being marked for the first time.

abi_ closed this task as Resolved.EditedMar 5 2019, 5:18 PM
abi_ added a subscriber: Pginer-WMF.

It was fairly straightforward to determine if the page was being marked for translation for the first time.

A minor (possible) problem though. If the TranslationNotifications extension is enabled, and this new message is displayed, the UI shows 2 messages that start with You can.... See image below.

image.png (340×934 px, 24 KB)

Few options,

1. Make it a ul > li

Sample,


You can,

  • Import pre-existing translation for this page (if any) using Special:PageMigration
  • Notify translators about this page.

The problem with this is that, there will be times when only a single list item will be shown and will require existing translated messages outdated.

2. Change the message

From,

You can import pre-existing translation for this page (if any) using [[Special:PageMigration]]

To,

Please use [[Special:PageMigration]] to import any pre-existing translations

Makes it look slightly better because we don't have two sentences starting with You can...

3. Add the new message in the success block

We could go ahead and add the new message inside the success block right after the string - The page can now be translated.

One might then argue, why You can notify translators about this page. might not be added there too.

4. Leave it as is

I think it looks OK. I would like to avoid it the way it is now if I could, but wouldn't want to spend too much time doing it.

@Nikerabbit, @Pginer-WMF - Thoughts?

I'm fine with leaving it as it is.

The repeated structure is not a big concern, and I don't think it is worth it to customize a unique message conditionally for each combination based on which messages appear each time.

I wonder if the message could be simplified to: "You can [import pre-existing translation] for this page (if any)" making the link to the Special:PageMigration page be part of the action. That would keep the message simpler, and with a style more consistent with the other one: highlighting the actions you can take as a link more than the place to take them.

I wonder if the message could be simplified to: "You can [import pre-existing translation] for this page (if any)" making the link to the Special:PageMigration page be part of the action.

I think this is good, since it matches the pattern of the subsequent message. I'll go ahead with this.

Change 494705 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/Translate@master] Add links to PageMigration when page is marked for translation

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

This turned out to be fairly straight forward as the data needed to make the assesment on whether a page is being marked for the first time was already available in the function scope.

Observation

Special:PageMigration is broken

Currently on my local, the Special:PageMigration does not work. There are multiple issues with the form in its current state. After discussion with Niklas, I've created separate issue to track these here,

  1. T217726: Special:PageMigration - Page search suggestion does not work
  2. T217727: Special:PageMigration - "query - messagecollection" API throws an error

I wanted to auto-populate the page textbox on the Special:PageMigration page when the user clicks on import pre-existing translation, but that'll have to wait for now since I do not understand the behavior of the migration page properly.

Test cases


Please find the test cases below,

TC #1 - PageMigration notice should appear when the page is marked for translation for the first time

  1. Create a page
  2. Mark it for translation

Expected Behavior

You should see the info message stating,

You can import pre-existing translation for this page (if any).

If TranslationNotifications extension is enabled, you should also see,

You can notify translators about this page.

See image below,

import-notification-1.png (268×1 px, 18 KB)

TC #2 - PageMigration notice should not appear when the page is marked for translation after edit

Follow up from TC #1

  1. Edit the page and add some more text.
  2. Save the page.
  3. Mark it for Translation again.

Expected Behavior
You should no longer see the message about importing pre-existing translations.

If TranslationNotifications extension is enabled, you should continue to see the following message,

You can notify translators about this page.

See image below,

import-notification-2.png (181×896 px, 12 KB)

Change 494705 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Add link to PageMigration when page is marked for translation

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

abi_ removed a project: Patch-For-Review.

Moving to QA.

abi_ moved this task from QA to Done on the User-abi_ board.

This is done. Screenshots from meta.wikimedia,

Marking the page for translation the first time,

image.png (240×949 px, 19 KB)

Marking the page for translation again after updates,

image.png (214×945 px, 15 KB)