Page MenuHomePhabricator

Translation tool showing zero translations in MessageGroupStats for CentralNotice banner
Closed, ResolvedPublic2 Estimated Story Points

Description

The translation tool on meta is displaying zero translations when in fact these exist (for example, this Arabic one).

This was playing up a few days ago and a few purges and clicks seemed to sort it out, but it hasn't shown flat zeroes before.

Not sure if this is unique to CentralNotice; remove that tag if necessary :) Update: confirmed that this only affects CentralNotice.

Event Timeline

jrbs raised the priority of this task from to Needs Triage.
jrbs updated the task description. (Show Details)
jrbs added subscribers: jrbs, Jalexander.
jrbs renamed this task from Translation tool showing zero translations to Translation tool showing zero translations in MessageGroupStats.Dec 22 2015, 10:46 PM
jrbs set Security to None.

For the record it's also showing up as no messages in the message group when you go to translate too https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=Centralnotice-tgroup-WP15BannerTranslations&language=ar&filter=&action=translate despite them being there for the CNBanner namespace and the fact that they were translated through the interface only a week or so ago (and are still published).

My only clue so far is that we have special translation message group hooks on TranslatePostInitGroups and TranslateEventMessageGroupStateChange, which are extremely fragile. Any small change to the Translate extension could potentially break this integration.

However, I don't see any relevant deployments. There was a ContentTranslation on Dec 17, but that shouldn't have affected CentralNotice.

I can reproduce the bug locally.

  • Install CentralNotice and Translate extensions.
  • Update all code to master.
  • $wgNoticeUseTranslateExtension = true;
  • Create a new banner.
  • Edit the banner and add a message, {{{foo}}}
  • Visit Special:MessageGroupStats, select the banner message group, uncheck all the Do Not Show boxes, and click Show Stats.

All zeros.

So far, it looks like the thing that's failing is the TranslateEditAddons::onSave handler, it falls through when MessageHandle::isValid is false. The TranslateEventTranslationEdit hook is never called, and the message group stats are not updated. There may be additional side effects.

So far, it looks like the thing that's failing is the TranslateEditAddons::onSave handler, it falls through when MessageHandle::isValid is false. The TranslateEventTranslationEdit hook is never called, and the message group stats are not updated. There may be additional side effects.

Interesting, for some additional context from what i know Joe and I (and at least @Varnent as well) have seen over the past couple days it almost seems to be 'getting worse' at some level (though I think it's basically stalled at 'not working' now).

On Monday we had an issue where if you went to MessageGroupStats you saw nothing (said that nothing existed) but you could uncheck the Do Not Show boxes (and click show stats) and you would actually see the right percentages (the published translations at 100% for the ones which had it + lower percentages as needed) and then even re-check the 'do not show untranslated' checkbox/show stats and get the normal view back.

Then today it slid further with the 0% everything issue that you see now. Would the same save handler 'rewrite' old numbers? (Update them to 0%)?

awight renamed this task from Translation tool showing zero translations in MessageGroupStats to Translation tool showing zero translations in MessageGroupStats for CentralNotice banner.Dec 23 2015, 10:26 AM
awight updated the task description. (Show Details)

Change 260738 had a related patch set uploaded (by Awight):
Fix Translate integration

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

My patch should fix the issue, but I don't understand how this ever worked.

Please keep an eye on anything else usual in how banner message groups behave. Your WP15BannerTranslations kludge is clever, but I'd be happy to plan changes to the interface so you don't have to live like this forever. You're not crazy--[institution!]--it seems like anyone trapped in CentralNotice long enough eventually goes bonkers coping.

Dangerously I just discovered we have a meme generator in Phabricator [for the record this picture was already in it] so I will use it as way of thanks :)

Macro tiger-wearing-a-sombrero: I don't have any more help to give so please accept this tiger wearing a sombrero

Change 260738 merged by Ejegg:
Fix Translate integration

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

@Jalexander
We have a fix prepared, but I just ran into a lame, theocentric proscription against deploying anything today, so we'll have to wait until Monday now. This makes me sad, and I'm really sorry about all the lost potential translation effort.

This fix is scheduled to go out in the 16:00-17:00 (Pacific) SWAT window, tonight.

This fix is scheduled to go out in the 16:00-17:00 (Pacific) SWAT window, tonight.

Thanks for your help Adam, I really appreciate the work and at least on our side (for WP15 banners) it should be in time since this gives us a couple more days before the next batch of banners in a week or so.

@Jalexander
Please kick some translations around and let us know if the bug is fixed. I'm impatiently waiting in case the stats update job is taking too long, but so far I'm not convinced my fix works.

@Jalexander
Please kick some translations around and let us know if the bug is fixed. I'm impatiently waiting in case the stats update job is taking too long, but so far I'm not convinced my fix works.

I think you should be able to access the below link:

https://meta.wikimedia.org/w/index.php?title=Special%3AMessageGroupStats&x=D&group=Centralnotice-tgroup-WP15BannerTranslations

As you can see, or if you can't, it's still all zeroes. :(

@jrbs
Thank you! I've been watching that page, but I'm not certain when the stats get updated. I'll try jiggling various handles...

It seems to work! Please reopen this bug if you see another example of zeroed stats.