Page MenuHomePhabricator

Structured localization framework for gadgets
Open, Needs TriagePublic

Description

Gadgets that are useful in more than one language need a convenient and uniform localization framework for translating their messages.

This is needed for gadgets that are used across wikis, and even for gadgets that are used in multilingual wikis such as Commons or Wikidata.

At the moment there is no such framework, and this causes several difficulties:

  • Gadgets usually rely on editing raw JavaScript or JSON, which is inconvenient for people who are generally uncomfortable with code and especially for people who write in right-to-left alphabets and other scripts that don't work well in plain text.
  • Gadget source code is stored on wiki pages, which are usually protected, and every localization update requires the involvement of a sysadmin or an interface editor.
  • The API for loading, parsing, and displaying the messages is inconsistent and different gadgets use different functions for this.

It would be much nicer if gadgets could be translated the same way as extensions are: using a dedicated translation interface so that translators wouldn't have to deal with any code (probably with the Translate extension), letting everyone update translations in true wiki style ("anyone can edit"), and using a consistent API for message parsing, including all the MediaWiki features such as PLURAL, GRAMMAR, etc.

This will possibly require some adaptation in the Gadgets extension and the Translate extension, and some updates in the gadgets themselves, but it will make life easier for everyone.

This task is specifically for gadgets. Templates and modules have some similar requirements, but they are handled in other tasks. See also:

Event Timeline

Amire80 created this task.Nov 14 2019, 10:54 PM
Amire80 renamed this task from Structured localization framework for Gadgets to Structured localization framework for gadgets.Nov 15 2019, 4:43 PM