Page MenuHomePhabricator

Update translation_type in cx events to be an argument based on the type
Closed, ResolvedPublic

Description

Per T357250#10140283

The translation_type field of the content translation event is hard coded to section. It will be helpful to differentiate between section and article for analysis purposes, even if the user is using the unified dashboard based on SX. This will be essential for evaluating the new features being built, Custom suggestions (2.1.2) and Community-defined lists (2.1.4), as the hypothesis statements focus on articles rather than expansion on sections in existing article.

The schema documentation has three enum values listed:

  • article
  • section
  • lead_section

There is no immediate need to differentiate lead section, that can be skipped.

  • article can be used for events when a user a starts or is translating a new article (and there is a no existing article). In cases, where a user has saved a translation and resumed later, that would be still be article, as the draft translation is being expanded, rather than expanding an article itself.
  • section can be used for events where a user is expanding sections of an existing article (that is already live on wiki).

This will be applicable to the following events (of the ones that are currently instrumented or being instrumented)

  • dashboard_translation_start
  • editor_ events (T357250)
  • publish_ events (T357252)

Event Timeline

KCVelaga_WMF triaged this task as High priority.
KCVelaga_WMF moved this task from Triage to Tracking on the Product-Analytics board.
KCVelaga_WMF moved this task from Incoming to Tracking on the LPL Analytics board.

The only change required here is for dashboard_translation_start events. For others, it can be part of current instrumentation work being done.

Change #1074417 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX: Fix "translation_type" for "dashboard_translation_start" event

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

Change #1074421 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX: Fix "translation_type" for "editor_segment_add" event

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

Change #1074421 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX: Fix "translation_type" for "editor_segment_add" event

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

Change #1074417 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX: Fix "translation_type" for "dashboard_translation_start" event

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

Change #1079550 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20241011

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

Change #1079550 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20241018

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

I did the QA - the translation type being is logged dynamically based on whether it is a section expansion or new article creation. There are couple of issues:

dashboard_open from editor_close

When the dashboard open event is being logged with event source as editor_close, the translation_type is being logged as section, even for cases where it was initially article. It maybe be because the default is section.

dashboard translation continue

For dashboard_translation_continue events, in cases where a draft translation is being expanded, the translation_type should be article.


Count of events from the data, during the last two weeks

translation_typecount
section15875
article15156

For certain dashboard open events (probably not all), to avoid confusion, it maybe better to set the translation_type to NULL. When a user opens the dashboard, we won't know whether the user is going to translation a new article or expand an existing one. However, in some cases, it would have been decided if they are coming in from an entry point where an article would already be selected. That is out of scope for this ticket, I will create another ticket for that.

SBisson subscribed.

Thanks @KCVelaga_WMF for testing!

@ngkountas I'm moving this back to "In-progress" for you to consider the translation_type issues reported above.

Change #1088388 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] Fix translation_type for dashboard open and translation continue events

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

Change #1088388 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Fix translation_type for dashboard open and translation continue events

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

@KCVelaga_WMF the fix for the "translation_type" issues you reported was merged and should be in production on Thursday for you to verify. Thanks!

Change #1089833 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20241111

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

Change #1089833 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20241111

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

I have QA-ed the new changes, looks good to me. The translation_type field is being correctly logged as dashboard_translation_continue and editor_close events for article translations.