Перейти к содержанию

Модуль:CTD: различия между версиями

м
нет описания правки
мНет описания правки
мНет описания правки
Строка 143: Строка 143:
local add_origin      = false  -- add information on origin
local add_origin      = false  -- add information on origin
local add_description = false  -- add short description
local add_description = false  -- add short description
local add_link        = false  -- add hyperlink to wiki page


-- split 'userparam' in variables
-- split 'userparam' in variables
Строка 159: Строка 160:
if mw.ustring.find(style,'оригинал',1,true) ~= nil then add_origin    = true end
if mw.ustring.find(style,'оригинал',1,true) ~= nil then add_origin    = true end
if mw.ustring.find(style,'описание',1,true) ~= nil then add_description= true end
if mw.ustring.find(style,'описание',1,true) ~= nil then add_description= true end
if mw.ustring.find(style,'ссылка',1,true)  ~= nil then add_link      = true end


-- define term to show, i.e. with accent and diacritic
-- define term to show, i.e. with accent and diacritic
Строка 269: Строка 271:
-- FOOTNOTE should be added
-- FOOTNOTE should be added
if view_footnote then
if view_footnote then
output_str = term_with_link
if add_link then
output_str = term_with_link
else
output_str = term_without_link
end
if add_origin then output_str = output_str ..' '.. origin end
if add_origin then output_str = output_str ..' '.. origin end
if add_description then output_str = output_str ..'. – '.. description end
if add_description then output_str = output_str ..'. – '.. description end
Строка 279: Строка 285:
if view_brackets then
if view_brackets then
if term_type == 'литература' or term_type == 'личность' then
if term_type == 'литература' or term_type == 'личность' then
output_str = term_with_link
if add_link then
output_str = term_with_link
else
output_str = term_without_link
end
else -- для 'понятие' и 'выражение'
else -- для 'понятие' и 'выражение'
output_str = description
output_str = description