Module:documentation/translit: Difference between revisions

Created page with "local export = {} local function fake_frame(args, parent_args) return { args = args, getParent = function() return { args = parent_args, } end } end function get_by_code(code) return require("Module:languages").getByCode(code, nil, true, true) or require("Module:scripts").getByCode(code) end local function get_code_from_title_without_namespace(title_without_namespace) local prefix = title_without_namespace:match("^(.+)%-translit%f[/%z]") if not pr..."
 
No edit summary
 
Line 103: Line 103:
local pagename = mw.title.getCurrentTitle().text -- DO NOT replace with mw.loadData("Module:headword/data").pagename as we need the root portion
local pagename = mw.title.getCurrentTitle().text -- DO NOT replace with mw.loadData("Module:headword/data").pagename as we need the root portion
local args = frame:getParent().args
local args = frame:getParent().args
if args[1] and get_code_from_title_without_namespace(pagename) ~= args[1] then
-- [[Special:WhatLinksHere/Wiktionary:Tracking/translit/input different from title]]
require("Module:debug").track("translit/input different from title")
end
if args[1] then
if args[1] then
return export.documentation_from_code(args[1], args[2], pagename)
return export.documentation_from_code(args[1], args[2], pagename)