Page MenuHomePhabricator

Page status tri-state for pages not marked for translation
Closed, ResolvedPublic8 Estimated Story Points

Assigned To
Authored By
Nikerabbit
Mar 19 2024, 9:56 AM
Referenced Files
F56218107: image.png
Jul 4 2024, 10:20 AM
F56218237: image.png
Jul 4 2024, 10:20 AM
F56218111: image.png
Jul 4 2024, 10:20 AM
F56216944: expanded-without-heading.png
Jul 4 2024, 8:23 AM
F56216943: initial-without-heading.png
Jul 4 2024, 8:23 AM
F56217496: Kapture 2024-07-04 at 10.14.43.webm
Jul 4 2024, 8:23 AM
F56215722: image.png
Jul 4 2024, 7:15 AM
F56215809: image.png
Jul 4 2024, 7:15 AM
Tokens
"Love" token, awarded by Pols12.

Description

image.png (884×1 px, 73 KB)

Scoping:

  • Displayed for pages that are not yet marked for translation
  • Introduce new "proposed" state that should stick even if there are further edits to the page
  • Introduce new "ignored" state that should stick
  • Not stable yet is the default and doesn't need to be stored
  • Proposed pages are shown in the proposed page list
  • Information screen when accessed in ignored state
  • Information screen when accessed in proposed state
    • For non-admins: explain what will happen next
    • For admins: point them to mark up the page first (if in proposed state)

Left for future tasks:

  • Store user id / timestamp of the proposer and display that in the proposed pages list
  • Allow proposer to leave instructions
  • Allow proposer to see and set translation settings

Latest status

See comment: https://phabricator.wikimedia.org/T360409#9846138

Event Timeline

Nikerabbit raised the priority of this task from Medium to High.Apr 8 2024, 1:33 PM
Nikerabbit set the point value for this task to 8.

Actually, a “not stable yet” pages list in addition to the proposed pages list would make sense (assuming that pages that don’t need translation are more or less consistently marked as such): these pages need to be checked from time to time to see if they still aren’t stable yet.

I'm inclined to say that is solving a different issue and thus I would consider it out of scope for this task.

Change #1036292 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] PageTranslationSpecialPage: Minor code improvements

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

Change #1036293 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] PageTranslation: Add settings action

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

abi_ changed the task status from Open to In Progress.May 29 2024, 6:28 AM
abi_ claimed this task.

Change #1037508 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] PageTranslationSpecialPage: Add settings action for HTTP GET method

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

Change #1036293 abandoned by Abijeet Patro:

[mediawiki/extensions/Translate@master] PageTranslation: Add settings action

Reason:

In favor of Idecb3c1a69d8d9261309aff919f68e5bf623c05c

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

Current status

  • Displayed for pages that are not yet marked for translation
  • Banner is not displayed to administrators, translation administrators can still set the translation state
  • Introduce new "proposed" state that should stick even if there are further edits to the page
  • Introduce new "ignored" state that should stick
  • Not stable yet is the default and doesn't need to be stored
  • Proposed pages are shown in the proposed page list
  • Information screen when accessed in ignored state
  • Information screen when accessed in proposed state
    • For non-admins: explain what will happen next
    • For admins: point them to mark up the page first (if in proposed state)

Screenshots

See: https://phabricator.wikimedia.org/T360409#9953388

Implementation details

Who sees the banners?

  • Only recent editors who are not translation admins will see the banners for pages specified in the TranslatePageTranslationBannerNamespaces

Who can use the page?

  • All editors can access the page, and update the translation state.
  • Translation administrators, irrespective of whether they have edited the page, can access and update the translation state.

There are no restrictions on how many times the translation state can be updated.

Information messages

If a translation admin accesses the settings action page when a translation state is set, they see the following information messages:

  • Ignored state: Editors have indicated that this page should <em>not</em> be marked for translation.
  • Proposed state: Editors have indicated that this page should be marked for translation. You can [$1 mark up the page] by [$2 editing it] or by using [$3 Special:PagePreparation].

