As part of T380825: Make ORES topics and their translations easily available to MediaWiki extensions, the logic and messages for article topics has been moved to the WikimediaMessages exension. This functionality is exposed via the ArticleTopicFiltersRegistry, so that callers don't have to know about the message keys used or other aspects such as grouping.
ContentTranslation should update its ArticleTopicsDefinition class to use ArticleTopicFiltersRegistry; or even remove the class altogether and inline the relevant functionality if possible.
Note that this seemingly introduces a hard dependency on the WikimediaMessages extension. This is kind of a pre-exisiting problem though, as the topic list is based on a Wikipedia-specific model. If the extension isn't meant to be Wikimedia-specific, then it should have a fallback for when the list of topics is not available. See for example how the CampaignEvents extension does that.
Derived Requirement
Update ContentTranslation's ArticleTopicsDefinition class to utilize the ArticleTopicFiltersRegistry for handling article topics. If feasible, remove ArticleTopicsDefinition entirely and inline its functionality. Ensure that the implementation properly handles cases where the WikimediaMessages extension is unavailable, providing an appropriate fallback.
Test Steps
Test Case 1: Verify ArticleTopicsDefinition Uses ArticleTopicFiltersRegistry
- Open Wikipedia and navigate to the ContentTranslation tool.
- Initiate a translation for an article with predefined topics.
- ✅❓❌⬜ AC1: Confirm that article topics are retrieved via ArticleTopicFiltersRegistry.
Test Case 2: Ensure Article Topics Are Displayed Correctly in Translations
- Start a new translation in ContentTranslation in a different language (ex. uselang=es).
- Observe the topics assigned to the source article.
- ✅❓❌⬜ AC2: Confirm that the topics match those expected from ArticleTopicFiltersRegistry.
QA Results - Test Wiki
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T387159#10671511 |
| 2 | ✅ | T387159#10671511 |



