Page MenuHomePhabricator

message keys shown on beta and group0 wikis (test Wikidata, etc.)
Closed, ResolvedPublicBUG REPORT

Description

Currently a lot of messages are shown by their message key instead of their translation on both beta Wikidata and test Wikidata.

Steps to replicate the issue (include links if applicable):

What happens?:
Message keys are shown.

What should have happened instead?:
Translations should be shown according to interface language.

Other information (browser name/version, screenshots, etc.):

image.png (799×985 px, 109 KB)

image.png (782×1 px, 125 KB)

Event Timeline

Lydia_Pintscher triaged this task as Unbreak Now! priority.Apr 4 2023, 2:35 PM

Setting this to unbreak now as it seems to be a train blocker.

Test Wikipedia is also affected, e.g. on Special:SpecialPages:

image.png (480×905 px, 72 KB)

It’s not specific to Wikibase, various extensions are affected.

I can’t reproduce this locally, by the way. If it wasn’t for T333958: WikiLambda i18n strings no longer loaded on Beta Cluster, I’d suspect that this might be a one-off production issue when building the i18n cache that could potentially be fixed with another full scap; and that might still be worth trying anyways, tbh (can’t hurt). But the fact that it happens on Beta as well makes a one-off issue seem less likely.

Did something change about how prod (& Beta) load i18n strings?

On the deployment server I notice the files are smaller with wmf.3 compared to wmf.2:

The cdb files of de and en:

cache/l10n/l10n_cache-de.cdb 5.1M3.3M
cache/l10n/l10n_cache-en.cdb 4.7M3.1M

Comparing with jq de and en went from 28056 entries down to 18527 entries.

The json ones:

cache/l10n/upstream/l10n_cache-de.cdb.json 4.9M3.2M
cache/l10n/upstream/l10n_cache-en.cdb.json 4.4M2.9M

