Module:etymology: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 396: Line 396:
     local language_from = m_languages.get_by_code(args[2])
     local language_from = m_languages.get_by_code(args[2])
     local term = args[3]
     local term = args[3]
     if args[2] == "lnk-pro" and plaenk_alt[term] then term = plaenk_alt[term] end
    local alt
     if args[2] == "lnk-pro" and plaenk_alt[term] then
    alt = term
    term = plaenk_alt[term]
end
     if (not args["notext"]) and (not data["silent"]) then out = out .. format_prefixed_text(template, data["text"], args["nocap"], data["preposition"]) end
     if (not args["notext"]) and (not data["silent"]) then out = out .. format_prefixed_text(template, data["text"], args["nocap"], data["preposition"]) end
     out = out .. m_links.full_link({
     out = out .. m_links.full_link({
         term = term,
         term = term,
         language = language_from,
         language = language_from,
         alt = args["alt"],
         alt = alt or args["alt"],
         gloss = args["t"],
         gloss = args["t"],
         pos = args["pos"],
         pos = args["pos"],
Line 422: Line 426:
     for i, term in ipairs(args[2]) do
     for i, term in ipairs(args[2]) do
         local i_term, i_args = m_inline.parse(term)
         local i_term, i_args = m_inline.parse(term)
         if args[1] == "lnk-pro" and plaenk_alt[i_term] then i_term = plaenk_alt[i_term] end
        local i_alt
         if args[1] == "lnk-pro" and plaenk_alt[i_term] then
        i_alt = i_term
        i_term = plaenk_alt[i_term]
    end
         n_parts = n_parts + 1
         n_parts = n_parts + 1
         local language_from = nil
         local language_from = nil
Line 451: Line 459:
            term = i_term,
            term = i_term,
            language = language_from or language_to,
            language = language_from or language_to,
            alt = args["alt"][i] or i_args["alt"],
            alt = i_alt or args["alt"][i] or i_args["alt"],
            gloss = args["t"][i] or i_args["t"],
            gloss = args["t"][i] or i_args["t"],
            pos = args["pos"][i] or i_args["pos"],
            pos = args["pos"][i] or i_args["pos"],