Mô đun:category tree/topic/Names
Giao diện
- Trang mô đun này thiếu trang con tài liệu. Xin hãy tạo trang tài liệu này.
- Liên kết hữu ích: trang gốc • trang con của trang gốc • liên kết • nhúng • trường hợp kiểm thử • chỗ thử
local labels = {}
local handlers = {}
labels["Tên"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} names for a variety of things.",
additional = "Given names and surnames can be found in [[:Category:Names by language]].",
parents = {"Tất cả chủ đề"},
}
labels["letter names"] = {
type = "name",
description = "{{{langname}}} terms that are the names of letters.",
additional = "Ideally entries should be in a subcategory for the names of letters in a particular script.",
parents = {"names", "letters, symbols, and punctuation"},
}
-- Handler for "SCRIPT letter names".
table.insert(handlers, function(label)
local script = label:match("^(.*) letter names$")
if script then
local sc = require("Module:scripts").getByCanonicalName(script)
if sc then
local script_page
local appendix = ("Phu lục:Chữ %s"):format(script)
local appendix_title = mw.title.new(appendix)
if appendix_title and appendix_title.exists then
script_page = appendix
else
script_page = "w:" .. sc:getWikipediaArticle()
end
local link = ("[[%s|%s script]]"):format(script_page, script)
return {
type = "name",
description = ("{{{langname}}} terms that serve as names for letters and symbols directly based on letters, " ..
"such as [[ligature]]s and letters with [[diacritic]]s, of the %s."):format(link),
parents = {"letter names"},
}
end
end
end)
labels["couple nicknames"] = {
type = "name",
description = "{{{langname}}} informal names for pairs of people, especially [[celebrity]] [[couple]]s.",
additional = "For fictional relationships, see [[:Category:Ships (fandom)]].",
parents = {"nicknames", "people"},
}
labels["foreign personal names"] = {
type = "name",
description = "Transliterations, respellings or other renderings of personal names into {{{langname}}}.",
umbrella = {
description = "Transliterations, respellings or other renderings of personal names.",
},
parents = {"names"},
}
labels["named prayers"] = {
type = "name",
description = "=[[specific]] [[prayer]]s",
parents = {"names", "prayer"},
}
labels["nicknames"] = {
type = "name",
description = "{{{langname}}} terms that are informal names or diminutives of specific entities (people, places, etc.)",
parents = {"names"},
}
labels["nicknames for individuals"] = {
type = "name",
description = "{{{langname}}} terms that are informal names for specific individuals (e.g. [[J-Lo]] for singer {{w|Jennifer Lopez}}).",
parents = {"individuals", "nicknames"},
}
labels["sports nicknames"] = {
type = "name",
description = "{{{langname}}} informal names for people or teams involved in sports.",
parents = {"nicknames", "sports"},
}
labels["danh pháp phân loại"] = {
type = "chủ đề thuộc nhóm tên gọi",
description = "=[[danh pháp]] [[phân loại]]",
parents = {"tên", "phân loại học"},
}
return {LABELS = labels, HANDLERS = handlers}