Module:labels: Difference between revisions
No edit summary |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 382: | Line 382: | ||
if glossary then | if glossary then | ||
local glossary_entry = glossary == true and label or glossary | local glossary_entry = glossary == true and label or glossary | ||
formatted_label = "[[Appendix:Glossary#" .. glossary_entry .. "|" .. display .. "]]" | formatted_label = "[[wikt:Appendix:Glossary#" .. glossary_entry .. "|" .. display .. "]]" | ||
elseif Wiktionary then | elseif Wiktionary then | ||
local Wiktionary_entry = Wiktionary == true and label or Wiktionary | local Wiktionary_entry = Wiktionary == true and label or Wiktionary | ||
if Wiktionary == display then | if Wiktionary == display then | ||
formatted_label = "[[" .. display .. "]]" | formatted_label = "[[wikt:" .. display .. "]]" | ||
else | else | ||
formatted_label = "[[" .. Wiktionary_entry .. "|" .. display .. "]]" | formatted_label = "[[wikt:" .. Wiktionary_entry .. "|" .. display .. "]]" | ||
end | end | ||
elseif Wikipedia then | elseif Wikipedia then | ||
| Line 714: | Line 714: | ||
local function get_info_and_insert(label) | local function get_info_and_insert(label) | ||
-- Reuse this structure to save memory. | -- Reuse this structure to save memory. | ||
data.label = label | data.label = require("Module:links").embedded_language_links{term = label, lang = data.lang} | ||
insert(label_infos, export.get_label_info(data)) | insert(label_infos, export.get_label_info(data)) | ||
end | end | ||