Page MenuHomePhabricator

{{#CommunityRequests:data}} returns the translated status, not the internal name
Closed, ResolvedPublic3 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue:

  • Preview {{#CommunityRequests:data|id=W123|field=status}}

What happens?:
"Long-term opportunity"

What should have happened instead?:
"long-term-opportunity"

Other information:
This makes the feature useless for coding with {{#ifeq:}}, {{#switch:}}, etc., since the result depends on page language.


Derived Requirement

Ensure that the parser function {{#CommunityRequests:data}} returns the internal status name (e.g., 'long-term-opportunity') rather than the translated human-readable status (e.g., 'Long-term opportunity'), so that the output is stable and suitable for use in parser logic such as {{#ifeq:}} and {{#switch:}} across all interface languages.

Test Steps

Test Case 1: Ensure {{#CommunityRequests:data}} Returns Internal Status Value

  1. Open any wiki page on the beta environment for editing.
  2. Insert the following wikitext: {{#CommunityRequests:data|id=W29|field=status}}
  3. Preview the page.
  4. Observe the returned value.
  5. Confirm the language of the page does not change the output.
  6. Confirm that the returned value is the internal key (e.g., 'long-term-opportunity') not the translated label.
  7. ✅❓❌⬜ AC1: The parser function returns the internal status name, not the translated version.
  8. ✅❓❌⬜ AC2: The returned value remains stable and identical across different interface languages.

QA Results - Meta Beta

ACStatusDetails
1T409615#11445088
2T409615#11445088

Event Timeline

So I guess lang should be ignored except when the field is title.

Alternatively, lang could be the indicator that you want the translated status?

I don't think that's necessary at all because there's Template:Int anyway. In fact mw:Help:Extension:CommunityRequests#Data parser function says lang is "only applicable for the title field"!

Change #1207009 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/extensions/CommunityRequests@master] EntityDataRenderer: return wikitext values instead of translations

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

MusikAnimal changed the task status from Open to In Progress.Nov 21 2025, 7:49 AM
HMonroy updated the task description. (Show Details)
HMonroy changed the task status from In Progress to Open.Dec 5 2025, 3:23 AM
HMonroy moved this task from Feedback and Review to QA on the Community-Tech (Sea Lion Squad) board.

Change #1207009 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] EntityDataRenderer: return wikitext values instead of translations

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

@MusikAnimal Confirmed that{{#CommunityRequests:data}} returns the translated status, not the internal name, as seen in the videos below. I will mark this as Resolved. Thanks for all your work!

Test Result - Meta Beta

Status: ✅ PASS
Environment: Meta Beta
OS: macOS Tahoe 26.1
Browser: Chrome 142
Device: MBA
Emulated Device: NA

Test Artifact(s):

https://meta.wikimedia.beta.wmcloud.org/wiki/Community_Wishlist/W29

Test Steps

Test Case 1: Ensure {{#CommunityRequests:data}} Returns Internal Status Value

  1. Open any wiki page on the beta environment for editing.
  2. Insert the following wikitext: {{#CommunityRequests:data|id=W29|field=status}}
  3. Preview the page.
  4. Observe the returned value.
  5. Confirm the language of the page does not change the output.
  6. Confirm that the returned value is the internal key (e.g., 'long-term-opportunity') not the translated label.
  7. AC1: The parser function returns the internal status name, not the translated version.

  1. AC2: The returned value remains stable and identical across different interface languages.

GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.