Module:etymology: Difference between revisions

m
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
mNo edit summary
mNo edit summary
Line 185: Line 185:
     local language = m_languages.get_by_code(args[1])
     local language = m_languages.get_by_code(args[1])
     if not args["notext"] then out = out .. export.format_glossary(template, data["glossary"], args["nocap"]) .. " of " end
     if not args["notext"] then out = out .. export.format_glossary(template, data["glossary"], args["nocap"]) .. " of " end
     out = out .. m_links.full_link{
     out = out .. m_links.full_link({
         term = args[2],
         term = args[2],
         language = language,
         language = language,
Line 192: Line 192:
         pos = args["pos"],
         pos = args["pos"],
         nobold = true,
         nobold = true,
        "term"
    },"term")
    }
     if not args["nocat"] then categories = export.hydrate_categories(data["categories"], language) end
     if not args["nocat"] then categories = export.hydrate_categories(data["categories"], language) end
     return export.format_etymology(out, categories)
     return export.format_etymology(out, categories)
Line 204: Line 203:
     local language_from = m_languages.get_by_code(args[2])
     local language_from = m_languages.get_by_code(args[2])
     if (not args["notext"]) and (not data["silent"]) then out = out .. export.format_glossary(template, data["glossary"], args["nocap"]) .. " of " end
     if (not args["notext"]) and (not data["silent"]) then out = out .. export.format_glossary(template, data["glossary"], args["nocap"]) .. " of " end
     out = out .. m_links.full_link{
     out = out .. m_links.full_link({
         term = args[3],
         term = args[3],
         language = language_from,
         language = language_from,
Line 212: Line 211:
         showlanguage = true,
         showlanguage = true,
         nobold = true,
         nobold = true,
        "term"
    },"term")
    }
     if not args["nocat"] then categories = export.hydrate_categories(data["categories"], language_to, language_from) end
     if not args["nocat"] then categories = export.hydrate_categories(data["categories"], language_to, language_from) end
     return export.format_etymology(out, categories)
     return export.format_etymology(out, categories)
Line 246: Line 244:
             end
             end
         end
         end
         table.insert(pre_out, m_links.full_link{
         table.insert(pre_out, m_links.full_link({
             term = term,
             term = term,
             language = language_from or language_to,
             language = language_from or language_to,
Line 255: Line 253:
             nobold = true,
             nobold = true,
             "term"
             "term"
         })
         },"term"))
     end
     end
     if (not args["nocat"]) and (n_parts > 1 and n_affixes == 0) then
     if (not args["nocat"]) and (n_parts > 1 and n_affixes == 0) then