Module:qualifier/templates: difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
Theknightwho (talk | contribs) non_gloss_definition_t_english_links replaced by non_gloss_definition_t. |
Theknightwho (talk | contribs) mNo edit summary |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
⚫ | |||
local antsense = m_qualifier.antsense |
|||
local format_qualifier = m_qualifier.format_qualifier |
|||
⚫ | |||
local sense = m_qualifier.sense |
|||
local export = {} |
local export = {} |
||
function export.qualifier_t(frame) |
function export.qualifier_t(frame) |
||
⚫ | |||
local args = {} |
|||
process_params(frame:getParent().args, { |
|||
[1] = {required = true, list = true}, |
|||
args[i] = v |
|||
})[1] |
|||
⚫ | |||
) |
|||
⚫ | |||
⚫ | |||
⚫ | |||
-- for i, label in ipairs(args) do |
|||
-- if subvarieties[label] then |
|||
-- require("Module:debug").track("qualifier/subvarieties") |
|||
-- --[[ |
|||
-- currently not working: |
|||
-- local lang = subvarieties[label].languages[1] |
|||
-- require("Module:debug").track("qualifier/subvarieties/" .. lang) |
|||
-- ]] |
|||
-- end |
|||
-- end |
|||
function export.sense_t(frame) |
|||
⚫ | |||
⚫ | |||
process_params(frame:getParent().args, { |
|||
[1] = {required = true, list = true}, |
|||
})[1] |
|||
⚫ | |||
end |
end |
||
function export. |
function export.antsense_t(frame) |
||
return antsense( |
|||
local text = frame.args[1] |
|||
process_params(frame:getParent().args, { |
|||
if not mw.ustring.find(text, "%[%[") then |
|||
[1] = {required = true, list = true}, |
|||
⚫ | |||
})[1] |
|||
else |
|||
) |
|||
⚫ | |||
local sc = require("Module:scripts").getByCode("Latn") |
|||
return require("Module:links").embedded_language_links({term = text, lang = lang, sc = sc}, true) |
|||
end |
|||
end |
end |
||
Latest revision as of 16:39, 28 April 2024
- This module lacks a documentation subpage. Please create it.
- Useful links: root page • root page’s subpages • links • transclusions • testcases • sandbox
local m_qualifier = require("Module:qualifier")
local antsense = m_qualifier.antsense
local format_qualifier = m_qualifier.format_qualifier
local process_params = require("Module:parameters").process
local sense = m_qualifier.sense
local export = {}
function export.qualifier_t(frame)
return format_qualifier(
process_params(frame:getParent().args, {
[1] = {required = true, list = true},
})[1]
)
end
function export.sense_t(frame)
return sense(
process_params(frame:getParent().args, {
[1] = {required = true, list = true},
})[1]
)
end
function export.antsense_t(frame)
return antsense(
process_params(frame:getParent().args, {
[1] = {required = true, list = true},
})[1]
)
end
return export