Page MenuHomePhabricator

Encourage users to publish old inactive unpublished translations
Closed, ResolvedPublic

Description

When users have not been working on a translation for a while, a notification can help them to (a) continue the work, or (b) decide to publish the current content (avoid this knowledge to be lost).

This is also useful as a warning for old drafts being automatically deleted (T183890), and preventing the issues of trying to continue a translation for which the original article has changed significatively.

Proposed solution

Send a notifications for translations that were started 3 months ago and have not been published by the user. If there are several translations in such situation, the notifications will be grouped into a bundle. These notifications are illustrated below:

  • Text copy: "Your started translating <page-name> some months ago. Consider publishing it before it gets automatically discarded after a year."
  • Main action (opening the notification): leads to the Translation editor for the translation.
  • Secondary action: “Your translations” leads to the Translations dashboard showing the in-progress view.

Bundled version

  • Text copy: "You started <number-of-translations> translations some months ago. Consider publishing them before they get automatically discarded after a year."
  • Opening the main notification leads to the Translation dashboard showing the in-progress view.
  • Opening the individual notifications leads to the Translation editor for each translation.

Details

Related Gerrit Patches:
mediawiki/extensions/ContentTranslation : masterSend notification to users that they should continue their translations

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Amire80 lowered the priority of this task from High to Low.Mar 18 2015, 9:29 AM
Arrbee moved this task from Long term to CX5 on the ContentTranslation board.Apr 20 2015, 6:05 AM
Pginer-WMF updated the task description. (Show Details)May 14 2015, 12:21 PM
Pginer-WMF set Security to None.
Amire80 raised the priority of this task from Low to Medium.Jun 14 2015, 9:00 PM
Amire80 moved this task from Backlog to Entry Points on the ContentTranslation-Release6 board.
Amire80 moved this task from CX5 to CX6 on the ContentTranslation board.Jul 2 2015, 4:32 PM
Amire80 moved this task from CX6 to CX7 on the ContentTranslation board.Sep 4 2015, 3:35 PM
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptSep 9 2015, 5:58 PM

This was requested in this comment. When participating in campaigns, the chances of users trying to translate the same article increase, which makes blocking topics for translation to be a bigger problem.

Amire80 moved this task from CX7 to CX8 on the ContentTranslation board.Jan 24 2016, 10:30 PM
Amire80 moved this task from CX8 to CX9 candidates on the ContentTranslation board.
Elitre added a subscriber: Elitre.Sep 21 2017, 3:55 PM
Arrbee moved this task from Bugs to Enhancements on the ContentTranslation board.Jun 22 2018, 1:40 PM
Restricted Application added a project: Growth-Team. · View Herald TranscriptSep 3 2018, 10:48 AM
SBisson moved this task from Inbox to External on the Growth-Team board.Sep 7 2018, 2:16 PM

Change 523809 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Send notification to users that they should continue their translations

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

@Pginer-WMF old drafts are purged after one year. The cron job executes the script twice a month. If we remind users for drafts old three months (and up to one year), this would mean that there will be multiple notifications about same translation (with current setup, user would get those in 15 days periods). Should we prevent this noise by giving users the ability to opt out or is it fine?

@Pginer-WMF old drafts are purged after one year. The cron job executes the script twice a month. If we remind users for drafts old three months (and up to one year), this would mean that there will be multiple notifications about same translation (with current setup, user would get those in 15 days periods). Should we prevent this noise by giving users the ability to opt out or is it fine?

The idea is to notify users only once. In a period of time that is approximately 3 months after the translation started. We can be flexible about the time period, but the notification should happen only once. If the script is ran every 15 days, I'd expect it to select the translations started in the range [3 months ago, 3months ago + 15days].

For example, the script running at the beginning of April would target translations from the beginning of January to mid-january. The next run, at mid-April targets translations from mid-January to the end of January (making sure it does not overlap with the previous period). Note that I'm using months in the example as if they had 30 days for illustration purposes.

Elitre removed a subscriber: Elitre.Aug 29 2019, 9:09 AM

I'd expect it to select the translations started in the range [3 months ago, 3months ago + 15days].

@Pginer-WMF what about first run? Should we notify users about all drafts older than three months and than target 15 day windows or should we start with 15 days window for the first run as well?

I'd expect it to select the translations started in the range [3 months ago, 3months ago + 15days].

@Pginer-WMF what about first run? Should we notify users about all drafts older than three months and than target 15 day windows or should we start with 15 days window for the first run as well?

Good question, @Petar.petkovic.
I'd propose not doing anything special for the first round. Older drafts than the first window won't be notified, and I think it is ok (other earlier drafts have been deleted without notice anyways). In addition, we avoid bringing too much attention to some CX1 drafts and content heavily outdated.

We need to notify users about old drafts in 15 day windows. In order to avoid notifying same user twice or missing some draft, we decided to save timestamp of last notified draft in that run. That avoids saving and updating info per draft as well.
For purpose of saving this timestamp of last notified draft, new database table is introduced. Since this involves schema changes, by following guidelines, I've added Schema-change tag. Separate task will be created after patch is merged.
Patch which introduces this table can be merged before table is created, as new table usage is behind configuration.

Hi,

For what I see in the patch, the implementation is at the moment planned as an extra table. If that is right, and such a small table is the only sql change, we just need a heads up before production deployment for it to be added to the list of private tables on the operations/puppet repository (but it not technically considered a schema change). After that, we encourage developers to add the table themselves so they are not blocked on us, as it is not a dangerous process.

If it involves changes to existing tables, we need to get the ALTER command so we can apply it to production, as it would be a more dangerous process and need special care.

Will this table be public? Can it be replicated without any restrictions to our wiki replicas? (https://wikitech.wikimedia.org/wiki/Portal:Data_Services#Wiki_Replicas)
If this table is expected or is supposed to be accessed by our Wiki Replicas users, a view will be needed and for that a ticket to cloud-services-team will be required.

Will this table be public? Can it be replicated without any restrictions to our wiki replicas? (https://wikitech.wikimedia.org/wiki/Portal:Data_Services#Wiki_Replicas)
If this table is expected or is supposed to be accessed by our Wiki Replicas users, a view will be needed and for that a ticket to cloud-services-team will be required.

This team normally works on x1 section, which we don't replicate for privacy concerns. We do, however, add them to private table list in case we do in the future (by accident of by choice).

Change 523809 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Send notification to users that they should continue their translations

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

Jpita added a subscriber: Jpita.Oct 23 2019, 6:20 AM

@Petar.petkovic can you tell me how to test this on local?

@Petar.petkovic can you tell me how to test this on local?

You need to run a script located at core/extensions/ContentTranslation/scripts.
When you are in that directory, run php purge-unpublished-drafts.php. You also need to pass some command line option to your script:

  • age-in-days - This option was existing before changes made to the script for the purposes of this task. It determines how old are the drafts which are being removed from DB.
  • notify-age-in-days - This option was introduced for this task. It determines how old are drafts that you notify users to "continue their translations before they get deleted"
  • really - Unless this option is included, you get log of drafts which users are notified about or which get purged and actions are not performed really. Without this option is what we call "dry run".

You can use something like php purge-unpublished-drafts.php --notify-age-in-days=1 --really to notify users to continue their drafts which are one day old. I'm using one day since you probably don't have older drafts available locally. You can also use other parameters and tweak you calendar date on your OS to test this.

Jpita closed this task as Resolved.Oct 25 2019, 6:56 AM