Page MenuHomePhabricator

Can’t mark CentralNotice translations as reviewed
Open, LowPublicBUG REPORT

Description

List of steps to reproduce:

  • Visit Special:Translate for an already translated CentralNotice banner (example).
  • Click on the tick to mark a translation unit as reviewed.

What happens?:
A POST XHR is sent to API, but the following error JSON is returned:

{"error":{"code":"unknownmessage","info":"Unknown message","*":"See https://meta.wikimedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."},"servedby":"mw1345"}

The unit remains in non-reviewed state.

What should have happened instead?:
The unit should be marked as reviewed: the tick should be darked and an entry should be added in translationreview log.

Event Timeline

The notice in question can be found here: https://meta.wikimedia.org/w/index.php?title=Special:CentralNotice&subaction=noticeDetail&notice=202205_Desktop_Improvements_tryout_feedback

ApiTranslationReview returns this error if the MessageHandle is not valid.

I'm not sure why it would be invalid as this message already has translations.

Hi, it would be great if this could have more priority. The translation extension is very buggy and I am struggling to get the BoT election banner live without outdated translations - dates for the election have been changed 3 times, so the banner text in all translations has to be changed as well. And approved manually. By me.

I am now waiting for someone to update the last translations so I can enable this banner (BoT elections have started at midnight), because I (with CentralNotice admin rights) cannot change the banner text and be the same person that sets them to published. I have asked my sockpuppet for help but she does not have enough rights I think? Her changes do not get excepted.

I understand that this extension is lesser used for fundraisers, but community makes use of it in (personal guess) about half of the banners. Now for the BoT election banner, and in a few weeks for the Sound logo contest it is for instance also used in WMF initiated banners.

The translation extension is very buggy

The support for translating banners is implemented in the CentralNotice notice. Because this issue only affects banners and not other types of content, and because there are other similar reports about banner translation, I find it probable that the bug is in the CentralNotice extension.

According to https://www.mediawiki.org/wiki/Developers/Maintainers, CentralNotice is maintained by the Fundraising tech team who should prioritize this and request assistance from the Language team if needed.

Per suggestion, looking for a team that can fix this since this is a huge burden for volunteer CN admins and stewards.

I just tested this function, and it looks fine, both by click the flag icon, or click on the edit pencil icon, then hit the mark as reviewed button, so please confirm if this is still an issue? Thanks

Thank you for looking into this.
Looking at for instance the Sound logo banner translations, a campaign that is live now for over 2 weeks, I am assuming this is still a problem.

I am not sure how you tested, but as far as I know this is the procedure:

  • User 1 does the translation (indeed by filling the text box in their local language)
  • User 2 needs to check the box for the translation review.
  • Banner translation goes live and the translation in the message-group (as linked above for the sound logo contest) turns green.

Stewards can do both actions from their one account. Maybe also Meta translation administrators can also do both, but all other user rights groups cannot (I have CN admin rights and cannot approve my own translations).

I confirm I’m still able to reproduce this issue.

A yellow background displays, instead of making the tick darker. No entry is added to translationreview log. I am a Translation admin, but not a steward.

You may have another account, but your action log for m:user:WFan_(WMF) is empty.

Using the API sandbox for the translationreview action I can reproduce that reviewing a Translations namespace message revision e.g. 21005569 gives the expected result, while reviewing a CentralNotice message revision e.g. 23298042 gives the translate-unknownmessage error.

This is due to the translation extension's \MessageHandle::isValid return false, either checking the namespace not belong to one of the $wgTranslateMessageNamespaces, or the check the GroupIds, if is Valid failed, then the the function \MediaWiki\Extension\Translate\TranslatorInterface\ReviewTranslationActionApi::getReviewBlockers return this unknownmessage error as Status::newFatal( 'apierror-translate-unknownmessage' ) my local able to reproduce this error with a user with experienceLevel as newcommer and force isValid return false. p.s. since it pass the $user->isAllowed('translate-messagereview') and the 4user->getBlock(), it is not related with user permission.

Possible theory:

CentralNotice defines $wgTranslateMessageNamespaces using the CanonicalNamespaces hook. When I was checking with shell.php, I did not see NS_CN_BANNER in the list unless I first fetched the namespaces causing the hook to run. It may be that the review API doesn't cause the namespaces hook to execute.

This seems to indicate that defining those settings in that hook is too late, and it should be done earlier to ensure they are always defined.

AnnWF removed AnnWF as the assignee of this task.Oct 26 2022, 4:14 PM

@AnnWF What is this blocked on?
@XenoRyet Why did you remove the extension tags?

AndyRussG subscribed.

@AnnWF What is this blocked on?
@XenoRyet Why did you remove the extension tags?

Hey, @Nikerabbit and others, tags and workboard column updated again. We should be able to pick this up again soon. :) Thanks much!!

Cool! Do let me know if we can help further.

@Damilare , @XenoRyet I noticed you lowered priority and removed the Chaos Crew. The bug is still very relevant though - I am at this moment in a call where it is mentioned the CN banner for Wikimania had reviewed translations that did not go live.

Why was the tag removed and the priority lowered?

@Damilare , @XenoRyet I noticed you lowered priority and removed the Chaos Crew. The bug is still very relevant though - I am at this moment in a call where it is mentioned the CN banner for Wikimania had reviewed translations that did not go live.

Why was the tag removed and the priority lowered?

Thanks so much for flagging the ongoing importance, @Ciell. Without wishing to speak for @XenoRyet, I can mention that we have been just generally going through our Chaos Crew board (used for bugs and non-feature work in general) and trying to re-organize it to a manageable state, since the backlog of tasks has just kept growing and growing. Note also we're still working on fine-tuning our methodology for this board.

I'll raise your concerns in our team standup in a few minutes.

Thanks again!! :)

Just to reiterate, moving this off the Chaos Crew board was just internal board organization, and not a signal that we don't intend to work on it. I honestly don't remember what our thinking on priority was back in November, but we'll re-triage it soon.

Hi, bringing this up again since the bug is still present.

I have one multilingual banner running at the moment (scholarship applications for WikiWomanCamp) and two more coming up next month (MCDC drafts communications and Wikimania registrations) and they will all still need manually pushing the translations that come in to be published/live, even when they have two reviews.

It's a lot of extra work for the admins/stewards, and frustrating for community members to have to rely on us to get a translation or a correction of the translation of the banner up in their own language. It is demotivating for the translators to say the least.
In the screenshot attached, Bangla should have gone to published, but this does not happen.
(I don't know a word of Bangla, but with the help of G-translate approved the translation now anyway. And Google does not know all the languages we host...)

From Central Notice perspective it is also considered very impolite to target a specific language community with an English (=default) banner, which is what happens when communities are not in control of the translations and have to wait for other volunteers to have time. Please fix this.

Screenshot 2023-06-28 at 09-16-32 Message group statistics - Meta.png (913×1 px, 177 KB)

It's a lot of extra work for the admins/stewards, and frustrating for community members to have to rely on us to get a translation or a correction of the translation of the banner up in their own language.

That is a separate issue: even if this bug is fixed (translators will be able to review translations), translation message will not get automatically “published” state. We may consider using another system than manual review by CentralNotice admins, (e.g. messages reviewed by 2 distinct people, or using a specific “trusted translator” group) but you should open a feature request, this is not a bug, but a choice.

Thanks @Pols12 , done! [[T341414]]
And in fact, if this is a feature not a bug, it looks like this ticket is solved, because indeed the review shows as checked again in the message group statistics?

it looks like this ticket is solved

Indeed, I just achieved to mark several CentralNotice translation units as reviewed.