Page MenuHomePhabricator

wfMessageFallback doesn't play well with qqx
Closed, ResolvedPublicBUG REPORT

Description

T300052 identified an issue in how we identify translations (sorry if I've got the wrong tags)

In skins, certain links use wfMessageFallback to allow the possibility for skins to override messages.
For example the history link in all skins is controlled by wfMessageFallback( "$skname-view-history", 'history_short' )

This means for the Vector vector-view-history message will be consulted first and then vector-history_short

However if a skin doesn't define this message, this leads to confusing behaviour
https://eu.wikipedia.org/wiki/Azala?uselang=qqx
suggests the message being used is vector-2022-view-history but it's actually history_short

I suggest when operating in qqx code, we should show the fallback message key as well.

Event Timeline

Krinkle subscribed.

Not related to operation of translatewiki.net. This is a feature request for the Message class in MediaWiki core.

Change 761486 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] Show message fallback keys when using &uselang=qqx

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

Nikerabbit subscribed.

I am removing the team tag as part of our triage process (out of scope for the team), but I am happy to provide feedback in the task/patch as needed.

Change 761486 merged by jenkins-bot:

[mediawiki/core@master] Show message fallback keys when using &uselang=qqx

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

matmarex claimed this task.

Added to Tech News: https://meta.wikimedia.org/wiki/Tech/News/2022/09

It is a somewhat obscure feature, but it might be useful to know for this audience, particularly because the messages shown in the skin tabs will be changed soon (T301203) and folks might need to tweak things afterwards.

It seems the revert was now reverted due to an issue with deployment, which we'll figure out shortly.

Note it's only an issue for Meta, so this shouldn't be a train blocker.

(Also, it happens that Fundraising banners are not live right now. However, this does also break FR banner previews, needed to test banners that are expected to go live shortly.)

Hey @matmarex @Ammarpad any idea how reverting this patch could have caused the following error:

load.php?lang=en-gb&modules=ext.graph.vega2|jquery|jquery.ui&skin=vector&version=19zuz:747 Uncaught RangeError: Incorrect locale information provided

(full stack trace)

Thanks so much!!

No idea. How do you know that it caused this error?

Change 765385 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] Re-apply \"Show message fallback keys when using &uselang=qqx\"

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

@matmarex I don't actually! So there was an attempt last night to deploy the revert, and the error is from some deployment test. I don't have any more details beyond what's linked there, I'm afraid.

We could potentially try merging a revert and testing on the beta cluster, or maybe just deploying to a debug host, I guess?

I have no idea what test that came from, however I see a few instances of the same error message in Logstash over the last month: https://logstash.wikimedia.org/goto/1745da3aba1da5ca686bc417918824a3

image.png (529×2 px, 43 KB)

I would guess it was just unfortunate timing, and the error is not related.

Change 765601 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] Only apply transformations for &uselang=qqx when actually using it

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

Change 765359 had a related patch set uploaded (by Bartosz Dziewoński; author: Ejegg):

[mediawiki/core@master] Use less-common placeholders for qqx formatting

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

Hi, regarding the possible inclusion in Tech News...
Is that still needed?
If so, how would you word it? I don't entirely understand the final changes, or implications, for end-users.
(The next issue will be frozen for translations in ~20 hours, so please let me know, or re-place and edit the old entry, before then. Thanks!)

It might need to be moved to next week (hopefully). I proposed the wording already, but it was removed when the patch was reverted: https://meta.wikimedia.org/w/index.php?title=Tech/News/2022/09&diff=22887595&oldid=22883519

Change 765385 merged by jenkins-bot:

[mediawiki/core@master] Re-apply "Show message fallback keys when using &uselang=qqx"

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

Change 765601 merged by jenkins-bot:

[mediawiki/core@master] Only apply transformations for &uselang=qqx when actually using it

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

Change 765359 abandoned by Ammarpad:

[mediawiki/core@master] Use less-common placeholders for qqx formatting

Reason:

The issue has been resolved with Ib0e282b3864caf345e42dd7af4a529f43ae7ba67

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