If it also happens on Beta I suspect some code related to merging the l10n message is broken :(

This happened for several messages too on mediawiki.org.

Jdforrester-WMF renamed this task from message keys shown on beta and test Wikidata to message keys shown on beta and group0 wikis (test Wikidata, etc.).Apr 4 2023, 3:11 PM

Change 905616 had a related patch set uploaded (by Ladsgroup; author: Ladsgroup):

[mediawiki/core@master] Revert "mergeMessageFileList.php: move code out of file scope."

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

Change 905617 had a related patch set uploaded (by Ladsgroup; author: Ladsgroup):

[mediawiki/core@wmf/1.41.0-wmf.3] Revert "mergeMessageFileList.php: move code out of file scope."

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

I'd cherry pick the revert and deploy it, but keep it on master to probably fix it ASAP.

merging the revert is failing because of phan

Change 905617 merged by Ladsgroup:

[mediawiki/core@wmf/1.41.0-wmf.3] Revert "mergeMessageFileList.php: move code out of file scope."

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

Mentioned in SAL (#wikimedia-operations) [2023-04-04T16:44:39Z] <ladsgroup@deploy2002> Started scap: Backport for [[gerrit:905617|Revert "mergeMessageFileList.php: move code out of file scope." (T333966)]]

Mentioned in SAL (#wikimedia-operations) [2023-04-04T17:04:07Z] <ladsgroup@deploy2002> ladsgroup: Backport for [[gerrit:905617|Revert "mergeMessageFileList.php: move code out of file scope." (T333966)]] synced to the testservers: mwdebug1002.eqiad.wmnet, mwdebug1001.eqiad.wmnet, mwdebug2002.codfw.wmnet, mwdebug2001.codfw.wmnet

merging the revert is failing because of phan

T333987: REL1_39 phan failure fwiw (and T334001: AbuseFilter browser test errors for the AbuseFilter failure) — likely safe to merge anyway

Okay, it fixed it in group0 so it should unblock the train but I haven't merged the path on master (force merging on master is even worse than force merging on a release branch), and I hope to find a solution instead of revert. Maybe @daniel can look into it?

Mentioned in SAL (#wikimedia-operations) [2023-04-04T17:22:58Z] <ladsgroup@deploy2002> Finished scap: Backport for [[gerrit:905617|Revert "mergeMessageFileList.php: move code out of file scope." (T333966)]] (duration: 38m 18s)

Confirmed:

$ cd /srv/mediawiki-staging
$ diff -U 0  <(jq keys php-1.41.0-wmf.2/cache/l10n/upstream/l10n_cache-en.cdb.json|sort) <(jq keys php-1.41.0-wmf.3/cache/l10n/upstream/l10n_cache-en.cdb.json|sort)
--- /dev/fd/63	2023-04-04 18:54:39.500994620 +0000
+++ /dev/fd/62	2023-04-04 18:54:39.500994620 +0000
@@ -2326,0 +2327,2 @@
+  "messages:apihelp-growthinvalidatepersonalizedpraisesuggestion-param-mentee",
+  "messages:apihelp-growthinvalidatepersonalizedpraisesuggestion-summary",
@@ -8086,0 +8089,4 @@
+  "messages:cx-sx-dashboard-help-panel-feedback-label",
+  "messages:cx-sx-dashboard-help-panel-more-info-label",
+  "messages:cx-sx-dashboard-help-panel-stats-label",
+  "messages:cx-sx-dashboard-help-panel-title",
@@ -8622,0 +8629 @@
+  "messages:donate_interface-bt-upi_id",
@@ -9424,0 +9432 @@
+  "messages:echo-category-title-edit-user-page",
@@ -9528,0 +9537 @@
+  "messages:echo-pref-tooltip-edit-user-page",
@@ -12870,0 +12880,23 @@
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-empty-state-footer",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-intro",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-metrics",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-page-counter",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-page-next-icon-label",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-page-previous-icon-label",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-praise-message-message",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-praise-message-title",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-send-appreciation",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-send-appreciation-error-unknown",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-settings-cancel",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-settings-cog-icon-label",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-settings-notifications-headline",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-settings-notifications-pretext",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-settings-positive-message-headline",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-settings-positive-message-placeholder",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-settings-positive-message-subject",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-settings-praiseworthy-metric-edits-within-timeframe",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-settings-praiseworthy-metric-headline",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-settings-save",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-settings-title",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-talk-topics",
+  "messages:growthexperiments-mentor-dashboard-personalized-praise-title",
@@ -12896,0 +12929 @@
+  "messages:growthexperiments-notification-body-new-praiseworthy-mentees",
@@ -12898,0 +12932 @@
+  "messages:growthexperiments-notification-header-new-praiseworthy-mentees",
@@ -12901,0 +12936 @@
+  "messages:growthexperiments-notification-secondary-link-new-praiseworthy-mentees",
@@ -16845,0 +16881 @@
+  "messages:notification-bundle-header-edit-user-page",
@@ -16862,0 +16899 @@
+  "messages:notification-compact-header-edit-user-page",
@@ -16890,0 +16928 @@
+  "messages:notification-edit-user-page-email-subject",
@@ -16900,0 +16939 @@
+  "messages:notification-header-edit-user-page",
@@ -18804,0 +18844 @@
+  "messages:project-localized-name-kbdwiktionary",
@@ -19896,0 +19937,3 @@
+  "messages:rcshowhidewikistories",
+  "messages:rcshowhidewikistories-hide",
+  "messages:rcshowhidewikistories-show",
@@ -27063,0 +27107 @@
+  "messages:wikilambda-tester-details",
@@ -27073,0 +27118 @@
+  "messages:wikilambda-tester-status-cancel",
@@ -27076,0 +27122 @@
+  "messages:wikilambda-tester-status-run",
@@ -27367 +27412,0 @@
-  "messages:wikimedia-globalblocking-blockedtext-details-queries",
@@ -27514,0 +27560,5 @@
+  "messages:wikistories-rcfilters-hidewikistories-description",
+  "messages:wikistories-rcfilters-hidewikistories-label",
+  "messages:wikistories-recentchangesflags-legend",
+  "messages:wikistories-recentchangesflags-letter",
+  "messages:wikistories-recentchangesflags-title",
@@ -27527 +27577,4 @@
-  "messages:wikistories-story-editdone",
+  "messages:wikistories-story-edittext-done",
+  "messages:wikistories-story-edittext-initial",
+  "messages:wikistories-story-edittext-last",
+  "messages:wikistories-story-edittext-medium",
@@ -27531,0 +27585 @@
+  "messages:wikistories-story-navigator-title-edittext",
$

Which looks way more reasonable. Thank you for the messages regeneration.

The task is still open cause the faulty patch only got reverted from wmf/1.41.0-wmf.3.

Change 905616 merged by Samtar:

[mediawiki/core@master] Revert "mergeMessageFileList.php: move code out of file scope."

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

Okay, it fixed it in group0 so it should unblock the train but I haven't merged the path on master (force merging on master is even worse than force merging on a release branch), and I hope to find a solution instead of revert. Maybe @daniel can look into it?

Did you identify what the actual issue is? or how to reproduce it locally?

Not yet (that's why I didn't merge the revert on master), It should be easy to reproduce though, messages from extensions are not being added to the file. Does that happen in your localhost?

Not yet (that's why I didn't merge the revert on master), It should be easy to reproduce though, messages from extensions are not being added to the file. Does that happen in your localhost?

I do see message files from extensions when I run the script locally, yes... The output I get looks like this:

<?php
## This file is generated by mergeMessageFileList.php. Do not edit it directly.

if ( defined( 'MW_NO_EXTENSION_MESSAGES' ) ) return;

$wgExtensionMessagesFiles = array (
  'FlowNamespaces' => 'extensions/Flow/Flow.namespaces.php',
  'FlowAlias' => 'extensions/Flow/Flow.alias.php',
  'SpecialCentralAuthAliases' => "$IP/extensions/CentralAuth/CentralAuth.alias.php",
  'SpecialCentralAuthAliasesNoTranslate' => "$IP/extensions/CentralAuth/CentralAuth.notranslate-alias.php",
  'TemplateSandboxAlias' => "$IP/extensions/TemplateSandbox/TemplateSandbox.alias.php",
  'CentralNoticeAliases' => "$IP/extensions/CentralNotice/CentralNotice.alias.php",
  'EventLoggingNamespaces' => "$IP/extensions/EventLogging/EventLogging.namespaces.php",
  'VisualEditorAlias' => "$IP/extensions/VisualEditor/VisualEditor.i18n.alias.php",
);

$wgMessageDirs = array (
  'Vector' =>
  array (
    0 => "$IP/skins/Vector/i18n",
  ),
  'AntiSpoof' =>
  array (
    0 => "$IP/extensions/AntiSpoof/i18n",
    1 => "$IP/extensions/AntiSpoof/i18n/api",
  ),
  'SpecialCentralAuth' =>
  array (
    0 => "$IP/extensions/TemplateSandbox/i18n",
    1 => "$IP/extensions/TemplateSandbox/i18n/api",
  ),
  'CentralNotice' =>
  array (
    0 => "$IP/extensions/CentralNotice/i18n",
    1 => "$IP/extensions/CentralNotice/i18n/api",
  ),
  'EventLogging' =>
  array (
    0 => "$IP/extensions/EventLogging/i18n/core",
  ),
  'JsonSchema' =>
  array (
    0 => "$IP/extensions/EventLogging/i18n/jsonschema",
  ),
  'VisualEditor' =>
  array (
    0 => "$IP/extensions/VisualEditor/lib/ve/i18n",
    1 => "$IP/extensions/VisualEditor/i18n/ve-mw",
    2 => "$IP/extensions/VisualEditor/i18n/ve-mw/api",
    3 => "$IP/extensions/VisualEditor/i18n/ve-mw/mwlanguagevariant",
    4 => "$IP/extensions/VisualEditor/i18n/ve-wmf",
  ),
);