Page MenuHomePhabricator

Allow translating non-wikitext pages with configuration option
Closed, ResolvedPublic2 Estimated Story PointsFeature

Description

Feature summary (what you would like to be able to do and where):

I would like to be able to translate non-wikitext pages, e.g. Scribunto modules, with the Translate extension. This should probably be behind some sort of configuration.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

A non-Wikimedia wiki that I am an administrator of, the FTB Wiki, makes heavy use of translated modules (particularly with navboxes). The recent change (T163254 + https://gerrit.wikimedia.org/r/718014) makes us unable to mark new modules for translation, breaking our current setup.

Benefits (why should this be implemented?):

This empowers individual wikis to make a decision about what content types should be allowed to be marked for translation on their wikis.

Event Timeline

While there are certainly non-wikitext content models that would welcome translation (so this feature request is definitely valid), I don’t think module is one of them. Actually, there’s an ongoing project for supporting module translation better, without having to mix Lua and Translate syntax: T238417: Structured localization framework for Scribunto modules. It should already be usable, although it could be made more convenient.

As I wrote, this feature request is valid, even if not the best solution for the current problem. For example, for a content type similar to ProofreadPage’s one (which is basically a “wikitext plus”), allowing using <translate> tags would be the best fit.

Change #1014997 had a related patch set uploaded (by TK-999; author: TK-999):

[mediawiki/extensions/Translate@master] Support translating non-wikitext content models

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

abi_ triaged this task as Medium priority.Mar 28 2024, 8:23 AM
abi_ moved this task from Backlog to page translation on the MediaWiki-extensions-Translate board.

Change #1014997 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Support translating non-wikitext content models

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

abi_ moved this task from Need QA to Done on the LPL Essential (LPL Essential 2024 Jul-Oct) board.
abi_ subscribed.

Tested this on the language translate instance: https://language-translate.wmcloud.org/index.php/Test.css -- works as expected.

Is this change something that should be highlighted in Tech News? If yes: What would you suggest as the entry-text, and entry link(s)? Thanks.

No, I don’t think so – it’s probably something that will never be enabled on WMF wikis, it’s for third-party wikis’ benefit.

  NODES
admin 1
Note 3
Project 9