Page MenuHomePhabricator

Store translations if Translate extension is enabled
Closed, ResolvedPublic5 Estimated Story Points

Description

Here’s a revised version with corrected grammar:


When a page is translated and published, a new focus area translation should be saved to the database.

Known Issues

The Translate extension creates a subpage for the base language of the focus area, triggering a duplication of the focus area in communityrequests_focus_area. This occurs because we store the focus area based on page_id and language (content language), and the Translate extension creates a subpage with a redirect to the original page for the original language.

Acceptance Criteria

  • Translations should have a database representation in communityrequests_wishes_translations and communityrequests_focus_area_translations if the Translate extension is enabled.

Derived Requirement
When the Translate extension is enabled, publishing a translated focus area or wish should result in a corresponding translation record being saved in the appropriate database table: communityrequests_focus_area_translations for focus areas and communityrequests_wishes_translations for wishes. Translations must be stored only once, avoiding duplication caused by the base language subpage created by Translate.

Test Steps

Test Case 1: Ensure wish translation is saved in DB when published

  1. Navigate to a translatable wish page (e.g., Community Wishlist/Wishes/W123) that supports translation.
  2. Translate the wish content into a different language and publish it.
  3. ✅❓❌⬜ AC1: Confirm that a new entry is saved in the communityrequests_wishes_translations table for the published translation.

QA Results - Test Beta

ACStatusDetails
1T396361#11010585

Event Timeline

Change #1155766 had a related patch set uploaded (by Dmaza; author: Dmaza):

[mediawiki/extensions/CommunityRequests@master] [WIP]

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

This is needed for r1162055 and the other abstraction to come. The WIP is basically what we want, though. The one piece that's left that's currently unsupported is to automatically set the page language when the user language is different than English. This is currently done in the old wishlist via a bot but can be done with a hook instead. I'm looking into this now.

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

[mediawiki/extensions/CommunityRequests@master] Change page language when creating wishes in lang other than site lang

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

Change #1155766 abandoned by Dmaza:

[mediawiki/extensions/CommunityRequests@master] [WIP]

Reason:

Moved logic to I50a9798806d5963706f6d972837bea0e86a4d1ae

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

MusikAnimal renamed this task from Store focus-area translations if Translate ext is enabled to Store translations if Translate extension is enabled.Jun 26 2025, 7:34 PM
MusikAnimal claimed this task.
MusikAnimal updated the task description. (Show Details)
MusikAnimal set the point value for this task to 5.Jun 26 2025, 10:00 PM

Change #1163921 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] Abstract wishes/FAs, change page language on creation, fix deletion

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

@MusikAnimal Not sure if the description should be updated or if this is QA testable. No DB query. Focus areas are being worked on. The translated wishes did not show up in the language I selected, as seen in the videos. It still only showed the wish and the W7/en, no matter the language selected.

Test Result - commtech.toolforge

Status: ❌ FAIL
Environment: commtech.toolforge
OS: macOS Sequoia 15.5
Browser: Chrome 138
Device: MBA
Emulated Device: NA

Test Artifact(s):
https://commtech.toolforge.org/Community_Wishlist/Wishes/W7
https://commtech.toolforge.org/Community_Wishlist/Wishes

Test Steps

Test Case 1: Ensure wish translation is saved in DB when published

  1. Navigate to a translatable wish page (e.g., Community Wishlist/Wishes/W123) that supports translation.
  2. Translate the wish content into a different language and publish it.
  3. AC1: Confirm that a new entry is saved in the communityrequests_wishes_translations table for the published translation.
EnglishSpanish
GMikesell-WMF changed the task status from Open to In Progress.Jul 16 2025, 6:36 PM
GMikesell-WMF updated Other Assignee, added: GMikesell-WMF.
GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF moved this task from QA to In Development on the Community-Tech (Sea Lion Squad) board.

@MusikAnimal Not sure if the description should be updated or if this is QA testable. No DB query. Focus areas are being worked on. The translated wishes did not show up in the language I selected, as seen in the videos. It still only showed the wish and the W7/en, no matter the language selected.

Yes, there are bugs. I think r1167986 (for T387962) needs to be merged before you can QA this task.

MusikAnimal closed this task as Resolved.EditedAug 1 2025, 7:56 PM

I understand there is still some sort of issue (T397975#11025530), but I think this task can be closed. The translations are in fact being stored.