Page MenuHomePhabricator

Allow to import modules from Wikidata/other chapter per require()
Closed, ResolvedPublic

Description

Author: felix

Description:
Current situation: LUA source code of Module:Authority control is copied to other Wikipedias which want the same functionality. Copying modules will increase with the spread of LUA used for templates.

Design goal:

  • One central LUA module which provides the basic functionality which is language independent and can be easily augmented/corrected in case of errors (perhaps on Wikidata)
  • Each chapter includes the central module and adds language depended functionality (e.g., translations, local categories...)

Problem: Add the following module to the German Wikipedia:

local test = require('en:Module:Authority control')
p = {}
return p

Result:

p

Lua-Error in package.lua, line 80: module `en:Module:Authority control' not found

Same for problem if you try to include a Wikidata module on a Wikipedia module

local test = require('wikidata:Module:CiteQ')
p = {}
return p

Result:

p

Lua-Error in package.lua, Zeile 80: module `wikidata:Module:CiteQ' not found


Version: unspecified
Severity: normal

Details

Reference
bz64421