Page MenuHomePhabricator

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

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 created this task.Oct 20 2017, 12:32 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 20 2017, 12:32 AM
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 moved this task from Backlog to Translate twn on the User-Nikerabbit board.
Nikerabbit triaged this task as Normal 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]]".

abi_ moved this task from Backlog to In Progress on the User-abi_ board.Mar 4 2019, 6:29 AM
abi_ added a subscriber: abi_.Mar 4 2019, 7:20 AM

@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.

abi_ claimed this task.Mar 4 2019, 7:20 AM

@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_ moved this task from In Progress to Backlog on the User-abi_ board.Mar 4 2019, 9:34 AM
abi_ moved this task from Backlog to In Progress on the User-abi_ board.Mar 4 2019, 1:10 PM
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.

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?

abi_ reopened this task as Open.Mar 5 2019, 5:27 PM

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.

abi_ added a comment.Mar 6 2019, 11:55 AM

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

abi_ added a comment.Mar 6 2019, 12:52 PM

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,

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,

abi_ moved this task from In Progress to Under Review on the User-abi_ board.Mar 6 2019, 12:53 PM

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_ moved this task from Under Review to QA on the User-abi_ board.Mar 7 2019, 6:39 PM
abi_ removed a project: Patch-For-Review.

Moving to QA.