0

Exporting Template:Stub from Wikipedia for use on non-WMF wiki, it transcludes Scribunto Module:Asbox which has on line 233:

' is a [[Wikipedia:stub|stub]]. You can help Wikipedia by [',

Substituting Wikipedia with magic word {{SITENAME}} doesn't work here. How to replace Wikipedia for the comparable Lua function mw.site.siteName, so that pages transcluding the stub template shows the local wiki name instead?

  • 1
    FWIW {{SITENAME}} is generally the wrong thing to do (no guarantees that is the name of the namespace); you'd want to replace it with Project, or {{ns:Project}}. – Tgr Feb 18 '18 at 5:47
1

Use mw.site.namespaces:

' is a [[' .. mw.site.namespaces.Project.name .. ':stub|stub]]. You can help ' .. mw.site.siteName .. ' by ['

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.