If a recent editor accesses the settings action page when a translation state is set, they see the following information messages:

  • Ignored state: Editors have indicated that this page should <em>not</em> be marked for translation.
  • Proposed state: Translation administrators will be recommended to mark this page for translation. You can contribute translations once they mark the page for translation.

Technical details

  • The translation state of the translatable page is stored in translate_cache table.
  • Used OOUI for design in order to support older versions of MediaWiki as part of MLEB release policy.

Testing notes

https://phabricator.wikimedia.org/T360409#9953284

Other notes

  • The CTA banner is no longer displayed if a page has a translation state set.

Change #1039208 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] PageTranslation: Display pages with proposed state in list

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

Change #1036292 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] PageTranslationSpecialPage: Minor code improvements

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

Some screenshots from my local machine:

image.png (608×1 px, 40 KB)


image.png (944×1 px, 103 KB)


image.png (617×992 px, 43 KB)


image.png (710×1 px, 58 KB)

Change #1049089 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] PageTranslation: Allow editors to set the page translation state

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

Change #1051296 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] TranslatablePageView: Add named user check

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

Latest screenshots based on feedback:

Updated the title to use Translation settings:

image.png (706×1 px, 69 KB)

Eventually, based on selection, we will have more sections appearing on the page:

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

Here's another screenshot of how it looks with the two titles merged into one:

image.png (748×1 px, 68 KB)

I took a more detailed look to the version without the initial heading. I think it works well. There is not much loss of structure since the selection on top is affecting the visibility of the different sections so it can be perceived as a top-level decision. So I guess the simplification is useful.

I think we can start without the initial heading, but I'd still make the page title to be "Translation settings".

Below I added a recreation of the initial and expanded states and the transition in a video:

Avoiding initial section
initial-without-heading.png (667×1 px, 57 KB)
expanded-without-heading.png (1×1 px, 194 KB)

Some notes from testing:

Displaying banner
  • Normal editor does not see banner on non translatable pages
  • Normal editor does not see banner on translatable pages
  • Recent editor does not see banner if it already has a translatable state
  • Recent editor sees a translatable banner for a non translatable page.
  • Translation admin do not see a banner irrespective of whether they are recent editors
Managing settings
  • Recent editors can set a translation state for a non translatable page
  • Recent editors or Admins cannot set a translation state for a non translatable page
  • Recent editor can set a translation state for a page that is in a namespace that is not present in TranslatePageTranslationBannerNamespaces
  • Translation admin can set translation state for all normal pages
Listing requested pages
  • Pages with translation state as proposed are listed in Special:PageTranslation

Translating settings page:

image.png (690×1 px, 78 KB)


Banner display:

image.png (613×1 px, 55 KB)


Listing of pages with proposed state:

image.png (712×1 px, 84 KB)


Change #1052940 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] TranslatablePageMarker: Remove translation state when page is marked

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

Change #1037508 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] PageTranslation: Add settings action to store translation state

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

Change #1039208 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] PageTranslation: Display pages requested for translation in list

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

Change #1052940 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] TranslatablePageMarker: Remove translation state when page is marked

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

Change #1049089 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] PageTranslation: Allow editors to set the page translation state

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

Change #1051296 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] TranslatablePageView: Add named user check

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

Change #1062675 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[translatewiki@master] Display page translation settings banner on NS_USER namespace

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

Change #1062675 merged by jenkins-bot:

[translatewiki@master] Display page translation settings banner on NS_USER namespace

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

Change #1063203 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] TranslatablePageView: Remove actor prefix from recent editor query

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

Change #1063203 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] TranslatablePageView: Remove actor prefix from recent editor query

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

abi_ moved this task from Need QA to Done on the LPL Essential (LPL Essential 2024 Jul-Oct) board.

Enabled the feature on translatewiki.net for pages under the NS_USER namespace. Deployed and tested.

Created a separate task to roll out the feature to other wikis: T372460: Enable translation setting feature including banner on production wikis