Page MenuHomePhabricator

Provide option to leave a redirect when moving a translatable page
Closed, ResolvedPublic4 Estimated Story PointsFeature

Description

Per title, people expect feature parity with normal page moving.

See also T322584: Provide option to leave a redirect when moving a translatable page (Maintenance script)

Some things to keep in mind:

Few testing notes

  • Redirection should be checked by default
  • Update the maintenance script to leave a redirect and an option to skip
  • Clearly communicate to users which pages we will be leaving a redirect for. This should be done when moving pages via SpecialPage or the maintenance script

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:59 AM
bzimport set Reference to bz60920.
bzimport added a subscriber: Unknown Object (MLST).

Work around is to create the redirect(s) manually.

  • This bug has been marked as a duplicate of bug 39023 ***

(In reply to Niklas Laxström from comment #1)

Work around is to create the redirect(s) manually.

Or with pagefromfile.py I guess.

Lectrician1 subscribed.

This problem is not resolved...

Nikerabbit renamed this task from Moving a translatable page doesn't create a redirect to the original page (or give the option to create one) to Provide option to leave a redirect from moving a translatable page (Special Page).Dec 17 2022, 12:59 PM
Nikerabbit renamed this task from Provide option to leave a redirect from moving a translatable page (Special Page) to Provide option to leave a redirect when moving a translatable page (Special Page).
Nikerabbit reopened this task as Open.
Nikerabbit updated the task description. (Show Details)
Nikerabbit changed the subtype of this task from "Task" to "Feature Request".
Nikerabbit raised the priority of this task from Low to Medium.Jun 5 2023, 11:45 AM

Change 955391 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/Translate@master] Add leave redirect option when moving a translatable page

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

One question to think about is what should we add a redirect for. Obviously doesn't make sense to add redirects for translation unit pages or translation pages.

Suggestion from @Tacsipacsi on the related Gerrit patch:

Not everything should get a redirect. The source page, talk pages and subpages should, translation pages maybe (depending on the way the translation pages are accessed, it may or may not be useful – if by direct links, then yes, if e.g. using translation-aware transclusion, then no), translation unit pages should definitely not.

I think to start with, it would make sense to add a redirect for:

  1. Source page
  2. Talk pages (all of them including those present with translation unit pages, translation pages)
  3. Subpages

Everything except translation unit pages and their talk pages sounds the safest option to me.

I think the fewer redirects, the safer – creating missing redirects is easier and requires less rights (no admin bit) than deleting superfluous ones.

Isn't that covered by not choosing the create redirects option. Then you create as little or as many as you want yourself.

Of course not choosing the create redirects option is a solution for edge cases. The absolutely safest option would be to provide options (at least per category, i.e. translation pages, talk pages, non-translatable subpages) to the user to mix and match what redirects they want to create, but if there is only one checkbox, I think not creating redirects that are quite likely (fifty-fifty) to be useless is safer than creating them.

Wangombe changed the task status from Open to In Progress.Sep 12 2023, 7:26 AM
Wangombe claimed this task.
Wangombe set the point value for this task to 5.

I'd like to avoid additional complexity as much as possible. Some compromises could be:

  • Have one option that adds redirects for everything except translation unit pages and translation pages (translatable page, talk pages, regular subpages and their talk pages).
  • Have two options. First one adds redirects for everything except translation unit pages and translation pages. Second one adds redirects for translation pages.
Wangombe changed the point value for this task from 5 to 4.Sep 12 2023, 11:53 AM

Both compromises are fine for me.

Change 957325 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/Translate@master] Add type hinting to PageMoveOperation::class

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

Change 957326 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/Translate@master] Add type hinting to PageMoveCollection::class

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

Change 957325 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Add type declarations to PageMoveOperation::class

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

Change 957326 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Add type declarations to PageMoveCollection::class

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

We're not super happy with how this functionality has been implemented but do not want to hold back on getting this feature out since it is requested frequently. That being said, the current approach is the least riskiest as it does not need refactoring of the old code and builds on top of what the old code was already doing.

I've outlined the improvements that can be made in the task T347511: TranslatableBundleMover: Pass data to job as a serializable object and we can take that up when we have time.

We decided to have a single option to leave redirects and skip leaving redirects for translation, translation unit pages, and related talk pages. I think the Move SpecialPage should clearly communicate that to the user.

Should we rename the "Leave redirect" option to: "Leave a redirect for the translatable page, subpages and related talk pages" or maybe something even more explicit by marking pages for which we will leave redirects when listing them similar to how we display (Has talk page).

image.png (365×720 px, 187 KB)

Few testing notes

  • Functionality appears to be working. Moving of pages works, and redirects are created for subpages and talk pages.
  • The "Leave redirect" option in the Move special page is not checked by default. It should be.
  • The maintenance script to move pages should leave a redirect by default and if a flag is passed it should skip leaving redirects.
  • Clearly communicate to users which pages we will be leaving a redirect for.

I made a minor tweak to the UI in order to improve accessibility by adding a new heading for the translatable page being moved.

image.png (2×966 px, 323 KB)


image.png (1×1 px, 510 KB)

abi_ renamed this task from Provide option to leave a redirect when moving a translatable page (Special Page) to Provide option to leave a redirect when moving a translatable page.Oct 10 2023, 6:45 AM
abi_ updated the task description. (Show Details)

Change 955391 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Add leave redirect option when moving a translatable page

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