Page MenuHomePhabricator

Versioning and migration for translatable page syntax
Closed, ResolvedPublic

Description

Per the parent ticket, we need to a migration path to avoid breaking rendering of existing translatable pages. In order to do that, we need to:

  1. track and store syntax version of a translatable page
  2. allow migration when re-marking the translatable page
  3. (deferrable) provide a list of unmigrated pages

QA plan

Affected projects: All Wikimedia projects using Translate and translatewiki.net
Pre/post-deployment QA: Check Special:PageTranslation, upgrade a page, create a new page and mark it. Neither should be using the old syntax. Check that form elements are consistent (if OOUI patch is merged by the time)

Expected outcome

New pages will use new syntax version, old pages can be migrated by translation admins when marking a page and ticking a checkbox.

Event Timeline

Nikerabbit triaged this task as Medium priority.Jul 1 2020, 4:28 PM

Change 610073 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] Update Special:PageTranslation output

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

Change 610074 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] Versioning and migration for translatable page syntax

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

Change 610073 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Update Special:PageTranslation output

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

Change 610074 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Versioning and migration for translatable page syntax

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

Am I right that this will go live with the wmf.41 train? Currently Tech News says “Missing translations will also be marked in the future.”, but then it should be rephrased to something like “Missing translations will also be marked soon.”

Assuming no surprises that require revent, yes this will go out with the tagged release.

Thanks for the confirmation! I changed the newsletter accordingly.

I realized I should clarify one thing: The wrapping of untranslated parts is not yet connected, so you will be able to use nowrap and migrate pages to the new version, but untranslated section wrapping will only start happening when parent task is complete.

Oh, so that’s basically a “no” for the newsletter. I hope it’s not too late for translators… Thanks for the clarification, anyway!

Change 612148 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/Translate@master] Set the latest syntax version to 1

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

Change 612148 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Set the latest translatable syntax version to 1

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

Since the wrapping of untranslated sections is still pending, we do not admins to have to update the page to version 2 without it having any effect. This will also cause problems later when the wrapper is merged and deployed. As such we've set the LATEST_SYNTAX_VERSION to 1.

Translation admins should not see the syntax version form when marking a page for translation.

abi_ added a comment.EditedJul 15 2020, 4:49 AM

Tested this on Mediawiki.org and I did not see the version update form appear, which is expected.

Once we've implemented the wrapping functionality in T254484: Tag untranslated translations units with lang and dir attributes and updated the LATEST_SYNTAX_VERSION to 2, we should retest this to ensure that it shows the version update form when marking older translatable pages for translation.

Additionally, I am now able to mark pages already "marked for translation" for translation again.

abi_ closed this task as Resolved.Jul 22 2020, 7:58 AM

Marking this as done. Remaining testing can be handled under T254484