Wiktionary siwiktionary https://si.wiktionary.org/wiki/%E0%B7%80%E0%B7%92%E0%B6%9A%E0%B7%8A%E0%B7%82%E0%B6%B1%E0%B6%BB%E0%B7%92:%E0%B6%B8%E0%B7%94%E0%B6%BD%E0%B7%8A_%E0%B6%B4%E0%B7%92%E0%B6%A7%E0%B7%94%E0%B7%80 MediaWiki 1.48.0-wmf.4 case-sensitive මාධ්‍යය විශේෂ සාකච්ඡාව පරිශීලක පරිශීලක සාකච්ඡාව වික්ෂනරි වික්ෂනරි සාකච්ඡාව ගොනුව ගොනුව සාකච්ඡාව මාධ්‍යවිකි මාධ්‍යවිකි සාකච්ඡාව සැකිල්ල සැකිලි සාකච්ඡාව උදවු උදවු සාකච්ඡාව ප්‍රවර්ගය ප්‍රවර්ග සාකච්ඡාව TimedText TimedText talk Module Module talk Event Event talk Module:category tree/families 828 6011 238738 238576 2026-11-11T11:22:03Z Lee 19 "All language families" සිට "භාෂා පවුල් සියල්ල" වෙතට 238738 Scribunto text/plain local raw_categories = {} local raw_handlers = {} local concat = table.concat local insert = table.insert local require_when_needed = require("Module:utilities/require when needed") local ucfirst = require_when_needed("Module:string utilities", "ucfirst") ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["භාෂා පවුල් සියල්ල"] = { topright = "{{commonscat|Languages by family}}\n{{wp|Language family,List of language families}}", description = "මෙම ප්‍රවර්ගය [[language family|භාෂා පවුල්]] සියල්ල ලැයිස්තු ගත කරයි.", parents = {"මූලධර්ම"}, } raw_categories["භාෂා පවුල අනුව භාෂා"] = { topright = "{{commonscat|Languages by family}}\n{{wp|Language family,List of language families}}", description = "This category contains all languages categorized hierarchically according to the [[language family]] they belong to.", additional = "Only top-level language families are shown here. For a full list of all language families, see [[:Category:All language families]] or [[Wiktionary:List of families]].", parents = { {name = "භාෂා සියල්ල", sort = " "}, {name = "භාෂා පවුල් සියල්ල", sort = " "}, }, } raw_categories["Unassigned languages"] = { description = "Languages that have not yet been assigned to any family by Wiktionary editors, usually due to oversight.", additional = [=[This should be distinguished from: * [[:Category:Unclassifiable languages]] (languages that cannot be confidently assigned to any family, typically because the language is extinct or unresearched and has little available data on it); * [[:Category:Language isolates]] (where there is general agreement that the language has no relatives); and * [[:Category:Languages of disputed affiliation]] (languages where there is no consensus concerning which family, if any, they belong to).]=], parents = { {name = "Languages by family", sort = " Unassigned languages"}, "භාෂා පවුල් සියල්ල", }, } ----------------------------------------------------------------------------- -- -- -- RAW HANDLERS -- -- -- ----------------------------------------------------------------------------- local function family_is_not_a_family(fam) if not fam then return false elseif fam:getCode() == "qfa-not" then return true else local family_parent = fam:getFamily() local parent_code = family_parent and family_parent:getCode() or nil -- Some families have no parent, some are in the pseudo-family sgn (sign languages), some are given as -- qfa-dis (disputed) or potentially qfa-unc (unclassifiable), but are not themselves pseudo-families. if not parent_code or parent_code == "sgn" or parent_code == "qfa-dis" or parent_code == "qfa-unc" then return false end return family_is_not_a_family(family_parent) end end local function infobox(fam) local ret = {} insert(ret, "<table class=\"wikitable\">\n") insert(ret, "<tr>\n<th colspan=\"2\" class=\"plainlinks\">[//si.wiktionary.org/w/index.php?title=Module:families/data&action=edit භාෂා පවුලේ දත්ත සංස්කරණය]</th>\n</tr>\n") insert(ret, "<tr>\n<th>කැනොනිකල් නාමය</th><td>" .. fam:getCanonicalName() .. "</td>\n</tr>\n") local otherNames = fam:getOtherNames() if otherNames then local names = {} for _, name in ipairs(otherNames) do insert(names, "<li>" .. name .. "</li>") end if #names > 0 then insert(ret, "<tr>\n<th>Other names</th><td><ul>" .. concat(names, "\n") .. "</ul></td>\n</tr>\n") end end local aliases = fam:getAliases() if aliases then local names = {} for _, name in ipairs(aliases) do insert(names, "<li>" .. name .. "</li>") end if #names > 0 then insert(ret, "<tr>\n<th>අන්වර්ථ නාම</th><td><ul>" .. concat(names, "\n") .. "</ul></td>\n</tr>\n") end end local varieties = fam:getVarieties() if varieties then local names = {} for _, name in ipairs(varieties) do if type(name) == "string" then insert(names, "<li>" .. name .. "</li>") else assert(type(name) == "table") local first_var local subvars = {} for i, var in ipairs(name) do if i == 1 then first_var = var else insert(subvars, "<li>" .. var .. "</li>") end end if #subvars > 0 then insert(names, "<li><dl><dt>" .. first_var .. "</dt>\n<dd><ul>" .. concat(subvars, "\n") .. "</ul></dd></dl></li>") elseif first_var then insert(names, "<li>" .. first_var .. "</li>") end end end if #names > 0 then insert(ret, "<tr>\n<th>Varieties</th><td><ul>" .. concat(names, "\n") .. "</ul></td>\n</tr>\n") end end insert(ret, "<tr>\n<th>[[Wiktionary:Families|භාෂා පවුලේ කේතය]]</th><td><code>" .. fam:getCode() .. "</code></td>\n</tr>\n") insert(ret, "<tr>\n<th>[[w:Proto-language|පොදු පූර්වජයා]]</th><td>") local protoLanguage = fam:getProtoLanguage() if protoLanguage then insert(ret, "[[:Category:" .. protoLanguage:getCategoryName() .. "|" .. protoLanguage:getCanonicalName() .. "]]") else insert(ret, "none") end insert(ret, "</td>\n") insert(ret, "\n</tr>\n") local parent = fam:getFamily() if not parent then insert(ret, "<tr>\n<th>[[Wiktionary:Families|ජනක භාෂා පවුල]]</th>\n<td>") insert(ret, "unassigned") elseif parent:getCode() == "qfa-not" then insert(ret, "<tr>\n<th>[[Wiktionary:Families|ජනක භාෂා පවුල]]</th>\n<td>") insert(ret, "not a family") else local chain = {} while parent do insert(chain, "[[:Category:" .. parent:getCategoryName() .. "|" .. parent:getCanonicalName() .. "]]") parent = parent:getFamily() if parent and parent:getCode() == "qfa-not" then break end end if #chain == 0 then insert(ret, "<tr>\n<th>[[Wiktionary:Families|ජනක භාෂා පවුල]]</th>\n<td>") insert(ret, "no parents") else insert(ret, "<tr>\n<th>[[Wiktionary:Families|ජනක භාෂා පවුල" .. (#chain == 1 and "ල" or "ල්") .. "]]</th>\n<td>") for i = #chain, 1, -1 do insert(ret, "<ul><li>" .. chain[i]) end insert(ret, string.rep("</li></ul>", #chain)) end end insert(ret, "</td>\n</tr>\n") if fam:getWikidataItem() and mw.wikibase then local link = '[' .. mw.wikibase.getEntityUrl(fam:getWikidataItem()) .. ' ' .. fam:getWikidataItem() .. ']' insert(ret, "<tr><th>විකි දත්ත</th><td>" .. link .. "</td></tr>") end insert(ret, "</table>") return concat(ret) end local function NavFrame_for_family_tree(content, title) return '<div class="NavFrame"><div class="NavHead">' .. (title or '{{{title}}}') .. '</div>' .. '<div class="NavContent" style="text-align: left; font-size: calc(1em / 0.95); padding: 0.3em">' .. content .. '</div></div>' end local additional_information = { ["cai"] = "These are [[indigenous]] ([[pre-Columbian]]) languages spoken in the {{w|Mesoamerican languages|Mesoamerican}} language area, " .. "which is considered to encompass central and southern [[Mexico]], [[Central America]] and the [[Caribbean]]. See also " .. "{{catlink|North American Indigenous languages}} and {{catlink|South American Indigenous languages}}.", ["nai"] = "These are [[indigenous]] ([[pre-Columbian]]) languages spoken in the [[North America]]n language area, defined as [[Canada]], " .. "the [[United States]] and northern [[Mexico]]. Languages of central and southern [[Mexico]], [[Central America]] and the [[Caribbean]] are " .. "considered {{catlink|Mesoamerican languages}}.", ["paa"] = "These are languages of the western [[Pacific]] (mostly of [[New Guinea]]) which are neither [[Austronesian]] nor [[Australian]].", ["qfa-dis"] = "These are languages where there is no consensus concerning which family, if any, they belong to.", ["qfa-iso"] = "These are languages where there is general agreement that the language has no known relatives.", ["qfa-jew"] = "These are the various languages and dialects that developed in [[Jewish]] communities in the {{w|Jewish diaspora|diaspora}}.", ["qfa-mix"] = "A [[mixed language]] is a language which is composed of two different languages.", ["qfa-unc"] = "These are languages that cannot be confidently assigned to a family due to lack of sufficient linguistic data. " .. "They are also commonly called {{w|unclassified language|unclassified languages}}, but this is ambiguous between " .. "languages that cannot be classified (due to insufficient data) and those that merely have not been classified " .. "(due to insufficient research).", ["sai"] = "These are [[indigenous]] ([[pre-Columbian]]) languages spoken in [[South America]], including immediately adjacent " .. "[[Caribbean]] islands. The remainder of the [[Caribbean]] is considered part of the {{w|Mesoamerican languages|Mesoamerican}} " .. "language area; see {{catlink|Mesoamerican languages}}.", } local preceding_information = { ["qfa-dis"] = "{{also|Category:Unclassifiable languages|Category:Unassigned languages|Category:Language isolates}}", ["qfa-iso"] = "{{also|Category:Languages of disputed affiliation|Category:Unclassifiable languages|Category:Unassigned languages}}", ["qfa-unc"] = "{{also|Category:Languages of disputed affiliation|Category:Unassigned languages|Category:Language isolates}}", ["qfa-mix"] = "{{also|Category:Creole or pidgin languages}}", ["crp"] = "{{also|Category:Mixed languages}}", } local specially_named_families = { ["Languages of disputed affiliation"] = "qfa-dis", ["Language isolates"] = "qfa-iso", } local specially_named_family_sort_keys = { ["Languages of disputed affiliation"] = "Disputed affiliation", ["Language isolates"] = "Isolate", } insert(raw_handlers, function(data) local family = require("Module:families").getByCategoryName(data.category) if not family then local special_code = specially_named_families[data.category] if special_code then family = require("Module:families").getByCode(special_code) if not family then error(("Internal error: Family code '%s' is an invalid family code."):format(special_code)) end end end if not family then return nil end local parent_fam = family:getFamily() local parent_sort_key = specially_named_family_sort_keys[data.category] or data.category local initial_char = family_is_not_a_family(family) and " " or "" local first_parent if not parent_fam or parent_fam:getCode() == "qfa-not" then first_parent = "භාෂා පවුල අනුව භාෂා" else first_parent = parent_fam:getCategoryName() -- Languages under 'Languages by family' should be sorted by letter; otherwise put subfamilies under '*' -- (except for pseudo-families, which go under ' ' under 'Languages by family') initial_char = initial_char == "" and "*" or initial_char end local first_parent_sort_key = initial_char .. parent_sort_key local description, additional = "", "" local topright local preceding = preceding_information[family:getCode()] local additional_preface = additional_information[family:getCode()] if additional_preface then additional_preface = additional_preface .. "\n\n" else additional_preface = "" end if family_is_not_a_family(family) then additional_preface = additional_preface .. "This is a pseudo-family, used for grouping purposes but not forming a linguistically valid [[clade]] " .. "(i.e. a set of linguistically related languages descending from a common parent).\n\n" .. "Information about this family:\n\n" else additional_preface = family:getCanonicalName() .. " පිළිබඳ තොරතුරු:\n\n" end if not data.called_from_inside then topright = {} local wikipedia_art = family:getWikipediaArticle("noCategoryFallback") if wikipedia_art then insert(topright, "{{wp|" .. wikipedia_art .. "}}") end local commons_cat = family:getCommonsCategory() if commons_cat then insert(topright, "{{commonscat|" .. commons_cat:gsub("^Category:", "") .. "}}") end topright = #topright > 0 and concat(topright, "\n") or nil description = "මෙය '''" .. family:getDisplayForm() .. "''' සඳහා වන ප්‍රධාන ප්‍රවර්ගය වෙයි." additional = additional_preface .. infobox(family) end local ok, tree_of_descendants = pcall( require("Module:family tree").render, family:getCode(), { families = "show", varieties = "show", pair = "family-first", must_have_descendants = true, }) if ok then if tree_of_descendants then additional = additional .. NavFrame_for_family_tree( tree_of_descendants, "Family tree") else additional = additional .. "\n\n" .. ucfirst(family:getCanonicalName()) .. " has no descendants or varieties listed in Wiktionary's language data modules." end else mw.log("error while generating tree: " .. tostring(tree_of_descendants)) end local parents = { {name = first_parent, sort = first_parent_sort_key}, {name = "භාෂා පවුල් සියල්ල", sort = parent_sort_key}, } for _, pseudofam in ipairs(family:getPseudoFamilies()) do insert(parents, {name = pseudofam:getCategoryName(), sort = parent_sort_key}) end return { preceding = preceding, topright = topright, description = description, additional = additional, parents = parents, breadcrumb = family:getCanonicalName(), can_be_empty = true, } end) return {RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers} p7ku5n6aznwznps9x6q4rx9983s1o0v Module:families 828 6157 238733 233726 2026-09-20T04:20:28Z en>Benwing2 0 +getPseudoFamilies 238733 Scribunto text/plain local export = {} local families_by_name_module = "Module:families/canonical names" local families_data_module = "Module:families/data" local json_module = "Module:JSON" local language_like_module = "Module:language-like" local languages_module = "Module:languages" local load_module = "Module:load" local table_module = "Module:table" local get_by_code -- Defined below. local gmatch = string.gmatch local insert = table.insert local ipairs = ipairs local make_object -- Defined below. local pairs = pairs local require = require local setmetatable = setmetatable local type = type --[==[ Loaders for functions in other modules, which overwrite themselves with the target function when called. This ensures modules are only loaded when needed, retains the speed/convenience of locally-declared pre-loaded functions, and has no overhead after the first call, since the target functions are called directly in any subsequent calls.]==] local function category_name_has_suffix(...) category_name_has_suffix = require(language_like_module).categoryNameHasSuffix return category_name_has_suffix(...) end local function category_name_to_code(...) category_name_to_code = require(language_like_module).categoryNameToCode return category_name_to_code(...) end local function deep_copy(...) deep_copy = require(table_module).deepCopy return deep_copy(...) end local function get_lang(...) get_lang = require(languages_module).getByCode return get_lang(...) end local function keys_to_list(...) keys_to_list = require(table_module).keysToList return keys_to_list(...) end local function load_data(...) load_data = require(load_module).load_data return load_data(...) end local function make_lang_object(...) make_lang_object = require(languages_module).makeObject return make_lang_object(...) end local function to_json(...) to_json = require(json_module).toJSON return to_json(...) end --[==[ Loaders for objects, which load data (or some other object) into some variable, which can then be accessed as "foo or get_foo()", where the function get_foo sets the object to "foo" and then returns it. This ensures they are only loaded when needed, and avoids the need to check for the existence of the object each time, since once "foo" has been set, "get_foo" will not be called again.]==] local families_by_name local function get_families_by_name() families_by_name, get_families_by_name = load_data(families_by_name_module), nil return families_by_name end local families_data local function get_families_data() families_data, get_families_data = load_data(families_data_module), nil return families_data end local families_suffixes local function get_families_suffixes() families_suffixes, get_families_suffixes = { "languages", "lects" }, nil return families_suffixes end local Family = {} Family.__index = Family --[==[ Return the family code of the family, e.g. {"ine"} for the Indo-European languages. ]==] function Family:getCode() return self._code end --[==[ Return the canonical name of the family. This is the name used to represent that language family on Wiktionary, and is guaranteed to be unique to that family alone. Example: {"Indo-European"} for the Indo-European languages. ]==] function Family:getCanonicalName() local name = self._name if name == nil then name = self._data[1] self._name = name end return name end --[==[ Return the display form of the family. For families, this is usually the same as the value returned by {getCategoryName("nocap")}, i.e. it reads <code>"<var>name</var> languages"</code> (e.g. {"Indo-Iranian languages"}). For full and etymology-only languages, this is the same as the canonical name, and for scripts, it reads <code>"<var>name</var> script"</code> (e.g. {"Arabic script"}). The displayed text used in {makeCategoryLink()} is always the same as the display form. ]==] function Family:getDisplayForm() local name = self._data[1] if category_name_has_suffix(name, families_suffixes or get_families_suffixes()) then name = name .. " languages" end return name end function Family:getAliases() Family.getAliases = require(language_like_module).getAliases return self:getAliases() end function Family:getVarieties(flatten) Family.getVarieties = require(language_like_module).getVarieties return self:getVarieties(flatten) end function Family:getOtherNames() Family.getOtherNames = require(language_like_module).getOtherNames return self:getOtherNames() end function Family:getAllNames() Family.getAllNames = require(language_like_module).getAllNames return self:getAllNames() end --[==[ Return a list of the pseudo-families (if any) that a family belongs to. The returned value is a list of Family objects. Pseudo-families are groupings of languages that are not clades but share some geographic, ethnic or other characteristic (e.g. [[:Category:Papuan languages]], [[:Category:Jewish languages]]). ]==] function Family:getPseudoFamilies() Family.getPseudoFamilies = require(language_like_module).getPseudoFamilies return self:getPseudoFamilies() end --[==[Returns a table of types as a lookup table (with the types as keys). The possible types are * {family}: This object is a family. * {full}: This object is a "full" family. This includes all families but a couple of etymology-only families for Old and Middle Iranian languages. * {etymology-only}: This object is an etymology-only family, similar to etymology-only languages. There are currently only two such families, for Old Iranian languages and Middle Iranian languages (which do not represent proper clades and have no proto-languages, hence cannot be full families). ]==] function Family:getTypes() local types = self._types if types == nil then types = {family = true} if self:getFullCode() == self:getCode() then types.full = true else types["etymology-only"] = true end local rawtypes = self._data.type if rawtypes then for t in gmatch(rawtypes, "[^,]+") do types[t] = true end end self._types = types end return types end --[==[Given a list of types as strings, returns true if the family has all of them.]==] function Family:hasType(...) Family.hasType = require(language_like_module).hasType return self:hasType(...) end --[==[Returns a {Family} object for the superfamily that the family belongs to.]==] function Family:getFamily() if self._familyObject == nil then local familyCode = self:getFamilyCode() if familyCode then self._familyObject = get_by_code(familyCode) else self._familyObject = false end end return self._familyObject or nil end --[==[Returns the code of the family's superfamily.]==] function Family:getFamilyCode() if not self._familyCode then self._familyCode = self._data[3] end return self._familyCode end --[==[Returns the canonical name of the family's superfamily.]==] function Family:getFamilyName() if self._familyName == nil then local family = self:getFamily() if family then self._familyName = family:getCanonicalName() else self._familyName = false end end return self._familyName or nil end --[==[Check whether the family belongs to {superfamily} (which can be a family code or object), and returns a boolean. If more than one is given, returns {true} if the family belongs to any of them. A family is '''not''' considered to belong to itself.]==] function Family:inFamily(...) for _, superfamily in ipairs{...} do if type(superfamily) == "table" then superfamily = superfamily:getCode() end local family, code = self:getFamily() while family do code = family:getCode() if code == superfamily then return true end family = family:getFamily() -- If family is parent to itself, return false. if family and family:getCode() == code then return false end end return false end end function Family:getParent() if self._parentObject == nil then local parentCode = self:getParentCode() if parentCode then self._parentObject = get_lang(parentCode, nil, true, true) else self._parentObject = false end end return self._parentObject or nil end function Family:getParentCode() if not self._parentCode then self._parentCode = self._data.parent end return self._parentCode end function Family:getParentName() if self._parentName == nil then local parent = self:getParent() if parent then self._parentName = parent:getCanonicalName() else self._parentName = false end end return self._parentName or nil end function Family:getParentChain() if not self._parentChain then self._parentChain = {} local parent = self:getParent() while parent do insert(self._parentChain, parent) parent = parent:getParent() end end return self._parentChain end function Family:hasParent(...) --checkObject("family", nil, ...) for _, other_family in ipairs{...} do for _, parent in ipairs(self:getParentChain()) do if type(other_family) == "string" then if other_family == parent:getCode() then return true end else if other_family:getCode() == parent:getCode() then return true end end end end return false end --[==[ If the family is etymology-only, this iterates through its parents until a full family is found, and the corresponding object is returned. If the family is a full family, then it simply returns itself. ]==] function Family:getFull() if not self._fullObject then local fullCode = self:getFullCode() if fullCode ~= self:getCode() then self._fullObject = get_lang(fullCode, nil, nil, true) else self._fullObject = self end end return self._fullObject end --[==[ If the family is etymology-only, this iterates through its parents until a full family is found, and the corresponding code is returned. If the family is a full family, then it simply returns the family code. ]==] function Family:getFullCode() return self._fullCode or self:getCode() end --[==[ If the family is etymology-only, this iterates through its parents until a full family is found, and the corresponding canonical name is returned. If the family is a full family, then it simply returns the canonical name of the family. ]==] function Family:getFullName() if self._fullName == nil then local full = self:getFull() if full then self._fullName = full:getCanonicalName() else self._fullName = false end end return self._fullName or nil end --[==[ Return a {Language} object (see [[Module:languages]]) for the proto-language of this family, if one exists. Otherwise, return {nil}. ]==] function Family:getProtoLanguage() if self._protoLanguageObject == nil then self._protoLanguageObject = get_lang(self._data.protoLanguage or self:getCode() .. "-pro", nil, true) or false end return self._protoLanguageObject or nil end function Family:getProtoLanguageCode() if self._protoLanguageCode == nil then local protoLanguage = self:getProtoLanguage() self._protoLanguageCode = protoLanguage and protoLanguage:getCode() or false end return self._protoLanguageCode or nil end function Family:getProtoLanguageName() if not self._protoLanguageName then self._protoLanguageName = self:getProtoLanguage():getCanonicalName() end return self._protoLanguageName end function Family:hasAncestor(...) -- Go up the family tree until a protolanguage is found. local family = self local protolang = family:getProtoLanguage() while not protolang do family = family:getFamily() protolang = family:getProtoLanguage() -- Return false if the family is its own family, to avoid an infinite loop. if family:getFamilyCode() == family:getCode() then return false end end -- If the protolanguage is not in the family, it must therefore be ancestral to it. Check if it is a match. for _, otherlang in ipairs{...} do if ( type(otherlang) == "string" and protolang:getCode() == otherlang or type(otherlang) == "table" and protolang:getCode() == otherlang:getCode() ) and not protolang:inFamily(self) then return true end end -- If not, check the protolanguage's ancestry. return protolang:hasAncestor(...) end local function fetch_descendants(self, format) local languages = require("Module:languages/code to canonical name") local etymology_languages = require("Module:etymology languages/code to canonical name") local families = require("Module:families/code to canonical name") local descendants = {} -- Iterate over all three datasets. for _, data in ipairs{languages, etymology_languages, families} do for code in pairs(data) do local lang = get_lang(code, nil, true, true) if lang:inFamily(self) then if format == "object" then insert(descendants, lang) elseif format == "code" then insert(descendants, code) elseif format == "name" then insert(descendants, lang:getCanonicalName()) end end end end return descendants end function Family:getDescendants() if not self._descendantObjects then self._descendantObjects = fetch_descendants(self, "object") end return self._descendantObjects end function Family:getDescendantCodes() if not self._descendantCodes then self._descendantCodes = fetch_descendants(self, "code") end return self._descendantCodes end function Family:getDescendantNames() if not self._descendantNames then self._descendantNames = fetch_descendants(self, "name") end return self._descendantNames end function Family:hasDescendant(...) for _, lang in ipairs{...} do if type(lang) == "string" then lang = get_lang(lang, nil, true) end if lang:inFamily(self) then return true end end return false end --[==[ Return the name of the main category of that family. Example: {"Germanic languages"} for the Germanic languages, whose category is at [[:Category:Germanic languages]]. Unless optional argument `nocap` is given, the family name at the beginning of the returned value will be capitalized. This capitalization is correct for category names, but not if the family name is lowercase and the returned value of this function is used in the middle of a sentence. (For example, the pseudo-family with the code {qfa-mix} has the name {"mixed"}, which should remain lowercase when used as part of the category name [[:Category:Terms derived from mixed languages]] but should be capitalized in [[:Category:Mixed languages]].) If you are considering using {getCategoryName("nocap")}, use {getDisplayForm()} instead. ]==] function Family:getCategoryName(nocap) local name = self._data.categoryName or self:getDisplayForm() if not nocap then name = mw.getContentLanguage():ucfirst(name) end return name end function Family:makeCategoryLink() return "[[:Category:" .. self:getCategoryName() .. "|" .. self:getDisplayForm() .. "]]" end --[==[Returns the Wikidata item id for the family or <code>nil</code>. This corresponds to the the second field in the data modules.]==] function Family:getWikidataItem() Family.getWikidataItem = require(language_like_module).getWikidataItem return self:getWikidataItem() end --[==[ Returns the name of the Wikipedia article for the family. `project` specifies the language and project to retrieve the article from, defaulting to {"enwiki"} for the English Wikipedia. Normally if specified it should be the project code for a specific-language Wikipedia e.g. "zhwiki" for the Chinese Wikipedia, but it can be any project, including non-Wikipedia ones. If the project is the English Wikipedia and the property {wikipedia_article} is present in the data module it will be used first. In all other cases, a sitelink will be generated from {:getWikidataItem} (if set). The resulting value (or lack of value) is cached so that subsequent calls are fast. If no value could be determined, and `noCategoryFallback` is {false}, {:getCategoryName} is used as fallback; otherwise, {nil} is returned. Note that if `noCategoryFallback` is {nil} or omitted, it defaults to {false} if the project is the English Wikipedia, otherwise to {true}. In other words, under normal circumstances, if the English Wikipedia article couldn't be retrieved, the return value will fall back to a link to the family's category, but this won't normally happen for any other project. ]==] function Family:getWikipediaArticle(noCategoryFallback, project) Family.getWikipediaArticle = require(language_like_module).getWikipediaArticle return self:getWikipediaArticle(noCategoryFallback, project) end function Family:makeWikipediaLink() return "[[w:" .. self:getWikipediaArticle() .. "|" .. self:getCanonicalName() .. "]]" end --[==[Returns the name of the Wikimedia Commons category page for the family.]==] function Family:getCommonsCategory() Family.getCommonsCategory = require(language_like_module).getCommonsCategory return self:getCommonsCategory() end function Family:toJSON(opts) local ret = { canonicalName = self:getCanonicalName(), categoryName = self:getCategoryName("nocap"), code = self:getCode(), parent = self:getParentCode(), full = self:getFullCode(), family = self:getFamilyCode(), protoLanguage = self:getProtoLanguageCode(), aliases = self:getAliases(), varieties = self:getVarieties(), otherNames = self:getOtherNames(), type = keys_to_list(self:getTypes()), wikidataItem = self:getWikidataItem(), wikipediaArticle = self:getWikipediaArticle(true), } -- Use `deep_copy` when returning a table, so that there are no editing restrictions imposed by `mw.loadData`. return opts and opts.lua_table and deep_copy(ret) or to_json(ret, opts) end function Family:getData() return self._data end function export.makeObject(code, data) local data_type = type(data) if data_type ~= "table" then error(("bad argument #2 to 'makeObject' (table expected, got %s)"):format(data_type)) end return setmetatable({_data = data, _code = code, _fullCode = code}, Family) end make_object = export.makeObject --[==[ Finds the family whose code matches the one provided. If it exists, it returns a {Family} object representing the family. Otherwise, it returns {nil}.]==] function export.getByCode(code) local data = (families_data or get_families_data())[code] if data == nil then return nil elseif data.parent == nil then return make_object(code, data) end return make_lang_object(code, data) end get_by_code = export.getByCode --[==[ Look for the family whose canonical name (the name used to represent that family on Wiktionary) matches the one provided. If it exists, it returns a {Family} object representing the family. Otherwise, it returns {nil}. The canonical name of families should always be unique (it is an error for two families on Wiktionary to share the same canonical name), so this is guaranteed to give at most one result.]==] function export.getByCanonicalName(name) if name == nil then return nil end local code = (families_by_name or get_families_by_name())[name] if code == nil then return nil end return get_by_code(code) end --[==[ Look for the family whose category name (the name used in categories for that family) matches the one provided. If it exists, it returns a {Family} object representing the family. Otherwise, it returns {nil}. In almost all cases, the category name for a family is its canonical name plus the word "languages", e.g. "Indo-European" has the category name "Indo-European languages". Where a canonical name ends with "languages" or "lects", the category name is identical to the canonical name.]==] function export.getByCategoryName(name) if name == nil then return nil end local code = category_name_to_code( name, " languages", families_by_name or get_families_by_name(), families_suffixes or get_families_suffixes() ) if code == nil then return nil end return get_by_code(code) end return export fhlpo09ymhi7e748v1r3pkilvfhbwm5 238734 238733 2026-11-11T11:13:01Z Lee 19 [[:en:Module:families]] වෙතින් එක් සංශෝධනයක් 238733 Scribunto text/plain local export = {} local families_by_name_module = "Module:families/canonical names" local families_data_module = "Module:families/data" local json_module = "Module:JSON" local language_like_module = "Module:language-like" local languages_module = "Module:languages" local load_module = "Module:load" local table_module = "Module:table" local get_by_code -- Defined below. local gmatch = string.gmatch local insert = table.insert local ipairs = ipairs local make_object -- Defined below. local pairs = pairs local require = require local setmetatable = setmetatable local type = type --[==[ Loaders for functions in other modules, which overwrite themselves with the target function when called. This ensures modules are only loaded when needed, retains the speed/convenience of locally-declared pre-loaded functions, and has no overhead after the first call, since the target functions are called directly in any subsequent calls.]==] local function category_name_has_suffix(...) category_name_has_suffix = require(language_like_module).categoryNameHasSuffix return category_name_has_suffix(...) end local function category_name_to_code(...) category_name_to_code = require(language_like_module).categoryNameToCode return category_name_to_code(...) end local function deep_copy(...) deep_copy = require(table_module).deepCopy return deep_copy(...) end local function get_lang(...) get_lang = require(languages_module).getByCode return get_lang(...) end local function keys_to_list(...) keys_to_list = require(table_module).keysToList return keys_to_list(...) end local function load_data(...) load_data = require(load_module).load_data return load_data(...) end local function make_lang_object(...) make_lang_object = require(languages_module).makeObject return make_lang_object(...) end local function to_json(...) to_json = require(json_module).toJSON return to_json(...) end --[==[ Loaders for objects, which load data (or some other object) into some variable, which can then be accessed as "foo or get_foo()", where the function get_foo sets the object to "foo" and then returns it. This ensures they are only loaded when needed, and avoids the need to check for the existence of the object each time, since once "foo" has been set, "get_foo" will not be called again.]==] local families_by_name local function get_families_by_name() families_by_name, get_families_by_name = load_data(families_by_name_module), nil return families_by_name end local families_data local function get_families_data() families_data, get_families_data = load_data(families_data_module), nil return families_data end local families_suffixes local function get_families_suffixes() families_suffixes, get_families_suffixes = { "languages", "lects" }, nil return families_suffixes end local Family = {} Family.__index = Family --[==[ Return the family code of the family, e.g. {"ine"} for the Indo-European languages. ]==] function Family:getCode() return self._code end --[==[ Return the canonical name of the family. This is the name used to represent that language family on Wiktionary, and is guaranteed to be unique to that family alone. Example: {"Indo-European"} for the Indo-European languages. ]==] function Family:getCanonicalName() local name = self._name if name == nil then name = self._data[1] self._name = name end return name end --[==[ Return the display form of the family. For families, this is usually the same as the value returned by {getCategoryName("nocap")}, i.e. it reads <code>"<var>name</var> languages"</code> (e.g. {"Indo-Iranian languages"}). For full and etymology-only languages, this is the same as the canonical name, and for scripts, it reads <code>"<var>name</var> script"</code> (e.g. {"Arabic script"}). The displayed text used in {makeCategoryLink()} is always the same as the display form. ]==] function Family:getDisplayForm() local name = self._data[1] if category_name_has_suffix(name, families_suffixes or get_families_suffixes()) then name = name .. " languages" end return name end function Family:getAliases() Family.getAliases = require(language_like_module).getAliases return self:getAliases() end function Family:getVarieties(flatten) Family.getVarieties = require(language_like_module).getVarieties return self:getVarieties(flatten) end function Family:getOtherNames() Family.getOtherNames = require(language_like_module).getOtherNames return self:getOtherNames() end function Family:getAllNames() Family.getAllNames = require(language_like_module).getAllNames return self:getAllNames() end --[==[ Return a list of the pseudo-families (if any) that a family belongs to. The returned value is a list of Family objects. Pseudo-families are groupings of languages that are not clades but share some geographic, ethnic or other characteristic (e.g. [[:Category:Papuan languages]], [[:Category:Jewish languages]]). ]==] function Family:getPseudoFamilies() Family.getPseudoFamilies = require(language_like_module).getPseudoFamilies return self:getPseudoFamilies() end --[==[Returns a table of types as a lookup table (with the types as keys). The possible types are * {family}: This object is a family. * {full}: This object is a "full" family. This includes all families but a couple of etymology-only families for Old and Middle Iranian languages. * {etymology-only}: This object is an etymology-only family, similar to etymology-only languages. There are currently only two such families, for Old Iranian languages and Middle Iranian languages (which do not represent proper clades and have no proto-languages, hence cannot be full families). ]==] function Family:getTypes() local types = self._types if types == nil then types = {family = true} if self:getFullCode() == self:getCode() then types.full = true else types["etymology-only"] = true end local rawtypes = self._data.type if rawtypes then for t in gmatch(rawtypes, "[^,]+") do types[t] = true end end self._types = types end return types end --[==[Given a list of types as strings, returns true if the family has all of them.]==] function Family:hasType(...) Family.hasType = require(language_like_module).hasType return self:hasType(...) end --[==[Returns a {Family} object for the superfamily that the family belongs to.]==] function Family:getFamily() if self._familyObject == nil then local familyCode = self:getFamilyCode() if familyCode then self._familyObject = get_by_code(familyCode) else self._familyObject = false end end return self._familyObject or nil end --[==[Returns the code of the family's superfamily.]==] function Family:getFamilyCode() if not self._familyCode then self._familyCode = self._data[3] end return self._familyCode end --[==[Returns the canonical name of the family's superfamily.]==] function Family:getFamilyName() if self._familyName == nil then local family = self:getFamily() if family then self._familyName = family:getCanonicalName() else self._familyName = false end end return self._familyName or nil end --[==[Check whether the family belongs to {superfamily} (which can be a family code or object), and returns a boolean. If more than one is given, returns {true} if the family belongs to any of them. A family is '''not''' considered to belong to itself.]==] function Family:inFamily(...) for _, superfamily in ipairs{...} do if type(superfamily) == "table" then superfamily = superfamily:getCode() end local family, code = self:getFamily() while family do code = family:getCode() if code == superfamily then return true end family = family:getFamily() -- If family is parent to itself, return false. if family and family:getCode() == code then return false end end return false end end function Family:getParent() if self._parentObject == nil then local parentCode = self:getParentCode() if parentCode then self._parentObject = get_lang(parentCode, nil, true, true) else self._parentObject = false end end return self._parentObject or nil end function Family:getParentCode() if not self._parentCode then self._parentCode = self._data.parent end return self._parentCode end function Family:getParentName() if self._parentName == nil then local parent = self:getParent() if parent then self._parentName = parent:getCanonicalName() else self._parentName = false end end return self._parentName or nil end function Family:getParentChain() if not self._parentChain then self._parentChain = {} local parent = self:getParent() while parent do insert(self._parentChain, parent) parent = parent:getParent() end end return self._parentChain end function Family:hasParent(...) --checkObject("family", nil, ...) for _, other_family in ipairs{...} do for _, parent in ipairs(self:getParentChain()) do if type(other_family) == "string" then if other_family == parent:getCode() then return true end else if other_family:getCode() == parent:getCode() then return true end end end end return false end --[==[ If the family is etymology-only, this iterates through its parents until a full family is found, and the corresponding object is returned. If the family is a full family, then it simply returns itself. ]==] function Family:getFull() if not self._fullObject then local fullCode = self:getFullCode() if fullCode ~= self:getCode() then self._fullObject = get_lang(fullCode, nil, nil, true) else self._fullObject = self end end return self._fullObject end --[==[ If the family is etymology-only, this iterates through its parents until a full family is found, and the corresponding code is returned. If the family is a full family, then it simply returns the family code. ]==] function Family:getFullCode() return self._fullCode or self:getCode() end --[==[ If the family is etymology-only, this iterates through its parents until a full family is found, and the corresponding canonical name is returned. If the family is a full family, then it simply returns the canonical name of the family. ]==] function Family:getFullName() if self._fullName == nil then local full = self:getFull() if full then self._fullName = full:getCanonicalName() else self._fullName = false end end return self._fullName or nil end --[==[ Return a {Language} object (see [[Module:languages]]) for the proto-language of this family, if one exists. Otherwise, return {nil}. ]==] function Family:getProtoLanguage() if self._protoLanguageObject == nil then self._protoLanguageObject = get_lang(self._data.protoLanguage or self:getCode() .. "-pro", nil, true) or false end return self._protoLanguageObject or nil end function Family:getProtoLanguageCode() if self._protoLanguageCode == nil then local protoLanguage = self:getProtoLanguage() self._protoLanguageCode = protoLanguage and protoLanguage:getCode() or false end return self._protoLanguageCode or nil end function Family:getProtoLanguageName() if not self._protoLanguageName then self._protoLanguageName = self:getProtoLanguage():getCanonicalName() end return self._protoLanguageName end function Family:hasAncestor(...) -- Go up the family tree until a protolanguage is found. local family = self local protolang = family:getProtoLanguage() while not protolang do family = family:getFamily() protolang = family:getProtoLanguage() -- Return false if the family is its own family, to avoid an infinite loop. if family:getFamilyCode() == family:getCode() then return false end end -- If the protolanguage is not in the family, it must therefore be ancestral to it. Check if it is a match. for _, otherlang in ipairs{...} do if ( type(otherlang) == "string" and protolang:getCode() == otherlang or type(otherlang) == "table" and protolang:getCode() == otherlang:getCode() ) and not protolang:inFamily(self) then return true end end -- If not, check the protolanguage's ancestry. return protolang:hasAncestor(...) end local function fetch_descendants(self, format) local languages = require("Module:languages/code to canonical name") local etymology_languages = require("Module:etymology languages/code to canonical name") local families = require("Module:families/code to canonical name") local descendants = {} -- Iterate over all three datasets. for _, data in ipairs{languages, etymology_languages, families} do for code in pairs(data) do local lang = get_lang(code, nil, true, true) if lang:inFamily(self) then if format == "object" then insert(descendants, lang) elseif format == "code" then insert(descendants, code) elseif format == "name" then insert(descendants, lang:getCanonicalName()) end end end end return descendants end function Family:getDescendants() if not self._descendantObjects then self._descendantObjects = fetch_descendants(self, "object") end return self._descendantObjects end function Family:getDescendantCodes() if not self._descendantCodes then self._descendantCodes = fetch_descendants(self, "code") end return self._descendantCodes end function Family:getDescendantNames() if not self._descendantNames then self._descendantNames = fetch_descendants(self, "name") end return self._descendantNames end function Family:hasDescendant(...) for _, lang in ipairs{...} do if type(lang) == "string" then lang = get_lang(lang, nil, true) end if lang:inFamily(self) then return true end end return false end --[==[ Return the name of the main category of that family. Example: {"Germanic languages"} for the Germanic languages, whose category is at [[:Category:Germanic languages]]. Unless optional argument `nocap` is given, the family name at the beginning of the returned value will be capitalized. This capitalization is correct for category names, but not if the family name is lowercase and the returned value of this function is used in the middle of a sentence. (For example, the pseudo-family with the code {qfa-mix} has the name {"mixed"}, which should remain lowercase when used as part of the category name [[:Category:Terms derived from mixed languages]] but should be capitalized in [[:Category:Mixed languages]].) If you are considering using {getCategoryName("nocap")}, use {getDisplayForm()} instead. ]==] function Family:getCategoryName(nocap) local name = self._data.categoryName or self:getDisplayForm() if not nocap then name = mw.getContentLanguage():ucfirst(name) end return name end function Family:makeCategoryLink() return "[[:Category:" .. self:getCategoryName() .. "|" .. self:getDisplayForm() .. "]]" end --[==[Returns the Wikidata item id for the family or <code>nil</code>. This corresponds to the the second field in the data modules.]==] function Family:getWikidataItem() Family.getWikidataItem = require(language_like_module).getWikidataItem return self:getWikidataItem() end --[==[ Returns the name of the Wikipedia article for the family. `project` specifies the language and project to retrieve the article from, defaulting to {"enwiki"} for the English Wikipedia. Normally if specified it should be the project code for a specific-language Wikipedia e.g. "zhwiki" for the Chinese Wikipedia, but it can be any project, including non-Wikipedia ones. If the project is the English Wikipedia and the property {wikipedia_article} is present in the data module it will be used first. In all other cases, a sitelink will be generated from {:getWikidataItem} (if set). The resulting value (or lack of value) is cached so that subsequent calls are fast. If no value could be determined, and `noCategoryFallback` is {false}, {:getCategoryName} is used as fallback; otherwise, {nil} is returned. Note that if `noCategoryFallback` is {nil} or omitted, it defaults to {false} if the project is the English Wikipedia, otherwise to {true}. In other words, under normal circumstances, if the English Wikipedia article couldn't be retrieved, the return value will fall back to a link to the family's category, but this won't normally happen for any other project. ]==] function Family:getWikipediaArticle(noCategoryFallback, project) Family.getWikipediaArticle = require(language_like_module).getWikipediaArticle return self:getWikipediaArticle(noCategoryFallback, project) end function Family:makeWikipediaLink() return "[[w:" .. self:getWikipediaArticle() .. "|" .. self:getCanonicalName() .. "]]" end --[==[Returns the name of the Wikimedia Commons category page for the family.]==] function Family:getCommonsCategory() Family.getCommonsCategory = require(language_like_module).getCommonsCategory return self:getCommonsCategory() end function Family:toJSON(opts) local ret = { canonicalName = self:getCanonicalName(), categoryName = self:getCategoryName("nocap"), code = self:getCode(), parent = self:getParentCode(), full = self:getFullCode(), family = self:getFamilyCode(), protoLanguage = self:getProtoLanguageCode(), aliases = self:getAliases(), varieties = self:getVarieties(), otherNames = self:getOtherNames(), type = keys_to_list(self:getTypes()), wikidataItem = self:getWikidataItem(), wikipediaArticle = self:getWikipediaArticle(true), } -- Use `deep_copy` when returning a table, so that there are no editing restrictions imposed by `mw.loadData`. return opts and opts.lua_table and deep_copy(ret) or to_json(ret, opts) end function Family:getData() return self._data end function export.makeObject(code, data) local data_type = type(data) if data_type ~= "table" then error(("bad argument #2 to 'makeObject' (table expected, got %s)"):format(data_type)) end return setmetatable({_data = data, _code = code, _fullCode = code}, Family) end make_object = export.makeObject --[==[ Finds the family whose code matches the one provided. If it exists, it returns a {Family} object representing the family. Otherwise, it returns {nil}.]==] function export.getByCode(code) local data = (families_data or get_families_data())[code] if data == nil then return nil elseif data.parent == nil then return make_object(code, data) end return make_lang_object(code, data) end get_by_code = export.getByCode --[==[ Look for the family whose canonical name (the name used to represent that family on Wiktionary) matches the one provided. If it exists, it returns a {Family} object representing the family. Otherwise, it returns {nil}. The canonical name of families should always be unique (it is an error for two families on Wiktionary to share the same canonical name), so this is guaranteed to give at most one result.]==] function export.getByCanonicalName(name) if name == nil then return nil end local code = (families_by_name or get_families_by_name())[name] if code == nil then return nil end return get_by_code(code) end --[==[ Look for the family whose category name (the name used in categories for that family) matches the one provided. If it exists, it returns a {Family} object representing the family. Otherwise, it returns {nil}. In almost all cases, the category name for a family is its canonical name plus the word "languages", e.g. "Indo-European" has the category name "Indo-European languages". Where a canonical name ends with "languages" or "lects", the category name is identical to the canonical name.]==] function export.getByCategoryName(name) if name == nil then return nil end local code = category_name_to_code( name, " languages", families_by_name or get_families_by_name(), families_suffixes or get_families_suffixes() ) if code == nil then return nil end return get_by_code(code) end return export fhlpo09ymhi7e748v1r3pkilvfhbwm5 238735 238734 2026-11-11T11:13:24Z Lee 19 පැරණි සංස්කරණයකින් ගත් කොටස්... 238735 Scribunto text/plain local export = {} local families_by_name_module = "Module:families/canonical names" local families_data_module = "Module:families/data" local json_module = "Module:JSON" local language_like_module = "Module:language-like" local languages_module = "Module:languages" local load_module = "Module:load" local table_module = "Module:table" local get_by_code -- Defined below. local gmatch = string.gmatch local insert = table.insert local ipairs = ipairs local make_object -- Defined below. local pairs = pairs local require = require local setmetatable = setmetatable local type = type --[==[ Loaders for functions in other modules, which overwrite themselves with the target function when called. This ensures modules are only loaded when needed, retains the speed/convenience of locally-declared pre-loaded functions, and has no overhead after the first call, since the target functions are called directly in any subsequent calls.]==] local function category_name_has_suffix(...) category_name_has_suffix = require(language_like_module).categoryNameHasSuffix return category_name_has_suffix(...) end local function category_name_to_code(...) category_name_to_code = require(language_like_module).categoryNameToCode return category_name_to_code(...) end local function deep_copy(...) deep_copy = require(table_module).deepCopy return deep_copy(...) end local function get_lang(...) get_lang = require(languages_module).getByCode return get_lang(...) end local function keys_to_list(...) keys_to_list = require(table_module).keysToList return keys_to_list(...) end local function load_data(...) load_data = require(load_module).load_data return load_data(...) end local function make_lang_object(...) make_lang_object = require(languages_module).makeObject return make_lang_object(...) end local function to_json(...) to_json = require(json_module).toJSON return to_json(...) end --[==[ Loaders for objects, which load data (or some other object) into some variable, which can then be accessed as "foo or get_foo()", where the function get_foo sets the object to "foo" and then returns it. This ensures they are only loaded when needed, and avoids the need to check for the existence of the object each time, since once "foo" has been set, "get_foo" will not be called again.]==] local families_by_name local function get_families_by_name() families_by_name, get_families_by_name = load_data(families_by_name_module), nil return families_by_name end local families_data local function get_families_data() families_data, get_families_data = load_data(families_data_module), nil return families_data end local families_suffixes local function get_families_suffixes() families_suffixes, get_families_suffixes = { "භාෂා", "lects" }, nil return families_suffixes end local Family = {} Family.__index = Family --[==[ Return the family code of the family, e.g. {"ine"} for the Indo-European languages. ]==] function Family:getCode() return self._code end --[==[ Return the canonical name of the family. This is the name used to represent that language family on Wiktionary, and is guaranteed to be unique to that family alone. Example: {"Indo-European"} for the Indo-European languages. ]==] function Family:getCanonicalName() local name = self._name if name == nil then name = self._data[1] self._name = name end return name end --[==[ Return the display form of the family. For families, this is usually the same as the value returned by {getCategoryName("nocap")}, i.e. it reads <code>"<var>name</var> languages"</code> (e.g. {"Indo-Iranian languages"}). For full and etymology-only languages, this is the same as the canonical name, and for scripts, it reads <code>"<var>name</var> script"</code> (e.g. {"Arabic script"}). The displayed text used in {makeCategoryLink()} is always the same as the display form. ]==] function Family:getDisplayForm() local name = self._data[1] if category_name_has_suffix(name, families_suffixes or get_families_suffixes()) then name = name .. " භාෂා" end return name end function Family:getAliases() Family.getAliases = require(language_like_module).getAliases return self:getAliases() end function Family:getVarieties(flatten) Family.getVarieties = require(language_like_module).getVarieties return self:getVarieties(flatten) end function Family:getOtherNames() Family.getOtherNames = require(language_like_module).getOtherNames return self:getOtherNames() end function Family:getAllNames() Family.getAllNames = require(language_like_module).getAllNames return self:getAllNames() end --[==[ Return a list of the pseudo-families (if any) that a family belongs to. The returned value is a list of Family objects. Pseudo-families are groupings of languages that are not clades but share some geographic, ethnic or other characteristic (e.g. [[:Category:Papuan languages]], [[:Category:Jewish languages]]). ]==] function Family:getPseudoFamilies() Family.getPseudoFamilies = require(language_like_module).getPseudoFamilies return self:getPseudoFamilies() end --[==[Returns a table of types as a lookup table (with the types as keys). The possible types are * {family}: This object is a family. * {full}: This object is a "full" family. This includes all families but a couple of etymology-only families for Old and Middle Iranian languages. * {etymology-only}: This object is an etymology-only family, similar to etymology-only languages. There are currently only two such families, for Old Iranian languages and Middle Iranian languages (which do not represent proper clades and have no proto-languages, hence cannot be full families). ]==] function Family:getTypes() local types = self._types if types == nil then types = {family = true} if self:getFullCode() == self:getCode() then types.full = true else types["etymology-only"] = true end local rawtypes = self._data.type if rawtypes then for t in gmatch(rawtypes, "[^,]+") do types[t] = true end end self._types = types end return types end --[==[Given a list of types as strings, returns true if the family has all of them.]==] function Family:hasType(...) Family.hasType = require(language_like_module).hasType return self:hasType(...) end --[==[Returns a {Family} object for the superfamily that the family belongs to.]==] function Family:getFamily() if self._familyObject == nil then local familyCode = self:getFamilyCode() if familyCode then self._familyObject = get_by_code(familyCode) else self._familyObject = false end end return self._familyObject or nil end --[==[Returns the code of the family's superfamily.]==] function Family:getFamilyCode() if not self._familyCode then self._familyCode = self._data[3] end return self._familyCode end --[==[Returns the canonical name of the family's superfamily.]==] function Family:getFamilyName() if self._familyName == nil then local family = self:getFamily() if family then self._familyName = family:getCanonicalName() else self._familyName = false end end return self._familyName or nil end --[==[Check whether the family belongs to {superfamily} (which can be a family code or object), and returns a boolean. If more than one is given, returns {true} if the family belongs to any of them. A family is '''not''' considered to belong to itself.]==] function Family:inFamily(...) for _, superfamily in ipairs{...} do if type(superfamily) == "table" then superfamily = superfamily:getCode() end local family, code = self:getFamily() while family do code = family:getCode() if code == superfamily then return true end family = family:getFamily() -- If family is parent to itself, return false. if family and family:getCode() == code then return false end end return false end end function Family:getParent() if self._parentObject == nil then local parentCode = self:getParentCode() if parentCode then self._parentObject = get_lang(parentCode, nil, true, true) else self._parentObject = false end end return self._parentObject or nil end function Family:getParentCode() if not self._parentCode then self._parentCode = self._data.parent end return self._parentCode end function Family:getParentName() if self._parentName == nil then local parent = self:getParent() if parent then self._parentName = parent:getCanonicalName() else self._parentName = false end end return self._parentName or nil end function Family:getParentChain() if not self._parentChain then self._parentChain = {} local parent = self:getParent() while parent do insert(self._parentChain, parent) parent = parent:getParent() end end return self._parentChain end function Family:hasParent(...) --checkObject("family", nil, ...) for _, other_family in ipairs{...} do for _, parent in ipairs(self:getParentChain()) do if type(other_family) == "string" then if other_family == parent:getCode() then return true end else if other_family:getCode() == parent:getCode() then return true end end end end return false end --[==[ If the family is etymology-only, this iterates through its parents until a full family is found, and the corresponding object is returned. If the family is a full family, then it simply returns itself. ]==] function Family:getFull() if not self._fullObject then local fullCode = self:getFullCode() if fullCode ~= self:getCode() then self._fullObject = get_lang(fullCode, nil, nil, true) else self._fullObject = self end end return self._fullObject end --[==[ If the family is etymology-only, this iterates through its parents until a full family is found, and the corresponding code is returned. If the family is a full family, then it simply returns the family code. ]==] function Family:getFullCode() return self._fullCode or self:getCode() end --[==[ If the family is etymology-only, this iterates through its parents until a full family is found, and the corresponding canonical name is returned. If the family is a full family, then it simply returns the canonical name of the family. ]==] function Family:getFullName() if self._fullName == nil then local full = self:getFull() if full then self._fullName = full:getCanonicalName() else self._fullName = false end end return self._fullName or nil end --[==[ Return a {Language} object (see [[Module:languages]]) for the proto-language of this family, if one exists. Otherwise, return {nil}. ]==] function Family:getProtoLanguage() if self._protoLanguageObject == nil then self._protoLanguageObject = get_lang(self._data.protoLanguage or self:getCode() .. "-pro", nil, true) or false end return self._protoLanguageObject or nil end function Family:getProtoLanguageCode() if self._protoLanguageCode == nil then local protoLanguage = self:getProtoLanguage() self._protoLanguageCode = protoLanguage and protoLanguage:getCode() or false end return self._protoLanguageCode or nil end function Family:getProtoLanguageName() if not self._protoLanguageName then self._protoLanguageName = self:getProtoLanguage():getCanonicalName() end return self._protoLanguageName end function Family:hasAncestor(...) -- Go up the family tree until a protolanguage is found. local family = self local protolang = family:getProtoLanguage() while not protolang do family = family:getFamily() protolang = family:getProtoLanguage() -- Return false if the family is its own family, to avoid an infinite loop. if family:getFamilyCode() == family:getCode() then return false end end -- If the protolanguage is not in the family, it must therefore be ancestral to it. Check if it is a match. for _, otherlang in ipairs{...} do if ( type(otherlang) == "string" and protolang:getCode() == otherlang or type(otherlang) == "table" and protolang:getCode() == otherlang:getCode() ) and not protolang:inFamily(self) then return true end end -- If not, check the protolanguage's ancestry. return protolang:hasAncestor(...) end local function fetch_descendants(self, format) local languages = require("Module:languages/code to canonical name") local etymology_languages = require("Module:etymology languages/code to canonical name") local families = require("Module:families/code to canonical name") local descendants = {} -- Iterate over all three datasets. for _, data in ipairs{languages, etymology_languages, families} do for code in pairs(data) do local lang = get_lang(code, nil, true, true) if lang:inFamily(self) then if format == "object" then insert(descendants, lang) elseif format == "code" then insert(descendants, code) elseif format == "name" then insert(descendants, lang:getCanonicalName()) end end end end return descendants end function Family:getDescendants() if not self._descendantObjects then self._descendantObjects = fetch_descendants(self, "object") end return self._descendantObjects end function Family:getDescendantCodes() if not self._descendantCodes then self._descendantCodes = fetch_descendants(self, "code") end return self._descendantCodes end function Family:getDescendantNames() if not self._descendantNames then self._descendantNames = fetch_descendants(self, "name") end return self._descendantNames end function Family:hasDescendant(...) for _, lang in ipairs{...} do if type(lang) == "string" then lang = get_lang(lang, nil, true) end if lang:inFamily(self) then return true end end return false end --[==[ Return the name of the main category of that family. Example: {"Germanic languages"} for the Germanic languages, whose category is at [[:Category:Germanic languages]]. Unless optional argument `nocap` is given, the family name at the beginning of the returned value will be capitalized. This capitalization is correct for category names, but not if the family name is lowercase and the returned value of this function is used in the middle of a sentence. (For example, the pseudo-family with the code {qfa-mix} has the name {"mixed"}, which should remain lowercase when used as part of the category name [[:Category:Terms derived from mixed languages]] but should be capitalized in [[:Category:Mixed languages]].) If you are considering using {getCategoryName("nocap")}, use {getDisplayForm()} instead. ]==] function Family:getCategoryName(nocap) local name = self._data.categoryName or self:getDisplayForm() if not nocap then name = mw.getContentLanguage():ucfirst(name) end return name end function Family:makeCategoryLink() return "[[:ප්‍රවර්ගය:" .. self:getCategoryName() .. "|" .. self:getDisplayForm() .. "]]" end --[==[Returns the Wikidata item id for the family or <code>nil</code>. This corresponds to the the second field in the data modules.]==] function Family:getWikidataItem() Family.getWikidataItem = require(language_like_module).getWikidataItem return self:getWikidataItem() end --[==[ Returns the name of the Wikipedia article for the family. `project` specifies the language and project to retrieve the article from, defaulting to {"enwiki"} for the English Wikipedia. Normally if specified it should be the project code for a specific-language Wikipedia e.g. "zhwiki" for the Chinese Wikipedia, but it can be any project, including non-Wikipedia ones. If the project is the English Wikipedia and the property {wikipedia_article} is present in the data module it will be used first. In all other cases, a sitelink will be generated from {:getWikidataItem} (if set). The resulting value (or lack of value) is cached so that subsequent calls are fast. If no value could be determined, and `noCategoryFallback` is {false}, {:getCategoryName} is used as fallback; otherwise, {nil} is returned. Note that if `noCategoryFallback` is {nil} or omitted, it defaults to {false} if the project is the English Wikipedia, otherwise to {true}. In other words, under normal circumstances, if the English Wikipedia article couldn't be retrieved, the return value will fall back to a link to the family's category, but this won't normally happen for any other project. ]==] function Family:getWikipediaArticle(noCategoryFallback, project) Family.getWikipediaArticle = require(language_like_module).getWikipediaArticle return self:getWikipediaArticle(noCategoryFallback, project) end function Family:makeWikipediaLink() return "[[w:" .. self:getWikipediaArticle() .. "|" .. self:getCanonicalName() .. "]]" end --[==[Returns the name of the Wikimedia Commons category page for the family.]==] function Family:getCommonsCategory() Family.getCommonsCategory = require(language_like_module).getCommonsCategory return self:getCommonsCategory() end function Family:toJSON(opts) local ret = { canonicalName = self:getCanonicalName(), categoryName = self:getCategoryName("nocap"), code = self:getCode(), parent = self:getParentCode(), full = self:getFullCode(), family = self:getFamilyCode(), protoLanguage = self:getProtoLanguageCode(), aliases = self:getAliases(), varieties = self:getVarieties(), otherNames = self:getOtherNames(), type = keys_to_list(self:getTypes()), wikidataItem = self:getWikidataItem(), wikipediaArticle = self:getWikipediaArticle(true), } -- Use `deep_copy` when returning a table, so that there are no editing restrictions imposed by `mw.loadData`. return opts and opts.lua_table and deep_copy(ret) or to_json(ret, opts) end function Family:getData() return self._data end function export.makeObject(code, data) local data_type = type(data) if data_type ~= "table" then error(("bad argument #2 to 'makeObject' (table expected, got %s)"):format(data_type)) end return setmetatable({_data = data, _code = code, _fullCode = code}, Family) end make_object = export.makeObject --[==[ Finds the family whose code matches the one provided. If it exists, it returns a {Family} object representing the family. Otherwise, it returns {nil}.]==] function export.getByCode(code) local data = (families_data or get_families_data())[code] if data == nil then return nil elseif data.parent == nil then return make_object(code, data) end return make_lang_object(code, data) end get_by_code = export.getByCode --[==[ Look for the family whose canonical name (the name used to represent that family on Wiktionary) matches the one provided. If it exists, it returns a {Family} object representing the family. Otherwise, it returns {nil}. The canonical name of families should always be unique (it is an error for two families on Wiktionary to share the same canonical name), so this is guaranteed to give at most one result.]==] function export.getByCanonicalName(name) if name == nil then return nil end local code = (families_by_name or get_families_by_name())[name] if code == nil then return nil end return get_by_code(code) end --[==[ Look for the family whose category name (the name used in categories for that family) matches the one provided. If it exists, it returns a {Family} object representing the family. Otherwise, it returns {nil}. In almost all cases, the category name for a family is its canonical name plus the word "languages", e.g. "Indo-European" has the category name "Indo-European languages". Where a canonical name ends with "languages" or "lects", the category name is identical to the canonical name.]==] function export.getByCategoryName(name) if name == nil then return nil end local code = category_name_to_code( name, " භාෂා", families_by_name or get_families_by_name(), families_suffixes or get_families_suffixes() ) if code == nil then return nil end return get_by_code(code) end return export bk2he4l7im2tpzcc5qyb6mqla2yi3uf Module:language-like 828 6242 238736 200903 2026-09-22T22:05:22Z en>Benwing2 0 if the parent or family is itself is pseudo-family, insert it; don't do this on `self` so we don't get [[Category:Sign languages]] in itself as a category 238736 Scribunto text/plain local export = {} local families_module = "Module:families" local string_utilities_module = "Module:string utilities" local table_module = "Module:table" -- In a locally installed Docker container containing Wiktionary, Wikibase is typically not installed because it's -- a real pain to get working properly. In such a case, `mw.wikibase` returns nil. We now have checks in the code -- below so it does reasonable things in the absence of Wikibase. local wikibase = mw.wikibase local category_name_has_suffix -- defined as export.categoryNameHasSuffix below local get_entity = wikibase and wikibase.getEntity or nil local get_entity_id_for_title = wikibase and wikibase.getEntityIdForTitle or nil local gsub = string.gsub local ipairs = ipairs local match = string.match local select = select local sitelink = wikibase and wikibase.sitelink or nil local type = type local umatch = mw.ustring.match --[==[ Loaders for functions in other modules, which overwrite themselves with the target function when called. This ensures modules are only loaded when needed, retains the speed/convenience of locally-declared pre-loaded functions, and has no overhead after the first call, since the target functions are called directly in any subsequent calls.]==] local function case_insensitive_pattern(...) case_insensitive_pattern = require(string_utilities_module).case_insensitive_pattern return case_insensitive_pattern(...) end local function table_flatten(...) table_flatten = require(table_module).flatten return table_flatten(...) end --[==[ Loaders for objects, which load data (or some other object) into some variable, which can then be accessed as "foo or get_foo()", where the function get_foo sets the object to "foo" and then returns it. This ensures they are only loaded when needed, and avoids the need to check for the existence of the object each time, since once "foo" has been set, "get_foo" will not be called again.]==] local content_lang local function get_content_lang() content_lang, get_content_lang = mw.getContentLanguage(), nil return content_lang end -- Implementation of getAliases() for languages, etymology languages, -- families, scripts and writing systems. function export.getAliases(self) local aliases = self._aliases if aliases == nil then aliases = (self._data or self).aliases or {} self._aliases = aliases end return aliases end -- Implementation of getVarieties() for languages, etymology languages, -- families, scripts and writing systems. If `flatten` is passed in, -- flatten down to a list of strings; otherwise, keep the structure. function export.getVarieties(self, flatten) local varieties = self._varieties if varieties == nil then varieties = (self._data or self).varieties or {} self._varieties = varieties end if not flatten then return varieties end local flattened_varieties = self._flattened_varieties if flattened_varieties == nil then flattened_varieties = table_flatten(varieties) self._flattened_varieties = flattened_varieties end return flattened_varieties end -- Implementation of getOtherNames() for languages, etymology languages, -- families, scripts and writing systems. function export.getOtherNames(self) local other_names = self._other_names if other_names == nil then other_names = (self._data or self).other_names or {} self._other_names = other_names end return other_names end -- Implementation of getAllNames() for languages, etymology languages, -- families, scripts and writing systems. function export.getAllNames(self) local all_names = self._allNames if all_names == nil then all_names = table_flatten{ self.getCanonicalNames and self:getCanonicalNames() or self:getCanonicalName(), self:getAliases(), self:getVarieties(), self:getOtherNames(), } self._allNames = all_names end return all_names end function export.hasType(self, ...) local n = select("#", ...) if n == 0 then error("Must specify at least one type.") end local types = self:getTypes() if not types[...] then return false elseif n == 1 then return true end local args = {...} for i = 2, n do if not types[args[i]] then return false end end return true end -- Implementation of template-callable getByCode() function for languages, -- etymology languages, families and scripts. `item` is the language, -- family or script in question; `args` is the arguments passed in by the -- module invocation; `extra_processing`, if specified, is a function of -- one argument (the requested property) and should return the value to -- be returned to the caller, or nil if the property isn't recognized. -- `extra_processing` is called after special-cased properties are handled -- and before general-purpose processing code that works for all string -- properties. function export.templateGetByCode(args, extra_processing) -- The item that the caller wanted to look up. local item, itemname, list = args[1], args[2] if itemname == "getAllNames" then list = item:getAllNames() elseif itemname == "getOtherNames" then list = item:getOtherNames() elseif itemname == "getAliases" then list = item:getAliases() elseif itemname == "getVarieties" then list = item:getVarieties(true) end if list then local index = args[3]; if index == "" then index = nil end index = tonumber(index or error("Numeric index of the desired item in the list (parameter 3) has not been specified.")) return list[index] or "" end if itemname == "getFamily" and item.getFamily then return item:getFamily():getCode() end if extra_processing then local retval = extra_processing(itemname) if retval then return retval end end if item[itemname] then local ret = item[itemname](item) if type(ret) == "string" then return ret end error("The function \"" .. itemname .. "\" did not return a string value.") end error("Requested invalid item name \"" .. itemname .. "\".") end -- Implementation of getCommonsCategory() for languages, etymology languages, -- families, scripts and writing systems. function export.getWikidataItem(self) local item = self._WikidataItem if item == nil then item = (self._data or self)[2] -- If the value is nil, it's cached as false. item = item ~= nil and (type(item) == "number" and "Q" .. item or item) or false self._WikidataItem = item end return item or nil end do local function get_wiki_article(self, project) local article -- If the project is enwiki, check the language data. if project == "enwiki" then article = (self._data or self).wikipedia_article if article then return article end end -- Otherwise, check the Wikidata item for a sitelink. local item = self:getWikidataItem() article = item and sitelink and sitelink(item, project) or false if article then return article end -- If there's still no article, try the parent (if any). local get_parent = self.getParent if get_parent then local parent = get_parent(self) if parent then return get_wiki_article(parent, project) end end return false end -- Implementation of getWikipediaArticle() for languages, etymology languages, -- families, scripts and writing systems. function export.getWikipediaArticle(self, noCategoryFallback, project) if project == nil then project = "enwiki" end local article if project == "enwiki" then article = self._wikipedia_article if article == nil then article = get_wiki_article(self, project) self._wikipedia_article = article end else -- If the project isn't enwiki, default to no category fallback, but -- this can be overridden by specifying the value `false`. if noCategoryFallback == nil then noCategoryFallback = true end local non_en_wikipedia_articles = self._non_en_wikipedia_articles if non_en_wikipedia_articles == nil then non_en_wikipedia_articles = {} self._non_en_wikipedia_articles = non_en_wikipedia_articles else article = non_en_wikipedia_articles[project] end if article == nil then article = get_wiki_article(self, project) non_en_wikipedia_articles[project] = article end end if article or noCategoryFallback then return article or nil end return (gsub(self:getCategoryName(), "Creole language", "Creole")) end end do local function get_commons_cat_claim(item) if item then local entity = get_entity and get_entity(item) or nil if entity then -- P373 is the "Commons category" property. local claim = entity:getBestStatements("P373")[1] return claim and ("Category:" .. claim.mainsnak.datavalue.value) or nil end end end local function get_commons_cat_sitelink(item) if item then local commons_sitelink = sitelink and sitelink(item, "commonswiki") or nil -- Reject any sitelinks that aren't categories. return commons_sitelink and match(commons_sitelink, "^Category:") and commons_sitelink or nil end end local function get_commons_cat(self) -- Checks are in decreasing order of likelihood for a useful match. -- Get the Commons Category claim from the object's item. local lang_item = self:getWikidataItem() local category = get_commons_cat_claim(lang_item) if category then return category end -- Otherwise, try the object's category's item. local langcat_item = get_entity_id_for_title and get_entity_id_for_title("Category:" .. self:getCategoryName()) or nil category = get_commons_cat_claim(langcat_item) if category then return category end -- If there's no P373 claim, there might be a sitelink on the -- object's category's item. category = get_commons_cat_sitelink(langcat_item) if category then return category end -- Otherwise, try for a sitelink on the object's own item. category = get_commons_cat_sitelink(lang_item) if category then return category end -- If there's still no category, try the parent (if any). local get_parent = self.getParent if get_parent then local parent = get_parent(self) if parent then return get_commons_cat(parent) end end return false end -- Implementation of getCommonsCategory() for languages, etymology -- languages, families, scripts and writing systems. function export.getCommonsCategory(self) local category category = self._commons_category -- Nil values cached as false. if category ~= nil then return category or nil end category = get_commons_cat(self) self._commons_category = category return category or nil end end function export.categoryNameHasSuffix(name, suffixes) for _, suffix in ipairs(suffixes) do if umatch(name, "%f[%w]" .. case_insensitive_pattern(suffix, "^.") .. "$") then return false end end return true end category_name_has_suffix = export.categoryNameHasSuffix function export.categoryNameToCode(name, suffix, data, suffixes) local truncated = match(name, "(.*)" .. suffix .. "$") if truncated and category_name_has_suffix(truncated, suffixes) then local code = data[truncated] if code ~= nil then return code, truncated end truncated = (content_lang or get_content_lang()):lcfirst(truncated) code = data[truncated] if code ~= nil then return code, truncated end end if not category_name_has_suffix(name, suffixes) then local code = data[name] if code ~= nil then return code, name end name = (content_lang or get_content_lang()):lcfirst(name) code = data[name] if code ~= nil then return code, name end end return nil, nil end -- If a language has no specified pseudo-family but its or its family's code begins with one or these prefixes, -- assign it to the specified pseudo-family. Note that we don't do this across-the-board because there are (currently) -- some families whose code begins with `nai-` but are considered in the `cai` pseudo-family. local pseudo_family_prefixes = { cai = true, nai = true, paa = true, sai = true, sgn = true, } -- Implementation of getPseudoFamilies() for languages, etymology languages -- and families. function export.getPseudoFamilies(self) local pseudo_families = self._pseudo_families local function insert_pseudo_family(code) local fam = require(families_module).getByCode(code) if not fam then mw.log(("WARNING: Unrecognized pseudo-family code '%s'"):format(code)) else table.insert(pseudo_families, fam) end end if pseudo_families == nil then pseudo_families = {} local pseudo_family_string = (self._data or self).pseudo_families if pseudo_family_string then local pseudo_family_codes = require(string_utilities_module).split(pseudo_family_string, "%s*,%s*") for _, code in ipairs(pseudo_family_codes) do insert_pseudo_family(code) end end if not pseudo_families[1] then -- Check the parent. If it's a full language, we will have to fetch the extra data to get the -- list of pseudo-families. local get_parent = self.getParent if get_parent then local parent = get_parent(self) if parent then local parent_code = parent:getCode() if pseudo_family_prefixes[parent_code] then insert_pseudo_family(parent_code) else pseudo_families = parent:getPseudoFamilies() end end end end if not pseudo_families[1] then -- Check the family to see if it's in any pseudo-families. local get_family = self.getFamily if get_family then local family = get_family(self) if family then local family_code = family:getCode() if pseudo_family_prefixes[family_code] then insert_pseudo_family(family_code) elseif family_code ~= self:getCode() then -- qfa-not has itself as a family. pseudo_families = family:getPseudoFamilies() end end end end if not pseudo_families[1] then local prefix = self:getCode():match("^([a-z][a-z][a-z])%-") if prefix and pseudo_family_prefixes[prefix] then insert_pseudo_family(prefix) end end self._pseudo_families = pseudo_families end return pseudo_families end return export sc8z3bbnk6oc9a4zd42q6we7t7b9pla 238737 238736 2026-11-11T11:14:58Z Lee 19 [[:en:Module:language-like]] වෙතින් එක් සංශෝධනයක් 238736 Scribunto text/plain local export = {} local families_module = "Module:families" local string_utilities_module = "Module:string utilities" local table_module = "Module:table" -- In a locally installed Docker container containing Wiktionary, Wikibase is typically not installed because it's -- a real pain to get working properly. In such a case, `mw.wikibase` returns nil. We now have checks in the code -- below so it does reasonable things in the absence of Wikibase. local wikibase = mw.wikibase local category_name_has_suffix -- defined as export.categoryNameHasSuffix below local get_entity = wikibase and wikibase.getEntity or nil local get_entity_id_for_title = wikibase and wikibase.getEntityIdForTitle or nil local gsub = string.gsub local ipairs = ipairs local match = string.match local select = select local sitelink = wikibase and wikibase.sitelink or nil local type = type local umatch = mw.ustring.match --[==[ Loaders for functions in other modules, which overwrite themselves with the target function when called. This ensures modules are only loaded when needed, retains the speed/convenience of locally-declared pre-loaded functions, and has no overhead after the first call, since the target functions are called directly in any subsequent calls.]==] local function case_insensitive_pattern(...) case_insensitive_pattern = require(string_utilities_module).case_insensitive_pattern return case_insensitive_pattern(...) end local function table_flatten(...) table_flatten = require(table_module).flatten return table_flatten(...) end --[==[ Loaders for objects, which load data (or some other object) into some variable, which can then be accessed as "foo or get_foo()", where the function get_foo sets the object to "foo" and then returns it. This ensures they are only loaded when needed, and avoids the need to check for the existence of the object each time, since once "foo" has been set, "get_foo" will not be called again.]==] local content_lang local function get_content_lang() content_lang, get_content_lang = mw.getContentLanguage(), nil return content_lang end -- Implementation of getAliases() for languages, etymology languages, -- families, scripts and writing systems. function export.getAliases(self) local aliases = self._aliases if aliases == nil then aliases = (self._data or self).aliases or {} self._aliases = aliases end return aliases end -- Implementation of getVarieties() for languages, etymology languages, -- families, scripts and writing systems. If `flatten` is passed in, -- flatten down to a list of strings; otherwise, keep the structure. function export.getVarieties(self, flatten) local varieties = self._varieties if varieties == nil then varieties = (self._data or self).varieties or {} self._varieties = varieties end if not flatten then return varieties end local flattened_varieties = self._flattened_varieties if flattened_varieties == nil then flattened_varieties = table_flatten(varieties) self._flattened_varieties = flattened_varieties end return flattened_varieties end -- Implementation of getOtherNames() for languages, etymology languages, -- families, scripts and writing systems. function export.getOtherNames(self) local other_names = self._other_names if other_names == nil then other_names = (self._data or self).other_names or {} self._other_names = other_names end return other_names end -- Implementation of getAllNames() for languages, etymology languages, -- families, scripts and writing systems. function export.getAllNames(self) local all_names = self._allNames if all_names == nil then all_names = table_flatten{ self.getCanonicalNames and self:getCanonicalNames() or self:getCanonicalName(), self:getAliases(), self:getVarieties(), self:getOtherNames(), } self._allNames = all_names end return all_names end function export.hasType(self, ...) local n = select("#", ...) if n == 0 then error("Must specify at least one type.") end local types = self:getTypes() if not types[...] then return false elseif n == 1 then return true end local args = {...} for i = 2, n do if not types[args[i]] then return false end end return true end -- Implementation of template-callable getByCode() function for languages, -- etymology languages, families and scripts. `item` is the language, -- family or script in question; `args` is the arguments passed in by the -- module invocation; `extra_processing`, if specified, is a function of -- one argument (the requested property) and should return the value to -- be returned to the caller, or nil if the property isn't recognized. -- `extra_processing` is called after special-cased properties are handled -- and before general-purpose processing code that works for all string -- properties. function export.templateGetByCode(args, extra_processing) -- The item that the caller wanted to look up. local item, itemname, list = args[1], args[2] if itemname == "getAllNames" then list = item:getAllNames() elseif itemname == "getOtherNames" then list = item:getOtherNames() elseif itemname == "getAliases" then list = item:getAliases() elseif itemname == "getVarieties" then list = item:getVarieties(true) end if list then local index = args[3]; if index == "" then index = nil end index = tonumber(index or error("Numeric index of the desired item in the list (parameter 3) has not been specified.")) return list[index] or "" end if itemname == "getFamily" and item.getFamily then return item:getFamily():getCode() end if extra_processing then local retval = extra_processing(itemname) if retval then return retval end end if item[itemname] then local ret = item[itemname](item) if type(ret) == "string" then return ret end error("The function \"" .. itemname .. "\" did not return a string value.") end error("Requested invalid item name \"" .. itemname .. "\".") end -- Implementation of getCommonsCategory() for languages, etymology languages, -- families, scripts and writing systems. function export.getWikidataItem(self) local item = self._WikidataItem if item == nil then item = (self._data or self)[2] -- If the value is nil, it's cached as false. item = item ~= nil and (type(item) == "number" and "Q" .. item or item) or false self._WikidataItem = item end return item or nil end do local function get_wiki_article(self, project) local article -- If the project is enwiki, check the language data. if project == "enwiki" then article = (self._data or self).wikipedia_article if article then return article end end -- Otherwise, check the Wikidata item for a sitelink. local item = self:getWikidataItem() article = item and sitelink and sitelink(item, project) or false if article then return article end -- If there's still no article, try the parent (if any). local get_parent = self.getParent if get_parent then local parent = get_parent(self) if parent then return get_wiki_article(parent, project) end end return false end -- Implementation of getWikipediaArticle() for languages, etymology languages, -- families, scripts and writing systems. function export.getWikipediaArticle(self, noCategoryFallback, project) if project == nil then project = "enwiki" end local article if project == "enwiki" then article = self._wikipedia_article if article == nil then article = get_wiki_article(self, project) self._wikipedia_article = article end else -- If the project isn't enwiki, default to no category fallback, but -- this can be overridden by specifying the value `false`. if noCategoryFallback == nil then noCategoryFallback = true end local non_en_wikipedia_articles = self._non_en_wikipedia_articles if non_en_wikipedia_articles == nil then non_en_wikipedia_articles = {} self._non_en_wikipedia_articles = non_en_wikipedia_articles else article = non_en_wikipedia_articles[project] end if article == nil then article = get_wiki_article(self, project) non_en_wikipedia_articles[project] = article end end if article or noCategoryFallback then return article or nil end return (gsub(self:getCategoryName(), "Creole language", "Creole")) end end do local function get_commons_cat_claim(item) if item then local entity = get_entity and get_entity(item) or nil if entity then -- P373 is the "Commons category" property. local claim = entity:getBestStatements("P373")[1] return claim and ("Category:" .. claim.mainsnak.datavalue.value) or nil end end end local function get_commons_cat_sitelink(item) if item then local commons_sitelink = sitelink and sitelink(item, "commonswiki") or nil -- Reject any sitelinks that aren't categories. return commons_sitelink and match(commons_sitelink, "^Category:") and commons_sitelink or nil end end local function get_commons_cat(self) -- Checks are in decreasing order of likelihood for a useful match. -- Get the Commons Category claim from the object's item. local lang_item = self:getWikidataItem() local category = get_commons_cat_claim(lang_item) if category then return category end -- Otherwise, try the object's category's item. local langcat_item = get_entity_id_for_title and get_entity_id_for_title("Category:" .. self:getCategoryName()) or nil category = get_commons_cat_claim(langcat_item) if category then return category end -- If there's no P373 claim, there might be a sitelink on the -- object's category's item. category = get_commons_cat_sitelink(langcat_item) if category then return category end -- Otherwise, try for a sitelink on the object's own item. category = get_commons_cat_sitelink(lang_item) if category then return category end -- If there's still no category, try the parent (if any). local get_parent = self.getParent if get_parent then local parent = get_parent(self) if parent then return get_commons_cat(parent) end end return false end -- Implementation of getCommonsCategory() for languages, etymology -- languages, families, scripts and writing systems. function export.getCommonsCategory(self) local category category = self._commons_category -- Nil values cached as false. if category ~= nil then return category or nil end category = get_commons_cat(self) self._commons_category = category return category or nil end end function export.categoryNameHasSuffix(name, suffixes) for _, suffix in ipairs(suffixes) do if umatch(name, "%f[%w]" .. case_insensitive_pattern(suffix, "^.") .. "$") then return false end end return true end category_name_has_suffix = export.categoryNameHasSuffix function export.categoryNameToCode(name, suffix, data, suffixes) local truncated = match(name, "(.*)" .. suffix .. "$") if truncated and category_name_has_suffix(truncated, suffixes) then local code = data[truncated] if code ~= nil then return code, truncated end truncated = (content_lang or get_content_lang()):lcfirst(truncated) code = data[truncated] if code ~= nil then return code, truncated end end if not category_name_has_suffix(name, suffixes) then local code = data[name] if code ~= nil then return code, name end name = (content_lang or get_content_lang()):lcfirst(name) code = data[name] if code ~= nil then return code, name end end return nil, nil end -- If a language has no specified pseudo-family but its or its family's code begins with one or these prefixes, -- assign it to the specified pseudo-family. Note that we don't do this across-the-board because there are (currently) -- some families whose code begins with `nai-` but are considered in the `cai` pseudo-family. local pseudo_family_prefixes = { cai = true, nai = true, paa = true, sai = true, sgn = true, } -- Implementation of getPseudoFamilies() for languages, etymology languages -- and families. function export.getPseudoFamilies(self) local pseudo_families = self._pseudo_families local function insert_pseudo_family(code) local fam = require(families_module).getByCode(code) if not fam then mw.log(("WARNING: Unrecognized pseudo-family code '%s'"):format(code)) else table.insert(pseudo_families, fam) end end if pseudo_families == nil then pseudo_families = {} local pseudo_family_string = (self._data or self).pseudo_families if pseudo_family_string then local pseudo_family_codes = require(string_utilities_module).split(pseudo_family_string, "%s*,%s*") for _, code in ipairs(pseudo_family_codes) do insert_pseudo_family(code) end end if not pseudo_families[1] then -- Check the parent. If it's a full language, we will have to fetch the extra data to get the -- list of pseudo-families. local get_parent = self.getParent if get_parent then local parent = get_parent(self) if parent then local parent_code = parent:getCode() if pseudo_family_prefixes[parent_code] then insert_pseudo_family(parent_code) else pseudo_families = parent:getPseudoFamilies() end end end end if not pseudo_families[1] then -- Check the family to see if it's in any pseudo-families. local get_family = self.getFamily if get_family then local family = get_family(self) if family then local family_code = family:getCode() if pseudo_family_prefixes[family_code] then insert_pseudo_family(family_code) elseif family_code ~= self:getCode() then -- qfa-not has itself as a family. pseudo_families = family:getPseudoFamilies() end end end end if not pseudo_families[1] then local prefix = self:getCode():match("^([a-z][a-z][a-z])%-") if prefix and pseudo_family_prefixes[prefix] then insert_pseudo_family(prefix) end end self._pseudo_families = pseudo_families end return pseudo_families end return export sc8z3bbnk6oc9a4zd42q6we7t7b9pla සැකිල්ල:cite-meta/documentation 10 7092 238705 26464 2023-02-21T22:12:49Z en>ExcarnateSojourner 0 Add [[Template:cite-thesis]] to the list. 238705 wikitext text/x-wiki {{documentation subpage}} {{mbox|type=speedy|text='''Do not use this template directly.''' <p>This template is only for use in conjunction with {{temp|cite-av}}, {{temp|cite-book}}, {{temp|cite-journal}}, {{temp|cite-newsgroup}}, {{temp|cite-song}}, {{temp|cite-thesis}}, {{temp|cite-video game}}, and {{temp|cite-web}}.</p>}}<includeonly> [[Category:Citation templates]] </includeonly> j7t5v3yanj3pespagu717jfgd2e4hcj 238706 167385 2026-11-11T03:33:31Z Lee 19 [[:en:Template:cite-meta/documentation]] වෙතින් එක් සංශෝධනයක් 167385 wikitext text/x-wiki {{documentation subpage}} {{mbox|type=speedy|text='''Do not use this template directly.''' <p>This template is only for use in conjunction with {{temp|cite-av}}, {{temp|cite-book}}, {{temp|cite-journal}}, {{temp|cite-newsgroup}}, {{temp|cite-song}}, {{temp|cite-video game}}, and {{temp|cite-web}}.</p>}}<includeonly> [[ප්‍රවර්ගය:උපහරණ සැකිලි]] </includeonly> ji2knab30oz3ri5vgb5o0sv0k84xc7n සැකිල්ල:cite-meta 10 7093 238703 26466 2026-04-18T01:03:19Z en>沈澄心 0 +HDL 238703 wikitext text/x-wiki <includeonly>{{#if:{{{author|}}}{{{last|}}} | {{#if:{{{authorlink|}}} | [[w:{{{authorlink}}}|{{#if:{{{author|}}} | {{{author}}} | {{#if:{{{last|}}} | {{{last}}}{{#if:{{{first|}}}|, {{{first}}}}} }} }}]] | {{#if:{{{author|}}} | {{{author}}} | {{#if:{{{last|}}} | {{{last}}}{{#if:{{{first|}}}|, {{{first}}}}} }} }} }}{{#if:{{{author2|}}}{{{last2|}}} | {{#if:{{{authorlink2|}}} |&#59;<!--semicolon--> [[w:{{{authorlink2}}}|{{#if:{{{author2|}}} | {{{author2}}} | {{#if:{{{last2|}}} | {{{last2}}}{{#if:{{{first2|}}}|, {{{first2}}}}} }} }}]] |&#59; {{#if:{{{author2|}}} | {{{author2}}} | {{#if:{{{last2|}}} | {{{last2}}}{{#if:{{{first2|}}}|, {{{first2}}}}} }} }} }} }}{{#if:{{{author3|}}}{{{last3|}}} | {{#if:{{{authorlink3|}}} |&#59;<!--semicolon--> [[w:{{{authorlink3}}}|{{#if:{{{author3|}}} | {{{author3}}} | {{#if:{{{last3|}}} | {{{last3}}}{{#if:{{{first3|}}}|, {{{first3}}}}} }} }}]] |&#59; {{#if:{{{author3|}}} | {{{author3}}} | {{#if:{{{last3|}}} | {{{last3}}}{{#if:{{{first3|}}}|, {{{first3}}}}} }} }} }} }}{{#if:{{{author4|}}}{{{last4|}}} | {{#if:{{{authorlink4|}}} |&#59;<!--semicolon--> [[w:{{{authorlink4}}}|{{#if:{{{author4|}}} | {{{author4}}} | {{#if:{{{last4|}}} | {{{last4}}}{{#if:{{{first4|}}}|, {{{first4}}}}} }} }}]] |&#59; {{#if:{{{author4|}}} | {{{author4}}} | {{#if:{{{last4|}}} | {{{last4}}}{{#if:{{{first4|}}}|, {{{first4}}}}} }} }} }} }}{{#if:{{{author5|}}}{{{last5|}}} | {{#if:{{{authorlink5|}}} |&#59;<!--semicolon--> [[w:{{{authorlink5}}}|{{#if:{{{author5|}}} | {{{author5}}} | {{#if:{{{last5|}}} | {{{last5}}}{{#if:{{{first5|}}}|, {{{first5}}}}} }} }}]] |&#59; {{#if:{{{author5|}}} | {{{author5}}} | {{#if:{{{last5|}}} | {{{last5}}}{{#if:{{{first5|}}}|, {{{first5}}}}} }} }} }} }}{{#if:{{{coauthors|}}} | &#59; {{{coauthors}}}&#32; | &#32; }} | {{#if:{{{translator|}}}<!--If editor and/or translator stated without author, display them here.--> | {{{translator|}}}, transl.{{#if:{{{editor|}}}{{{editors|}}}|&#59;&#32;|,}} }}{{#if:{{{mainauthor|}}}{{{mainauthors|}}} | {{{mainauthor|{{{mainauthors|}}}}}},&#32; }}{{#if:{{{editor|}}} | {{{editor}}}, editor&#32; | {{#if:{{{editors|}}} | {{{editors}}}, editors&#32; }} }} }}{{#if:{{{author|}}}{{{last|}}}{{{editor|}}}{{{editors|}}}{{{translator|}}}<!--Only display quotee and date here if these parameters present. Otherwise, display date after publisher's name.--> | {{#if:{{{quotee|}}} |, quoting {{{quotee|}}}&#32; }}{{#if:{{{nodate|}}}|<!--Do nothing-->|({{#if:{{{year|}}} | {{#if:{{{month|}}} | {{{month}}} {{{year}}} | {{#switch:{{padleft:|2|{{{year}}}}} | a. = ''[[Appendix:Glossary#a.|a.]]'' {{#invoke:string/templates|sub|{{{year}}}|4}} | c. = ''[[Appendix:Glossary#c.|c.]]'' {{#invoke:string/templates|sub|{{{year}}}|4}} | p. = ''[[Appendix:Glossary#p.|p.]]'' {{#invoke:string/templates|sub|{{{year}}}|4}} | {{{year}}} }} }} | {{#if:{{{date|}}} | {{#formatdate:{{{date}}}}} | {{#if:{{{accessdate|{{{access-date|}}}}}} | {{#if:{{{archivedate|}}} |<!--Do nothing--> |{{#if:{{{archivedate|}}} |<!--Do nothing--> |accessed {{#formatdate:{{{accessdate|{{{access-date}}}}}}}}<!--Use accessdate as a backstop if year or date not specified.--> }} }} | <!-- using und is a hack but avoids the need to pass a lang to all cite-* templates -->{{rfdate|und<noinclude>|nocat=true</noinclude>}} }} }} }}) }}}}{{#if:{{{author|}}}{{{last|}}}{{{editor|}}}{{{editors|}}}{{{translator|}}} | {{#if:{{{accessdate|{{{access-date|}}}}}}{{{date|}}}{{{year|}}} | {{#if:{{{chapter|}}}{{{entry|}}} |,&#32;<!--Add a comma before chapter or entry if author or editor specified together with date or year. Otherwise, do nothing. (If chapter or entry, and date or year, are specified but author or editor not specified, date or year is relocated after the publisher's name.)--> }} }} }}{{#if:{{{entry|}}} | {{#invoke:italics|unitalicize_brackets|{{#if:{{{entryurl|}}} | “[{{{entryurl}}} {{{entry}}}] | {{#if:{{{url|}}} | “[{{{url}}} {{{entry}}}] | “{{{entry}}} }} }}}}{{#if:{{{trans-chapter|}}} |&#32;&#91;{{#invoke:italics|unitalicize_brackets|{{{trans-chapter}}}}}&#93;” |” }}{{#if:{{{notitle|}}}||, in&#32;}} | {{#if:{{{chapter|}}} | {{#if:{{num|{{{chapter}}}}}<!--Arabic chapter number?--> |&#32;chapter {{#if:{{{chapterurl|}}} | [{{{chapterurl}}} {{{chapter}}}] | {{{chapter}}} }} | {{#if:{{R2A|{{{chapter}}}|no_error=1}}<!--Roman chapter number?--> |&#32;chapter {{#if:{{{chapterurl|}}} | [{{{chapterurl}}} {{uc:{{{chapter}}}}}] | {{uc:{{{chapter}}}}} }} |&#32;“{{#invoke:italics|unitalicize_brackets|{{#if:{{{chapterurl|}}}<!--Must be a chapter name--> | [{{{chapterurl}}} {{{chapter}}}] | {{{chapter}}} }}}}{{#if:{{{trans-chapter|}}} |&#32;&#91;{{#invoke:italics|unitalicize_brackets|{{{trans-chapter}}}}}&#93; }}” }} }}{{#if:{{{notitle|}}}||, in&#32;}} }} }}{{#if:{{{author|}}}{{{last|}}}<!--Only display editor here if author also provided. If author not provided, do nothing – editor is displayed before date.--> | {{#if:{{{translator|}}} |, {{{translator|}}}, transl.{{#if:{{{editor|}}}{{{editors|}}}|&#59;|,}}&#32; }}{{#if:{{{mainauthor|}}}{{{mainauthors|}}} | {{{mainauthor|{{{mainauthors|}}}}}},&#32; }}{{#if:{{{editor|}}}{{{editors|}}} | {{#if:{{{chapter|}}}{{{entry|}}}{{{translator|}}}|<!--Do nothing.-->|,&#32;}}{{#if:{{{editor|}}} | {{{editor}}}, editor,&#32; | {{#if:{{{editors|}}} | {{{editors}}}, editors,&#32; }} }} }} }}{{#if:{{{chapter|}}}{{{entry|}}}|<!--Do nothing.-->|&#32;<!--If these parameters are not used, add a space.-->}}{{#if:{{{title|}}} |<cite>{{#invoke:italics|unitalicize_brackets|{{{title}}}}}</cite> | {{#if:{{{notitle|}}} |<!--Do nothing.--> | {{maintenance line|please provide the title of the work}} }} }}{{#if:{{{trans-title|}}} | &#32;&#91;<cite>{{#invoke:italics|unitalicize_brackets|{{{trans-title}}}}}</cite>&#93; }}{{#if:{{{type|}}} | &#32;&#40;{{{type|}}}&#41; }}{{#if:{{{series|}}} | &#32;({{{series}}}{{#if:{{{seriesvolume|}}}|&#59; {{{seriesvolume}}}}}) }}{{#if:{{{url|}}}{{{archiveurl|}}} | {{#if:{{{entry|}}} | {{#if:{{{entryurl|}}}<!--If {{{entryurl}} exists, then {{{url}} was not linked to {{{entry}}} and should be displayed here--> | {{#if:{{{archiveurl}}} | &lrm;<!--Left-to-right mark to manage right-to-left languages--><sup>[{{{archiveurl}}}]</sup> | &lrm;<sup>[{{{url}}}]</sup> }} }} | {{#if:{{{archiveurl|}}}<!--If {{{entry}}} doesn't exist but {{{url}}} is specified, display it--> | &lrm;<!--Left-to-right mark to manage right-to-left languages--><sup>[{{{archiveurl}}}]</sup> | &lrm;<sup>[{{{url}}}]</sup> }} }} }}{{#if:{{{format|}}}{{{genre|}}} | {{#if:{{{lang|}}}{{{worklang|}}} | &#32;({{#if:{{{format|}}} | {{{format}}} | {{#if:{{{genre|}}} | {{{genre}}} }} }}, in {{#invoke:languages/templates|getCanonicalName|{{{lang|{{{worklang|}}}}}}|return_if_invalid=1}}) | &#32;({{#if:{{{format|}}} | {{{format}}} | {{#if:{{{genre|}}} | {{{genre}}} }} }}) }} | {{#if:{{{lang|}}}{{{worklang|}}} | &#32;(in {{#invoke:languages/templates|getCanonicalName|{{{lang|{{{worklang|}}}}}}|return_if_invalid=1}}) }} }}{{#if:{{{version|}}} |, {{{version}}} }}{{#if:{{{volume|}}} |, volume {{{volume}}} }}{{#if:{{{issue|}}} |, issue {{{issue}}} }}{{#if:{{{others|}}} |, {{{others}}} }}{{#if:{{{edition|}}} |, {{{edition}}} edition }}{{#if:{{{publisher|}}} | {{#if:{{{location|}}} |, {{{location}}}&#58;<!--colon--> |, }} {{{publisher}}} | {{#if:{{{location|}}} |, {{{location}}} }} }}{{#if:{{{author|}}}{{{last|}}} |<!--Do nothing if present.--> | {{#if:{{{editor|}}}{{{editors|}}}{{{translator|}}} |<!--Do nothing if present.--> | {{#if:{{{nodate|}}}|<!--Do nothing-->|, {{#if:{{{year|}}}<!--If author, editor and translator all absent, display date here.--> | {{#if:{{{month|}}} | {{{month}}} {{{year}}} | {{{year}}} }} | {{#if:{{{date|}}} | {{#formatdate:{{{date}}}}} | {{#if:{{{accessdate|{{{access-date|}}}}}} | accessed {{#formatdate:{{{accessdate|{{{access-date}}}}}}}}<!--Use accessdate as a backstop if year or date not specified.--> | {{maintenance line|please provide a date or year}} }} }} }}}} }} }}{{#if:{{{year_published|}}} |, published {{{year_published}}} }}{{#if:{{{bibcode|}}} |, <small>[https://ui.adsabs.harvard.edu/abs/{{urlencode:{{{bibcode}}}}} →Bibcode]</small> }}{{#if:{{{doi|}}} |, <small>{{#if:{{{doi_brokendate|}}} | {{#tag:nowiki|{{{doi}}}}} (inactive [[{{{doi_brokendate}}}]]){{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:Pages with DOIs broken since {{#time:Y|{{{doi_brokendate}}} }}]]}} | <span class="neverexpand">[https://doi.org/{{urlencode:{{{doi}}}}} →DOI]</span> }}</small> }}{{#if:{{{isbn|}}} |, <small>{{ISBN|{{{isbn}}}}}</small> }}{{#if:{{{issn|}}} |, <small>{{ISSN|{{{issn}}}}}</small> }}{{#if:{{{jstor|}}} |, <small>[https://www.jstor.org/stable/{{urlencode:{{{jstor}}}}} →JSTOR]</small> }}{{#if:{{{lccn|}}} |, <small>[https://lccn.loc.gov/{{urlencode:{{{lccn}}}}} →LCCN]</small> }}{{#if:{{{oclc|}}} |, <small>[https://search.worldcat.org/title/{{urlencode:{{{oclc}}}}} →OCLC]</small> }}{{#if:{{{pmid|}}} |, <small>[https://www.ncbi.nlm.nih.gov/pubmed/{{urlencode:{{{pmid}}}}} →PMID]</small> }}{{#if:{{{ol|}}} |, <small>[https://openlibrary.org/works/OL{{urlencode:{{{ol}}}}}/ →OL]</small> }}{{#if:{{{ssrn|}}} |, <small>[https://ssrn.com/abstract={{urlencode:{{{ssrn}}}}} →SSRN]</small> }}{{#if:{{{hdl|}}} |, <small>[https://hdl.handle.net/{{urlencode:{{{hdl}}}}} →HDL]</small> }}{{#if:{{{id|}}} |, <small>{{{id}}}</small> }}{{#if:{{{archiveurl|}}} |, archived from [{{#ifeq:{{#invoke:string/templates|sub|{{{archiveurl}}}|9|23}}|web.archive.org | {{#invoke:string/templates|sub|{{{archiveurl}}}|44|}} | {{{url}}} }} the original] on {{#formatdate:{{#ifeq:{{#invoke:string/templates|sub|{{{archiveurl}}}|9|23}}|web.archive.org | {{#invoke:string/templates|sub|{{{archiveurl}}}|29|32}}-{{#invoke:string/templates|sub|{{{archiveurl}}}|33|34}}-{{#invoke:string/templates|sub|{{{archiveurl}}}|35|36}} | {{{archivedate}}} }}}} }}{{#if:{{{accessdate|{{{access-date|}}}}}} | {{#if:{{{date|}}}{{{year|}}}<!--Only display accessdate if either date or year is specified, as accessdate is already used earlier in place of these parameters if they are missing.--> |{{#if:{{{archivedate|}}} |<!--Do nothing--> |, retrieved {{#formatdate:{{{accessdate|{{{access-date}}}}}}}} }} }} }}{{#if:{{{section|}}} |, {{#if:{{{sectionurl|}}} | [{{{sectionurl}}} {{{section}}}] | {{{section}}} }} }}{{#if:{{{line|}}} |, line {{{line}}} | {{#if:{{{lines|}}} |, lines {{{lines}}} }} }}{{#if:{{{pages|}}} | {{#if:{{{page|}}} |, {{#if:{{{pageurl|}}} | [{{{pageurl}}} page&nbsp;{{{page}}}] | page&nbsp;{{{page}}} }}&#32;of {{{pages}}} |, {{#if:{{{pageurl|}}} | [{{{pageurl}}} pages {{{pages}}}] | pages {{{pages}}} }} }} | {{#if:{{{page|}}} |, {{#if:{{{pageurl|}}} | [{{{pageurl}}} page&nbsp;{{{page}}}] | page&nbsp;{{{page}}} }} }} }}{{#if:{{{column|}}}{{{columns|}}} |, {{#if:{{{columnurl|}}} | [{{{columnurl}}} {{#if:{{{columns|}}} | columns {{{columns}}} | column {{{column}}} }}] | {{#if:{{{columns|}}} | columns {{{columns}}} | column {{{column}}} }} }} }}{{#if:{{{newversion|}}}{{{location2|}}}{{{2ndauthor|}}}{{{2ndlast|}}}{{{translator2|}}}{{{editor2|}}}{{{title2|}}}<!--Test for new version of work.--> |&#59; {{#if:{{{newversion|}}} | {{{newversion}}} | {{#if:{{{edition2|}}} |<!--Do nothing--> | {{#if:{{{2ndauthor|}}}{{{2ndlast|}}}{{{translator2|}}}{{{editor2|}}}{{{title2|}}} | republished as | republished }} }} }}&#32; }}{{#if:{{{2ndauthor|}}}{{{2ndlast|}}} | {{#if:{{{2ndauthorlink|}}} | &#32;[[w:{{{2ndauthorlink}}}|{{#if:{{{2ndauthor|}}} | {{{2ndauthor}}},&#32; | {{#if:{{{2ndlast|}}} | {{{2ndlast}}}{{#if:{{{2ndfirst|}}}|, {{{2ndfirst}}}}},&#32; }} }}]] | {{#if:{{{2ndauthor|}}} | &#32;{{{2ndauthor}}},&#32; | {{#if:{{{2ndlast|}}} | &#32;{{{2ndlast}}}{{#if:{{{2ndfirst|}}}|, {{{2ndfirst}}}}},&#32; }} }} }} }}{{#if:{{{translator2|}}} | &#59; {{{translator2|}}}, transl.,&#32; }}{{#if:{{{chapter2|}}}{{{entry2|}}} | {{#if:{{{entry2|}}} | {{#invoke:italics|unitalicize_brackets|{{#if:{{{entryurl2|}}} | “[{{{entryurl2}}} {{{entry2}}}] | “{{{entry2}}} }}}}{{#if:{{{trans-chapter2|}}} | &#32;&#91;{{#invoke:italics|unitalicize_brackets|{{{trans-chapter2}}}}}&#93;” | ” }}{{#if:{{{notitle2|}}}||, in&#32;}} | {{#if:{{{chapter2|}}} | {{#if:{{num|{{{chapter2}}}}}<!--Arabic chapter number?--> | &#32;chapter {{#if:{{{chapterurl2|}}} | [{{{chapterurl2}}} {{{chapter2}}}] | {{{chapter2}}} }} | {{#if:{{R2A|{{{chapter2}}}|no_error=1}}<!--Roman chapter number?--> | &#32;chapter {{#if:{{{chapterurl2|}}} | [{{{chapterurl2}}} {{uc:{{{chapter2}}}}}] | {{uc:{{{chapter2}}}}} }} | &#32;“{{#invoke:italics|unitalicize_brackets|{{#if:{{{chapterurl2|}}}<!--Must be a chapter name--> | [{{{chapterurl2}}} {{{chapter2}}}] | {{{chapter2}}} }}}}{{#if:{{{trans-chapter2|}}} | &#32;&#91;{{#invoke:italics|unitalicize_brackets|{{{trans-chapter2}}}}}&#93; }}” }} }}{{#if:{{{notitle2|}}}||, in&#32;}} }} }} }}{{#if:{{{mainauthor2|}}} | {{{mainauthor2}}}{{#if:{{{editor2|}}}{{{editors2|}}}|&#59;&#32;|,}} }}{{#if:{{{editor2|}}}{{{editors2|}}} | {{#if:{{{editor2|}}} | {{{editor2}}}, editor, | {{#if:{{{editors2|}}} | {{{editors2}}}, editors, }} }} }}{{#if:{{{title2|}}} | &#32;<cite>{{#invoke:italics|unitalicize_brackets|{{{title2}}}}}</cite> }}{{#if:{{{trans-title2|}}} | &#32;&#91;<cite>{{#invoke:italics|unitalicize_brackets|{{{trans-title2}}}}}</cite>&#93; }}{{#if:{{{type2|}}} | &#32;&#40;{{{type2}}}&#41; }}{{#if:{{{series2|}}} | &#32;({{{series2}}}{{#if:{{{seriesvolume2|}}}|&#59; {{{seriesvolume2}}}}}) }}{{#if:{{{url2|}}} | {{#if:{{{archiveurl2|}}} | &lrm;<sup>[{{{archiveurl2}}}]</sup> | &lrm;<sup>[{{{url2}}}]</sup> }} }}{{#if:{{{format2|}}}{{{genre2|}}} | {{#if:{{{lang2|}}}{{{worklang2|}}} | &#32;({{#if:{{{format2|}}} | {{{format2}}} | {{#if:{{{genre2|}}} | {{{genre2}}} }} }}, in {{#invoke:languages/templates|getCanonicalName|{{{lang2|{{{worklang2|}}}}}}|return_if_invalid=1}}) | &#32;({{#if:{{{format2|}}} | {{{format2}}} | {{#if:{{{genre2|}}} | {{{genre2}}} }} }}) }} | {{#if:{{{lang2|}}}{{{worklang2|}}} | &#32;(in {{#invoke:languages/templates|getCanonicalName|{{{lang2|{{{worklang2|}}}}}}|return_if_invalid=1}}) }} }}{{#if:{{{version2|}}} |, {{{version2}}} }}{{#if:{{{volume2|}}} |, volume {{{volume2}}} | {{#if:{{{volume_plain2|}}} |, {{{volume_plain2}}} }} }}{{#if:{{{issue2|}}} |, number {{{issue2}}} }}{{#if:{{{edition2|}}} | {{#if:{{{title2|}}}|,&#32;}}{{{edition2}}} edition }}{{#if:{{{others2|}}} |, {{{others2}}} }}{{#if:{{{publisher2|}}} | {{#if:{{{location2|}}} | {{#if:{{{edition2|}}}{{{title2|}}}|,&#32;}}{{{location2}}}&#58; |, }} {{{publisher2}}} | {{#if:{{{location2|}}} | {{#if:{{{edition2|}}}{{{title2|}}}|,&#32;}}{{{location2}}} }} }}{{#if:{{{newversion|}}}{{{2ndauthor|}}}{{{2ndlast|}}}{{{translator2|}}}{{{editor2|}}}{{{title2|}}}{{{location2|}}}<!--Test for new version of work--> | {{#if:{{{date2|}}} |, {{{date2}}} | {{#if:{{{year2|}}} |, {{{year2}}} |, {{maintenance line|please provide a date or year}} }} }} }}{{#if:{{{bibcode2|}}} |, <small>[https://ui.adsabs.harvard.edu/abs/{{urlencode:{{{bibcode2}}}}} →Bibcode]</small> }}{{#if:{{{doi2|}}} |, <small>{{#if:{{{doi_brokendate2|}}} | {{#tag:nowiki|{{{doi2}}}}} (inactive [[{{{doi_brokendate2}}}]]){{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:Pages with DOIs broken since {{#time:Y|{{{doi_brokendate2}}}}}]]}} | <span class="neverexpand">[https://doi.org/{{urlencode:{{{doi2}}}}} →DOI]</span> }}</small> }}{{#if:{{{isbn2|}}} |, <small>{{ISBN|{{{isbn2}}}}}</small> }}{{#if:{{{issn2|}}} |, <small>{{ISSN|{{{issn2}}}}}</small> }}{{#if:{{{jstor2|}}} |, <small>[https://www.jstor.org/stable/{{urlencode:{{{jstor2}}}}} →JSTOR]</small> }}{{#if:{{{lccn2|}}} |, <small>[https://lccn.loc.gov/{{urlencode:{{{lccn2}}}}} →LCCN]</small> }}{{#if:{{{oclc2|}}} |, <small>[https://worldcat.org/oclc/{{urlencode:{{{oclc2}}}}} →OCLC]</small> }}{{#if:{{{ol2|}}} |, <small>[https://openlibrary.org/works/OL{{urlencode:{{{ol2}}}}}/ →OL]</small> }}{{#if:{{{pmid2|}}} |, <small>[https://www.ncbi.nlm.nih.gov/pubmed/{{urlencode:{{{pmid2}}}}} →PMID]</small> }}{{#if:{{{ssrn2|}}} |, <small>[https://ssrn.com/abstract={{urlencode:{{{ssrn2}}}}} →SSRN]</small> }}{{#if:{{{id2|}}} |, <small>{{{id2}}}</small> }}{{#if:{{{archiveurl2|}}} |, archived from [{{{url2}}} the original] on {{#if:{{{archivedate2|}}} | {{#formatdate:{{{archivedate2}}}}} | {{maintenance line|please provide the date}} }} }}{{#if:{{{accessdate2|}}} |{{#if:{{{archivedate2|}}} |<!--Do nothing--> |, retrieved {{#formatdate:{{{accessdate2|}}}}} }} }}{{#if:{{{section2|}}} | {{#if:{{{sectionurl2|}}} |, [{{{sectionurl2}}} {{{section2}}}] |, {{{section2}}} }} }}{{#if:{{{line2|}}} |, line {{{line2}}} | {{#if:{{{lines2|}}} |, lines {{{lines2}}} }} }}{{#if:{{{pages2|}}} | {{#if:{{{page2|}}} |, {{#if:{{{pageurl2|}}} | [{{{pageurl2}}} page&nbsp;{{{page2}}}] | page&nbsp;{{{page2}}} }}&#32;of {{{pages2}}} |, {{#if:{{{pageurl2|}}} | [{{{pageurl2}}} pages {{{pages2}}}] | pages {{{pages2}}} }} }} | {{#if:{{{page2|}}} |, {{#if:{{{pageurl2|}}} | [{{{pageurl2}}} page&nbsp;{{{page2}}}] | page&nbsp;{{{page2}}} }} }} }}{{#if:{{{column2|}}}{{{columns2|}}} |, {{#if:{{{columnurl2|}}} | [{{{columnurl2}}} {{#if:{{{columns2|}}} | columns {{{columns2}}} | column {{{column2}}} }}] | {{#if:{{{columns2|}}} | columns {{{columns2}}} | column {{{column2}}} }} }} }}{{#if:{{{passage_block|}}} | {{#ifeq:{{{passage_block|}}}|no | {{#if:{{{passage|}}} |&#58; “{{{passage}}}{{#if:{{{translation|}}} |&#32;[{{{translation}}}] }}”{{#if:{{{footer|}}} |<dl><dd>{{{footer}}}</dd></dl> }} }} |&#58;<dl><dd>{{{passage_block}}}{{#if:{{{translation|}}} |<dl><dd>{{{translation}}}</dd></dl> }}{{#if:{{{footer|}}} |<dl><dd>{{{footer}}}</dd></dl> }}</dd></dl> }} | {{#if:{{{passage|}}} | {{#ifexpr:{{#invoke:string/templates|len_visible|{{{passage}}}}}>300 |&#58;<dl><dd>{{{passage}}}{{#if:{{{translation|}}} |<dl><dd>{{{translation}}}</dd></dl> }}{{#if:{{{footer|}}} |<dl><dd>{{{footer}}}</dd></dl> }}</dd></dl> |&#58; “{{{passage}}}{{#if:{{{translation|}}} |&#32;[{{{translation}}}] }}”{{#if:{{{footer|}}} |<dl><dd>{{{footer}}}</dd></dl> }} }} }} }}{{#if:{{{archiveurl|}}} | {{#if:{{{archivedate|}}} |<!--Do nothing--> | {{#ifeq:{{#invoke:string/templates|sub|{{{archiveurl}}}|9|23}}|web.archive.org |<!--Do nothing--> | [[Category:Quotations using archiveurl without archivedate]] }} }} }}{{#if:{{{usenodot|}}}|{{#if:{{{nodot|}}}||.}}}}</includeonly><noinclude>{{documentation}}</noinclude> 5855p6umj6nuixgo6ieebznll3kwlua 238704 238703 2026-11-11T03:33:06Z Lee 19 [[:en:Template:cite-meta]] වෙතින් එක් සංශෝධනයක් 238703 wikitext text/x-wiki <includeonly>{{#if:{{{author|}}}{{{last|}}} | {{#if:{{{authorlink|}}} | [[w:{{{authorlink}}}|{{#if:{{{author|}}} | {{{author}}} | {{#if:{{{last|}}} | {{{last}}}{{#if:{{{first|}}}|, {{{first}}}}} }} }}]] | {{#if:{{{author|}}} | {{{author}}} | {{#if:{{{last|}}} | {{{last}}}{{#if:{{{first|}}}|, {{{first}}}}} }} }} }}{{#if:{{{author2|}}}{{{last2|}}} | {{#if:{{{authorlink2|}}} |&#59;<!--semicolon--> [[w:{{{authorlink2}}}|{{#if:{{{author2|}}} | {{{author2}}} | {{#if:{{{last2|}}} | {{{last2}}}{{#if:{{{first2|}}}|, {{{first2}}}}} }} }}]] |&#59; {{#if:{{{author2|}}} | {{{author2}}} | {{#if:{{{last2|}}} | {{{last2}}}{{#if:{{{first2|}}}|, {{{first2}}}}} }} }} }} }}{{#if:{{{author3|}}}{{{last3|}}} | {{#if:{{{authorlink3|}}} |&#59;<!--semicolon--> [[w:{{{authorlink3}}}|{{#if:{{{author3|}}} | {{{author3}}} | {{#if:{{{last3|}}} | {{{last3}}}{{#if:{{{first3|}}}|, {{{first3}}}}} }} }}]] |&#59; {{#if:{{{author3|}}} | {{{author3}}} | {{#if:{{{last3|}}} | {{{last3}}}{{#if:{{{first3|}}}|, {{{first3}}}}} }} }} }} }}{{#if:{{{author4|}}}{{{last4|}}} | {{#if:{{{authorlink4|}}} |&#59;<!--semicolon--> [[w:{{{authorlink4}}}|{{#if:{{{author4|}}} | {{{author4}}} | {{#if:{{{last4|}}} | {{{last4}}}{{#if:{{{first4|}}}|, {{{first4}}}}} }} }}]] |&#59; {{#if:{{{author4|}}} | {{{author4}}} | {{#if:{{{last4|}}} | {{{last4}}}{{#if:{{{first4|}}}|, {{{first4}}}}} }} }} }} }}{{#if:{{{author5|}}}{{{last5|}}} | {{#if:{{{authorlink5|}}} |&#59;<!--semicolon--> [[w:{{{authorlink5}}}|{{#if:{{{author5|}}} | {{{author5}}} | {{#if:{{{last5|}}} | {{{last5}}}{{#if:{{{first5|}}}|, {{{first5}}}}} }} }}]] |&#59; {{#if:{{{author5|}}} | {{{author5}}} | {{#if:{{{last5|}}} | {{{last5}}}{{#if:{{{first5|}}}|, {{{first5}}}}} }} }} }} }}{{#if:{{{coauthors|}}} | &#59; {{{coauthors}}}&#32; | &#32; }} | {{#if:{{{translator|}}}<!--If editor and/or translator stated without author, display them here.--> | {{{translator|}}}, transl.{{#if:{{{editor|}}}{{{editors|}}}|&#59;&#32;|,}} }}{{#if:{{{mainauthor|}}}{{{mainauthors|}}} | {{{mainauthor|{{{mainauthors|}}}}}},&#32; }}{{#if:{{{editor|}}} | {{{editor}}}, editor&#32; | {{#if:{{{editors|}}} | {{{editors}}}, editors&#32; }} }} }}{{#if:{{{author|}}}{{{last|}}}{{{editor|}}}{{{editors|}}}{{{translator|}}}<!--Only display quotee and date here if these parameters present. Otherwise, display date after publisher's name.--> | {{#if:{{{quotee|}}} |, quoting {{{quotee|}}}&#32; }}{{#if:{{{nodate|}}}|<!--Do nothing-->|({{#if:{{{year|}}} | {{#if:{{{month|}}} | {{{month}}} {{{year}}} | {{#switch:{{padleft:|2|{{{year}}}}} | a. = ''[[Appendix:Glossary#a.|a.]]'' {{#invoke:string/templates|sub|{{{year}}}|4}} | c. = ''[[Appendix:Glossary#c.|c.]]'' {{#invoke:string/templates|sub|{{{year}}}|4}} | p. = ''[[Appendix:Glossary#p.|p.]]'' {{#invoke:string/templates|sub|{{{year}}}|4}} | {{{year}}} }} }} | {{#if:{{{date|}}} | {{#formatdate:{{{date}}}}} | {{#if:{{{accessdate|{{{access-date|}}}}}} | {{#if:{{{archivedate|}}} |<!--Do nothing--> |{{#if:{{{archivedate|}}} |<!--Do nothing--> |accessed {{#formatdate:{{{accessdate|{{{access-date}}}}}}}}<!--Use accessdate as a backstop if year or date not specified.--> }} }} | <!-- using und is a hack but avoids the need to pass a lang to all cite-* templates -->{{rfdate|und<noinclude>|nocat=true</noinclude>}} }} }} }}) }}}}{{#if:{{{author|}}}{{{last|}}}{{{editor|}}}{{{editors|}}}{{{translator|}}} | {{#if:{{{accessdate|{{{access-date|}}}}}}{{{date|}}}{{{year|}}} | {{#if:{{{chapter|}}}{{{entry|}}} |,&#32;<!--Add a comma before chapter or entry if author or editor specified together with date or year. Otherwise, do nothing. (If chapter or entry, and date or year, are specified but author or editor not specified, date or year is relocated after the publisher's name.)--> }} }} }}{{#if:{{{entry|}}} | {{#invoke:italics|unitalicize_brackets|{{#if:{{{entryurl|}}} | “[{{{entryurl}}} {{{entry}}}] | {{#if:{{{url|}}} | “[{{{url}}} {{{entry}}}] | “{{{entry}}} }} }}}}{{#if:{{{trans-chapter|}}} |&#32;&#91;{{#invoke:italics|unitalicize_brackets|{{{trans-chapter}}}}}&#93;” |” }}{{#if:{{{notitle|}}}||, in&#32;}} | {{#if:{{{chapter|}}} | {{#if:{{num|{{{chapter}}}}}<!--Arabic chapter number?--> |&#32;chapter {{#if:{{{chapterurl|}}} | [{{{chapterurl}}} {{{chapter}}}] | {{{chapter}}} }} | {{#if:{{R2A|{{{chapter}}}|no_error=1}}<!--Roman chapter number?--> |&#32;chapter {{#if:{{{chapterurl|}}} | [{{{chapterurl}}} {{uc:{{{chapter}}}}}] | {{uc:{{{chapter}}}}} }} |&#32;“{{#invoke:italics|unitalicize_brackets|{{#if:{{{chapterurl|}}}<!--Must be a chapter name--> | [{{{chapterurl}}} {{{chapter}}}] | {{{chapter}}} }}}}{{#if:{{{trans-chapter|}}} |&#32;&#91;{{#invoke:italics|unitalicize_brackets|{{{trans-chapter}}}}}&#93; }}” }} }}{{#if:{{{notitle|}}}||, in&#32;}} }} }}{{#if:{{{author|}}}{{{last|}}}<!--Only display editor here if author also provided. If author not provided, do nothing – editor is displayed before date.--> | {{#if:{{{translator|}}} |, {{{translator|}}}, transl.{{#if:{{{editor|}}}{{{editors|}}}|&#59;|,}}&#32; }}{{#if:{{{mainauthor|}}}{{{mainauthors|}}} | {{{mainauthor|{{{mainauthors|}}}}}},&#32; }}{{#if:{{{editor|}}}{{{editors|}}} | {{#if:{{{chapter|}}}{{{entry|}}}{{{translator|}}}|<!--Do nothing.-->|,&#32;}}{{#if:{{{editor|}}} | {{{editor}}}, editor,&#32; | {{#if:{{{editors|}}} | {{{editors}}}, editors,&#32; }} }} }} }}{{#if:{{{chapter|}}}{{{entry|}}}|<!--Do nothing.-->|&#32;<!--If these parameters are not used, add a space.-->}}{{#if:{{{title|}}} |<cite>{{#invoke:italics|unitalicize_brackets|{{{title}}}}}</cite> | {{#if:{{{notitle|}}} |<!--Do nothing.--> | {{maintenance line|please provide the title of the work}} }} }}{{#if:{{{trans-title|}}} | &#32;&#91;<cite>{{#invoke:italics|unitalicize_brackets|{{{trans-title}}}}}</cite>&#93; }}{{#if:{{{type|}}} | &#32;&#40;{{{type|}}}&#41; }}{{#if:{{{series|}}} | &#32;({{{series}}}{{#if:{{{seriesvolume|}}}|&#59; {{{seriesvolume}}}}}) }}{{#if:{{{url|}}}{{{archiveurl|}}} | {{#if:{{{entry|}}} | {{#if:{{{entryurl|}}}<!--If {{{entryurl}} exists, then {{{url}} was not linked to {{{entry}}} and should be displayed here--> | {{#if:{{{archiveurl}}} | &lrm;<!--Left-to-right mark to manage right-to-left languages--><sup>[{{{archiveurl}}}]</sup> | &lrm;<sup>[{{{url}}}]</sup> }} }} | {{#if:{{{archiveurl|}}}<!--If {{{entry}}} doesn't exist but {{{url}}} is specified, display it--> | &lrm;<!--Left-to-right mark to manage right-to-left languages--><sup>[{{{archiveurl}}}]</sup> | &lrm;<sup>[{{{url}}}]</sup> }} }} }}{{#if:{{{format|}}}{{{genre|}}} | {{#if:{{{lang|}}}{{{worklang|}}} | &#32;({{#if:{{{format|}}} | {{{format}}} | {{#if:{{{genre|}}} | {{{genre}}} }} }}, in {{#invoke:languages/templates|getCanonicalName|{{{lang|{{{worklang|}}}}}}|return_if_invalid=1}}) | &#32;({{#if:{{{format|}}} | {{{format}}} | {{#if:{{{genre|}}} | {{{genre}}} }} }}) }} | {{#if:{{{lang|}}}{{{worklang|}}} | &#32;(in {{#invoke:languages/templates|getCanonicalName|{{{lang|{{{worklang|}}}}}}|return_if_invalid=1}}) }} }}{{#if:{{{version|}}} |, {{{version}}} }}{{#if:{{{volume|}}} |, volume {{{volume}}} }}{{#if:{{{issue|}}} |, issue {{{issue}}} }}{{#if:{{{others|}}} |, {{{others}}} }}{{#if:{{{edition|}}} |, {{{edition}}} edition }}{{#if:{{{publisher|}}} | {{#if:{{{location|}}} |, {{{location}}}&#58;<!--colon--> |, }} {{{publisher}}} | {{#if:{{{location|}}} |, {{{location}}} }} }}{{#if:{{{author|}}}{{{last|}}} |<!--Do nothing if present.--> | {{#if:{{{editor|}}}{{{editors|}}}{{{translator|}}} |<!--Do nothing if present.--> | {{#if:{{{nodate|}}}|<!--Do nothing-->|, {{#if:{{{year|}}}<!--If author, editor and translator all absent, display date here.--> | {{#if:{{{month|}}} | {{{month}}} {{{year}}} | {{{year}}} }} | {{#if:{{{date|}}} | {{#formatdate:{{{date}}}}} | {{#if:{{{accessdate|{{{access-date|}}}}}} | accessed {{#formatdate:{{{accessdate|{{{access-date}}}}}}}}<!--Use accessdate as a backstop if year or date not specified.--> | {{maintenance line|please provide a date or year}} }} }} }}}} }} }}{{#if:{{{year_published|}}} |, published {{{year_published}}} }}{{#if:{{{bibcode|}}} |, <small>[https://ui.adsabs.harvard.edu/abs/{{urlencode:{{{bibcode}}}}} →Bibcode]</small> }}{{#if:{{{doi|}}} |, <small>{{#if:{{{doi_brokendate|}}} | {{#tag:nowiki|{{{doi}}}}} (inactive [[{{{doi_brokendate}}}]]){{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:Pages with DOIs broken since {{#time:Y|{{{doi_brokendate}}} }}]]}} | <span class="neverexpand">[https://doi.org/{{urlencode:{{{doi}}}}} →DOI]</span> }}</small> }}{{#if:{{{isbn|}}} |, <small>{{ISBN|{{{isbn}}}}}</small> }}{{#if:{{{issn|}}} |, <small>{{ISSN|{{{issn}}}}}</small> }}{{#if:{{{jstor|}}} |, <small>[https://www.jstor.org/stable/{{urlencode:{{{jstor}}}}} →JSTOR]</small> }}{{#if:{{{lccn|}}} |, <small>[https://lccn.loc.gov/{{urlencode:{{{lccn}}}}} →LCCN]</small> }}{{#if:{{{oclc|}}} |, <small>[https://search.worldcat.org/title/{{urlencode:{{{oclc}}}}} →OCLC]</small> }}{{#if:{{{pmid|}}} |, <small>[https://www.ncbi.nlm.nih.gov/pubmed/{{urlencode:{{{pmid}}}}} →PMID]</small> }}{{#if:{{{ol|}}} |, <small>[https://openlibrary.org/works/OL{{urlencode:{{{ol}}}}}/ →OL]</small> }}{{#if:{{{ssrn|}}} |, <small>[https://ssrn.com/abstract={{urlencode:{{{ssrn}}}}} →SSRN]</small> }}{{#if:{{{hdl|}}} |, <small>[https://hdl.handle.net/{{urlencode:{{{hdl}}}}} →HDL]</small> }}{{#if:{{{id|}}} |, <small>{{{id}}}</small> }}{{#if:{{{archiveurl|}}} |, archived from [{{#ifeq:{{#invoke:string/templates|sub|{{{archiveurl}}}|9|23}}|web.archive.org | {{#invoke:string/templates|sub|{{{archiveurl}}}|44|}} | {{{url}}} }} the original] on {{#formatdate:{{#ifeq:{{#invoke:string/templates|sub|{{{archiveurl}}}|9|23}}|web.archive.org | {{#invoke:string/templates|sub|{{{archiveurl}}}|29|32}}-{{#invoke:string/templates|sub|{{{archiveurl}}}|33|34}}-{{#invoke:string/templates|sub|{{{archiveurl}}}|35|36}} | {{{archivedate}}} }}}} }}{{#if:{{{accessdate|{{{access-date|}}}}}} | {{#if:{{{date|}}}{{{year|}}}<!--Only display accessdate if either date or year is specified, as accessdate is already used earlier in place of these parameters if they are missing.--> |{{#if:{{{archivedate|}}} |<!--Do nothing--> |, retrieved {{#formatdate:{{{accessdate|{{{access-date}}}}}}}} }} }} }}{{#if:{{{section|}}} |, {{#if:{{{sectionurl|}}} | [{{{sectionurl}}} {{{section}}}] | {{{section}}} }} }}{{#if:{{{line|}}} |, line {{{line}}} | {{#if:{{{lines|}}} |, lines {{{lines}}} }} }}{{#if:{{{pages|}}} | {{#if:{{{page|}}} |, {{#if:{{{pageurl|}}} | [{{{pageurl}}} page&nbsp;{{{page}}}] | page&nbsp;{{{page}}} }}&#32;of {{{pages}}} |, {{#if:{{{pageurl|}}} | [{{{pageurl}}} pages {{{pages}}}] | pages {{{pages}}} }} }} | {{#if:{{{page|}}} |, {{#if:{{{pageurl|}}} | [{{{pageurl}}} page&nbsp;{{{page}}}] | page&nbsp;{{{page}}} }} }} }}{{#if:{{{column|}}}{{{columns|}}} |, {{#if:{{{columnurl|}}} | [{{{columnurl}}} {{#if:{{{columns|}}} | columns {{{columns}}} | column {{{column}}} }}] | {{#if:{{{columns|}}} | columns {{{columns}}} | column {{{column}}} }} }} }}{{#if:{{{newversion|}}}{{{location2|}}}{{{2ndauthor|}}}{{{2ndlast|}}}{{{translator2|}}}{{{editor2|}}}{{{title2|}}}<!--Test for new version of work.--> |&#59; {{#if:{{{newversion|}}} | {{{newversion}}} | {{#if:{{{edition2|}}} |<!--Do nothing--> | {{#if:{{{2ndauthor|}}}{{{2ndlast|}}}{{{translator2|}}}{{{editor2|}}}{{{title2|}}} | republished as | republished }} }} }}&#32; }}{{#if:{{{2ndauthor|}}}{{{2ndlast|}}} | {{#if:{{{2ndauthorlink|}}} | &#32;[[w:{{{2ndauthorlink}}}|{{#if:{{{2ndauthor|}}} | {{{2ndauthor}}},&#32; | {{#if:{{{2ndlast|}}} | {{{2ndlast}}}{{#if:{{{2ndfirst|}}}|, {{{2ndfirst}}}}},&#32; }} }}]] | {{#if:{{{2ndauthor|}}} | &#32;{{{2ndauthor}}},&#32; | {{#if:{{{2ndlast|}}} | &#32;{{{2ndlast}}}{{#if:{{{2ndfirst|}}}|, {{{2ndfirst}}}}},&#32; }} }} }} }}{{#if:{{{translator2|}}} | &#59; {{{translator2|}}}, transl.,&#32; }}{{#if:{{{chapter2|}}}{{{entry2|}}} | {{#if:{{{entry2|}}} | {{#invoke:italics|unitalicize_brackets|{{#if:{{{entryurl2|}}} | “[{{{entryurl2}}} {{{entry2}}}] | “{{{entry2}}} }}}}{{#if:{{{trans-chapter2|}}} | &#32;&#91;{{#invoke:italics|unitalicize_brackets|{{{trans-chapter2}}}}}&#93;” | ” }}{{#if:{{{notitle2|}}}||, in&#32;}} | {{#if:{{{chapter2|}}} | {{#if:{{num|{{{chapter2}}}}}<!--Arabic chapter number?--> | &#32;chapter {{#if:{{{chapterurl2|}}} | [{{{chapterurl2}}} {{{chapter2}}}] | {{{chapter2}}} }} | {{#if:{{R2A|{{{chapter2}}}|no_error=1}}<!--Roman chapter number?--> | &#32;chapter {{#if:{{{chapterurl2|}}} | [{{{chapterurl2}}} {{uc:{{{chapter2}}}}}] | {{uc:{{{chapter2}}}}} }} | &#32;“{{#invoke:italics|unitalicize_brackets|{{#if:{{{chapterurl2|}}}<!--Must be a chapter name--> | [{{{chapterurl2}}} {{{chapter2}}}] | {{{chapter2}}} }}}}{{#if:{{{trans-chapter2|}}} | &#32;&#91;{{#invoke:italics|unitalicize_brackets|{{{trans-chapter2}}}}}&#93; }}” }} }}{{#if:{{{notitle2|}}}||, in&#32;}} }} }} }}{{#if:{{{mainauthor2|}}} | {{{mainauthor2}}}{{#if:{{{editor2|}}}{{{editors2|}}}|&#59;&#32;|,}} }}{{#if:{{{editor2|}}}{{{editors2|}}} | {{#if:{{{editor2|}}} | {{{editor2}}}, editor, | {{#if:{{{editors2|}}} | {{{editors2}}}, editors, }} }} }}{{#if:{{{title2|}}} | &#32;<cite>{{#invoke:italics|unitalicize_brackets|{{{title2}}}}}</cite> }}{{#if:{{{trans-title2|}}} | &#32;&#91;<cite>{{#invoke:italics|unitalicize_brackets|{{{trans-title2}}}}}</cite>&#93; }}{{#if:{{{type2|}}} | &#32;&#40;{{{type2}}}&#41; }}{{#if:{{{series2|}}} | &#32;({{{series2}}}{{#if:{{{seriesvolume2|}}}|&#59; {{{seriesvolume2}}}}}) }}{{#if:{{{url2|}}} | {{#if:{{{archiveurl2|}}} | &lrm;<sup>[{{{archiveurl2}}}]</sup> | &lrm;<sup>[{{{url2}}}]</sup> }} }}{{#if:{{{format2|}}}{{{genre2|}}} | {{#if:{{{lang2|}}}{{{worklang2|}}} | &#32;({{#if:{{{format2|}}} | {{{format2}}} | {{#if:{{{genre2|}}} | {{{genre2}}} }} }}, in {{#invoke:languages/templates|getCanonicalName|{{{lang2|{{{worklang2|}}}}}}|return_if_invalid=1}}) | &#32;({{#if:{{{format2|}}} | {{{format2}}} | {{#if:{{{genre2|}}} | {{{genre2}}} }} }}) }} | {{#if:{{{lang2|}}}{{{worklang2|}}} | &#32;(in {{#invoke:languages/templates|getCanonicalName|{{{lang2|{{{worklang2|}}}}}}|return_if_invalid=1}}) }} }}{{#if:{{{version2|}}} |, {{{version2}}} }}{{#if:{{{volume2|}}} |, volume {{{volume2}}} | {{#if:{{{volume_plain2|}}} |, {{{volume_plain2}}} }} }}{{#if:{{{issue2|}}} |, number {{{issue2}}} }}{{#if:{{{edition2|}}} | {{#if:{{{title2|}}}|,&#32;}}{{{edition2}}} edition }}{{#if:{{{others2|}}} |, {{{others2}}} }}{{#if:{{{publisher2|}}} | {{#if:{{{location2|}}} | {{#if:{{{edition2|}}}{{{title2|}}}|,&#32;}}{{{location2}}}&#58; |, }} {{{publisher2}}} | {{#if:{{{location2|}}} | {{#if:{{{edition2|}}}{{{title2|}}}|,&#32;}}{{{location2}}} }} }}{{#if:{{{newversion|}}}{{{2ndauthor|}}}{{{2ndlast|}}}{{{translator2|}}}{{{editor2|}}}{{{title2|}}}{{{location2|}}}<!--Test for new version of work--> | {{#if:{{{date2|}}} |, {{{date2}}} | {{#if:{{{year2|}}} |, {{{year2}}} |, {{maintenance line|please provide a date or year}} }} }} }}{{#if:{{{bibcode2|}}} |, <small>[https://ui.adsabs.harvard.edu/abs/{{urlencode:{{{bibcode2}}}}} →Bibcode]</small> }}{{#if:{{{doi2|}}} |, <small>{{#if:{{{doi_brokendate2|}}} | {{#tag:nowiki|{{{doi2}}}}} (inactive [[{{{doi_brokendate2}}}]]){{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:Pages with DOIs broken since {{#time:Y|{{{doi_brokendate2}}}}}]]}} | <span class="neverexpand">[https://doi.org/{{urlencode:{{{doi2}}}}} →DOI]</span> }}</small> }}{{#if:{{{isbn2|}}} |, <small>{{ISBN|{{{isbn2}}}}}</small> }}{{#if:{{{issn2|}}} |, <small>{{ISSN|{{{issn2}}}}}</small> }}{{#if:{{{jstor2|}}} |, <small>[https://www.jstor.org/stable/{{urlencode:{{{jstor2}}}}} →JSTOR]</small> }}{{#if:{{{lccn2|}}} |, <small>[https://lccn.loc.gov/{{urlencode:{{{lccn2}}}}} →LCCN]</small> }}{{#if:{{{oclc2|}}} |, <small>[https://worldcat.org/oclc/{{urlencode:{{{oclc2}}}}} →OCLC]</small> }}{{#if:{{{ol2|}}} |, <small>[https://openlibrary.org/works/OL{{urlencode:{{{ol2}}}}}/ →OL]</small> }}{{#if:{{{pmid2|}}} |, <small>[https://www.ncbi.nlm.nih.gov/pubmed/{{urlencode:{{{pmid2}}}}} →PMID]</small> }}{{#if:{{{ssrn2|}}} |, <small>[https://ssrn.com/abstract={{urlencode:{{{ssrn2}}}}} →SSRN]</small> }}{{#if:{{{id2|}}} |, <small>{{{id2}}}</small> }}{{#if:{{{archiveurl2|}}} |, archived from [{{{url2}}} the original] on {{#if:{{{archivedate2|}}} | {{#formatdate:{{{archivedate2}}}}} | {{maintenance line|please provide the date}} }} }}{{#if:{{{accessdate2|}}} |{{#if:{{{archivedate2|}}} |<!--Do nothing--> |, retrieved {{#formatdate:{{{accessdate2|}}}}} }} }}{{#if:{{{section2|}}} | {{#if:{{{sectionurl2|}}} |, [{{{sectionurl2}}} {{{section2}}}] |, {{{section2}}} }} }}{{#if:{{{line2|}}} |, line {{{line2}}} | {{#if:{{{lines2|}}} |, lines {{{lines2}}} }} }}{{#if:{{{pages2|}}} | {{#if:{{{page2|}}} |, {{#if:{{{pageurl2|}}} | [{{{pageurl2}}} page&nbsp;{{{page2}}}] | page&nbsp;{{{page2}}} }}&#32;of {{{pages2}}} |, {{#if:{{{pageurl2|}}} | [{{{pageurl2}}} pages {{{pages2}}}] | pages {{{pages2}}} }} }} | {{#if:{{{page2|}}} |, {{#if:{{{pageurl2|}}} | [{{{pageurl2}}} page&nbsp;{{{page2}}}] | page&nbsp;{{{page2}}} }} }} }}{{#if:{{{column2|}}}{{{columns2|}}} |, {{#if:{{{columnurl2|}}} | [{{{columnurl2}}} {{#if:{{{columns2|}}} | columns {{{columns2}}} | column {{{column2}}} }}] | {{#if:{{{columns2|}}} | columns {{{columns2}}} | column {{{column2}}} }} }} }}{{#if:{{{passage_block|}}} | {{#ifeq:{{{passage_block|}}}|no | {{#if:{{{passage|}}} |&#58; “{{{passage}}}{{#if:{{{translation|}}} |&#32;[{{{translation}}}] }}”{{#if:{{{footer|}}} |<dl><dd>{{{footer}}}</dd></dl> }} }} |&#58;<dl><dd>{{{passage_block}}}{{#if:{{{translation|}}} |<dl><dd>{{{translation}}}</dd></dl> }}{{#if:{{{footer|}}} |<dl><dd>{{{footer}}}</dd></dl> }}</dd></dl> }} | {{#if:{{{passage|}}} | {{#ifexpr:{{#invoke:string/templates|len_visible|{{{passage}}}}}>300 |&#58;<dl><dd>{{{passage}}}{{#if:{{{translation|}}} |<dl><dd>{{{translation}}}</dd></dl> }}{{#if:{{{footer|}}} |<dl><dd>{{{footer}}}</dd></dl> }}</dd></dl> |&#58; “{{{passage}}}{{#if:{{{translation|}}} |&#32;[{{{translation}}}] }}”{{#if:{{{footer|}}} |<dl><dd>{{{footer}}}</dd></dl> }} }} }} }}{{#if:{{{archiveurl|}}} | {{#if:{{{archivedate|}}} |<!--Do nothing--> | {{#ifeq:{{#invoke:string/templates|sub|{{{archiveurl}}}|9|23}}|web.archive.org |<!--Do nothing--> | [[Category:Quotations using archiveurl without archivedate]] }} }} }}{{#if:{{{usenodot|}}}|{{#if:{{{nodot|}}}||.}}}}</includeonly><noinclude>{{documentation}}</noinclude> 5855p6umj6nuixgo6ieebznll3kwlua ජර්මනිය 0 7452 238666 199923 2026-11-11T02:56:22Z Lee 19 238666 wikitext text/x-wiki == සිංහල == {{wp}} [[File:Germanic Languages Map Europe.png|thumb|right|250px|Major dialects of [[German]] and the [[Germanic]] languages across [[Central Europe]], [[Scandinavia]], and the [[British Isles]]]] [[File:Deutschland politisch 2010.png|thumb|right|250px|Cities and states of Germany]] === නිරුක්තිය === {{rfe|si}} === සංඥා නාම පදය === {{si-proper noun|~|ජර්මනිය|ජර්මනි}} # {{senseid|si|Q212}} {{ස්ථානය|si|country|r/Europe|capital=බර්ලින්}}. # {{ස්ථානය|si|c|coninent/යුරෝපය}} # [[යුරෝපය|යුරෝපයේ]] පිහිටි [[රට|රටකි]]. ====ගැලරිය==== <gallery widths="200px" heights="200px"> Image:Germanic tribes (750BC-1AD).png | Expansion of early Germanic tribes into [[Central Europe]] (Roman "[[Germania]]"), {{w|750 BC|750}}&ndash;{{w|1 BC|1}}{{nbsp}}{{B.C.}}<ref>Herman Kinder, ''Penguin Atlas of World History'', Vol. I, 1988, p. 108.</ref> File:Holy Roman Empire 11th century map-en.svg | The [[Holy Roman Empire]] c.{{nbsp}}{{w|1000}}, with the duchies comprising the notional 'Kingdom of the Germans' in green File:Deutsches Reich (1871-1918)-en.png | The [[German Empire]] and its [[constituent countries]] in {{w|1914}} File:NS administrative Gliederung 1944.png | [[Nazi Germany]] and its notional administrative divisions in {{w|1944}} File:Map-Germany-1945.svg | Occupied areas of Germany in 1945: The Soviet territory became [[East Germany]] and the rest [[West Germany]] </gallery> ====භාවිත සටහන්==== වර්තමානයේ දී {{m|si|ජර්මනිය}} යන වදන "Federal Republic of Germany" සඳහා භාවිතා වන මුත්, අතීතයේ දී [[නාසි ජර්මනිය]] වැනි යෙදුම් ද වෙන් කර දැක්විය හැකිය. ==== ව්‍යුත්පන්න යෙදුම් ==== {{derived terms|si |නැගෙනහිර ජර්මනිය |නාසි ජර්මනිය }} ==== Coordinate යෙදුම් ==== * {{list:countries of Europe/si}}{{topics|si|යුරෝපය තුළ රටවල්}} ==== ආශ්‍රිත යෙදුම් ==== * {{l|si|ජර්මානු}} ==== පරිවර්තන ==== {{trans-top|id=Q183|යුරෝපයේ පිහිටි රට}} * ඉංග්‍රීසි: {{t|en|Germany}} {{trans-bottom}} ===මූලාශ්‍ර=== <references/> {{topics|si|රටවල්|Place names|ජර්මනිය|යුරෝපය තුළ රටවල්}} gfca3avnfe0vg0fwf327ri4yxvi8b5i සැකිල්ල:defdate 10 7553 238697 27669 2026-04-15T03:53:24Z en>Chuck Entz 0 Changed protection settings for "[[Template:defdate]]" ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite)) 238697 wikitext text/x-wiki <templatestyles src="defdate/styles.css"/><span class="defdate"><nowiki>[</nowiki>{{{1}}}{{#if:{{{2|}}}|–{{{2}}}}}<nowiki>]</nowiki>{{#if:{{{ref|}}}{{{refn|}}}|{{ref|{{{ref|}}}|name={{#if:{{{refn|}}}|{{{refn}}}}}}}}}{{#if:{{{ref2|}}}{{{ref2n|}}}|{{ref|{{{ref2|}}}|name={{#if:{{{ref2n|}}}|{{{ref2n}}}}}}}}}{{#if:{{{ref3|}}}{{{ref3n|}}}|{{ref|{{{ref3|}}}|name={{#if:{{{ref3n|}}}|{{{ref3n}}}}}}}}}</span>{{#if:{{#invoke:string/templates|find|{{{1}}}|-||yes}}|{{#invoke:debug/templates|track|defdate/hyphen}}}}<noinclude>{{documentation}}</noinclude> hwax9q7q6l0bi0x84g5ffo41ddwxqu0 238698 238697 2026-11-11T03:27:20Z Lee 19 [[:en:Template:defdate]] වෙතින් එක් සංශෝධනයක් 238697 wikitext text/x-wiki <templatestyles src="defdate/styles.css"/><span class="defdate"><nowiki>[</nowiki>{{{1}}}{{#if:{{{2|}}}|–{{{2}}}}}<nowiki>]</nowiki>{{#if:{{{ref|}}}{{{refn|}}}|{{ref|{{{ref|}}}|name={{#if:{{{refn|}}}|{{{refn}}}}}}}}}{{#if:{{{ref2|}}}{{{ref2n|}}}|{{ref|{{{ref2|}}}|name={{#if:{{{ref2n|}}}|{{{ref2n}}}}}}}}}{{#if:{{{ref3|}}}{{{ref3n|}}}|{{ref|{{{ref3|}}}|name={{#if:{{{ref3n|}}}|{{{ref3n}}}}}}}}}</span>{{#if:{{#invoke:string/templates|find|{{{1}}}|-||yes}}|{{#invoke:debug/templates|track|defdate/hyphen}}}}<noinclude>{{documentation}}</noinclude> hwax9q7q6l0bi0x84g5ffo41ddwxqu0 සැකිල්ල:cite-web 10 7662 238667 164209 2026-08-20T19:32:21Z en>JeffDoozan 0 238667 wikitext text/x-wiki <includeonly>{{#invoke:quote|cite_t | alias = chapter: title,webpage; trans-chapter: trans-title,trans-webpage; chapterurl: titleurl,webpageurl; chapter_tlr: webpage_tlr; chapter_series: webpage_series; chapter_seriesvolume: webpage_seriesvolume; chapter_number: webpage_number; chapter_plain: title_plain,webpage_plain; title: site,work; trans-title: trans-site,trans-work; | noroman = chapter }}</includeonly><!-- --><noinclude><!-- -->{{documentation}}</noinclude> dvqdls6t7hbtfnbav7wvhxvmz8mou4i 238668 238667 2026-11-11T03:11:18Z Lee 19 [[:en:Template:cite-web]] වෙතින් එක් සංශෝධනයක් 238667 wikitext text/x-wiki <includeonly>{{#invoke:quote|cite_t | alias = chapter: title,webpage; trans-chapter: trans-title,trans-webpage; chapterurl: titleurl,webpageurl; chapter_tlr: webpage_tlr; chapter_series: webpage_series; chapter_seriesvolume: webpage_seriesvolume; chapter_number: webpage_number; chapter_plain: title_plain,webpage_plain; title: site,work; trans-title: trans-site,trans-work; | noroman = chapter }}</includeonly><!-- --><noinclude><!-- -->{{documentation}}</noinclude> dvqdls6t7hbtfnbav7wvhxvmz8mou4i මකාවෝ 0 8377 238715 182658 2026-11-11T03:34:05Z Lee 19 /* මූලාශ්‍ර */ 238715 wikitext text/x-wiki == සිංහල == {{wikipedia}} [[File:Txu-oclc-10552568-nf49-8.jpg|thumb|Map including '''MACAU''' {{lang|zh|澳門}} ({{w|Army Map Service|AMS}}, 1954)]] === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # {{m|en|Macau}} ලෙස ඉංග්‍රීසියෙන් දක්වන රට # A Special Administrative Region of the People's Republic of China just west of [[Hong Kong]], previously under [[Portuguese]] control. #* {{quote-book |en |url=https://archive.org/details/lccn_0884297976/ |year=1990 |title=Macau |author=Shann Davies |publisher=Passport Books |ISBN=0-8842-9797-6 |page=[https://archive.org/details/lccn_0884297976/page/10 10]}} #*:Within 20 years, '''Macau''' had become an international city and one of the richest places on earth, thanks to investment in the cargoes shipped through the port. ==== පරිවර්තන ==== {{trans-top|a city just west of Hong Kong}} * Arabic: {{t|ar|ماكاو|m|tr=makao}}, {{t|ar|أَوْمِين|m}} * Armenian: {{t|hy|Մակաո}}, {{t+|hy|Աոմին}} * Assamese: {{t|as|মাকাও}} * Azerbaijani: {{t+|az|Makao}} * ඉංග්‍රීසි: {{t|en|Macau}} * Belarusian: {{t|be|Аамы́нь|m}}, {{t|be|Мака́о|m}} * Bengali: {{t|bn|মাকাও}} * Bulgarian: {{t+|bg|Макао|n}}, {{t|bg|А́омън|m}}, {{t|bg|А́омен|m}} * Burmese: {{t|my|မကာအို|sc=Mymr}} * Catalan: {{t+|ca|Macau}} * Chinese: *: Cantonese: {{t|yue|澳門}}, {{t|yue|澳门|tr=ou3 mun4, ou3 mun4-2}}, {{t|yue|馬交}}, {{t|yue|马交|tr=maa5 gaau1}} {{qualifier|rare, colloquial}} *: Hakka: {{t|hak|澳門}}, {{t|hak|澳门|tr=O-mùn, Àu-mûn}} *: Mandarin: {{t+|cmn|澳門}}, {{t+|cmn|澳门|tr=Àomén}} *: Min Dong: {{t|cdo|澳門}}, {{t|cdo|澳门|tr=Ó̤-muòng}} *: Min Nan: {{t|nan|澳門}}, {{t|nan|澳门|tr=Ò-mn̂g, Ò-mûi, Ò-bûn}} *: Wu: {{t|wuu|澳門}}, {{t|wuu|澳门|tr=au men}} * Czech: {{t+|cs|Macao}} * Danish: {{t|da|Macao}} * Dhivehi: {{t|dv|މަކާއޫ|sc=Thaa}} * Esperanto: {{t|eo|Makao}} * Estonian: {{t+|et|Macau}}, {{t|et|Aomen}} {{qualifier|seldom}} * Finnish: {{t+|fi|Macao}} * French: {{t+|fr|Macao|m}} * Georgian: {{t|ka|მაკაო}} * German: {{t+|de|Macao}} * Greek: {{t|el|Μακάου}} * Hebrew: {{t|he|מקאו|tr=makao}} * හින්දි: {{t|hi|मकाओ}} * Hungarian: {{t+|hu|Makaó}} * Icelandic: {{t|is|Makaó|n}} * Italian: {{t|it|Macao}} * ජපන්: {{t|ja|澳門|tr=マカオ, Makao}}, {{t|ja|マカオ|tr=Makao}}, {{t|ja|アオメン|tr=Aomen}} * Kannada: {{t|kn|ಮಕಾವು|sc=Knda}} * Kazakh: {{t|kk|Аумын|sc=Cyrl}}, {{t|kk|Макао}} * Khmer: {{t|km|ម៉ាកាវ}} * Korean: {{t|ko|^마카오}}, {{t+|ko|^오문(澳門)}}, {{t|ko|^아오먼}} * Kyrgyz: {{t+|ky|Макао}} * Latvian: {{t|lv|Makao}}, {{t|lv|Aomiņa}} * Lithuanian: {{t+|lt|Makao}}, {{t+|lt|Aomenas|m}} * Macedonian: {{t|mk|Мака́о|n}} * Malay: {{t|ms|Makau}} * Malayalam: {{t|ml|മകൗ|sc=Mlym}} * Maori: {{t|mi|Makau}} * Mongolian: {{t|mn|Аомэн|sc=Cyrl}}, {{t|mn|Макао|sc=Cyrl}} * Norman: {{t|nrf|Macao|m}} * Norwegian: *: Bokmål: {{t|nb|Macao}} * Ossetian: {{t|os|Макао|sc=Cyrl}} * Persian: {{t|fa|ماکائو|tr=mâkâo}} * Polish: {{t+|pl|Macao|n}}, {{t+|pl|Makau|n}} * Portuguese: {{t+|pt|Macau}} * Romanian: {{t|ro|Macao}} * Russian: {{t+|ru|Мака́о|m}}, {{t+|ru|Аомы́нь|m}} (''older transliteration but common''), {{t|ru|Аомэ́нь|m}} (''rare spelling, new transliteration'') * Serbo-Croatian: *: Cyrillic: {{t|sh|Макао|m|sc=Cyrl}}, {{t|sh|Макау|m|sc=Cyrl}} *: Roman: {{t|sh|Makao|m}}, {{t|sh|Makau|m}} * Spanish: {{t|es|Macau}} * Tagalog: {{t|tl|Makaw}} * Tajik: {{t|tg|Аомин}}, {{t|tg|Аомэн}}, {{t|tg|Макао}} * දෙමළ: {{t|ta|மக்காவு|sc=Taml}} * Telugu: {{t|te|మకావు|sc=Telu}} * Thai: {{t+|th|มาเก๊า}}, {{t|th|อ้าวเหมิน}} * Turkmen: {{t|tk|Makao}} * Ukrainian: {{t|uk|Аоми́нь|m}}, {{t|uk|Мака́о|m}} * Urdu: {{t|ur|مکاؤ|tr=makā'o}} * Uzbek: {{t|uz|Makao}} * Vietnamese: {{t|vi|Ma Cao}}, {{t|vi|Áo Môn}} * Zhuang: {{t|za|Aumwnz}} {{trans-bottom}} ===මූලාශ්‍ර=== <references/> * {{R:Merriam-Webster Online}} {{c|si|Macau}} pznsjlnelftzqcnsbt69k4b52ikv6u3 Module:category tree 828 9502 238729 230507 2026-08-30T16:40:49Z en>Benwing2 0 fix {{auto cat}} handling of "in Foo script" so [[:Category:Translingual letters in flag semaphore]] is handled 238729 Scribunto text/plain -- Prevent substitution. if mw.isSubsting() then return require("Module:unsubst") end local export = {} local category_tree_submodule_prefix = "Module:category tree/" local category_tree_styles_css = "Module:category tree/styles.css" local m_str_utils = require("Module:string utilities") local m_template_parser = require("Module:template parser") local m_utilities = require("Module:utilities") local ceil = math.ceil local class_else_type = m_template_parser.class_else_type local concat = table.concat local deep_copy = require("Module:table").deepCopy local full_url = mw.uri.fullUrl local insert = table.insert local is_callable = require("Module:fun").is_callable local log10 = math.log10 or require("Module:math").log10 local new_title = mw.title.new local pages_in_category = mw.site.stats.pagesInCategory local parse = m_template_parser.parse local remove_comments = require("Module:string/removeComments") local sort = table.sort local split = m_str_utils.split local string_compare = require("Module:string/compare") local trim = m_str_utils.trim local uupper = m_str_utils.upper local yesno = require("Module:yesno") local current_frame = mw.getCurrentFrame() local current_title = mw.title.getCurrentTitle() local namespace = current_title.namespace local poscatboiler_subsystem = "poscatboiler" local extra_args_error = "Extra arguments to {{((}}auto cat{{))}} are not allowed for this category." -- Generates a sortkey for a numeral `n`, adding leading zeroes to avoid the "1, 10, 2, 3" sorting problem. `max_n` is the greatest expected value of `n`, and is used to determine how many leading zeroes are needed. If not supplied, it defaults to the number of languages. function export.numeral_sortkey(n, max_n) max_n = max_n or require("Module:list of languages").count() return ("#%%0%dd"):format(ceil(log10(max_n + 1))):format(n) end function export.split_lang_label(title_text) local getByCanonicalName = require("Module:languages").getByCanonicalName -- Progressively remove a word from the potential canonical name until it -- matches an actual canonical name. local words = split(title_text, " ", true) for i = #words - 1, 1, -1 do local lang = getByCanonicalName(concat(words, " ", 1, i)) if lang then return lang, concat(words, " ", i + 1) end end return nil, title_text end local function show_error(text, title) return require("Module:message box").maintenance( "red", "[[File:Codex icon Alert red.svg|40px|alt=alert]]", title or "This category is not defined in Wiktionary's category tree.", text ) end local function error_not_in_category_tree() error( "This category is not defined in Wiktionary's category tree. " .. "Double-check the category name for typos. " .. "Search existing categories or request definition at [[Wiktionary:Category and label treatment requests|WT:CLTR]]. " .. "Affected category: " .. current_title.fullText, 2 ) end -- Show the text that goes at the very top right of the page. local function show_topright(current) return current.getTopright and current:getTopright() or nil end local function link_box(content) return ("<div class=\"noprint plainlinks\" style=\"float: right; clear: both; margin: 0 0 .5em 1em; background: var(--wikt-palette-paleblue, #f9f9f9); border: 1px var(--border-color-base, #aaaaaa) solid; margin-top: -1px; padding: 5px; font-weight: bold;\">%s</div>"):format(content) end local function show_editlink(current) return link_box(("[%s Edit category data]"):format(tostring(full_url(current:getDataModule(), "action=edit")))) end local function show_related_changes() local title = current_title.fullText return link_box(("[%s <span title=\"Recent edits and other changes to pages in %s\">Recent changes</span>]"):format( tostring(full_url("Special:RecentChangesLinked", { target = title, showlinkedto = 0, })), title )) end local function show_pagelist(current) local namespace = "namespace=" local info = current:getInfo() local lang_code = info.code if info.label == "citations" or info.label == "citations of undefined terms" then namespace = namespace .. "Citations" elseif lang_code then local lang = require("Module:languages").getByCode(lang_code, true, true) if lang then -- Proto-Norse (gmq-pro) is probably the only language with a code ending in -pro -- that's intended to have mostly non-reconstructed entries. if (lang_code:find("%-pro$") and lang_code ~= "gmq-pro") or lang:hasType("reconstructed") then namespace = namespace .. "Reconstruction" elseif lang:hasType("appendix-constructed") then namespace = namespace .. "Appendix" end end elseif info.label:match("templates") then namespace = namespace .. "Template" elseif info.label:match("modules") then namespace = namespace .. "Module" elseif info.label:match("^Wiktionary") or info.label:match("^Pages") then namespace = "" end return ([=[ {| id="newest-and-oldest-pages" class="wikitable mw-collapsible" style="float: right; clear: both; margin: 0 0 .5em 1em;" ! Newest and oldest pages&nbsp; |- | id="recent-additions" style="font-size:0.9em;" | '''Newest pages ordered by last [[mw:Manual:Categorylinks table#cl_timestamp|category link update]]:''' %s |- | id="oldest-pages" style="font-size:0.9em;" | '''Oldest pages ordered by last edit:''' %s |}]=]):format( current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=categoryadd order=descending]=] ):format(current_title.text, namespace) ), current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=lastedit order=ascending]=] ):format(current_title.text, namespace) ) ) end -- Show navigational "breadcrumbs" at the top of the page. local function show_breadcrumbs(current) local steps = {} -- Start at the current label and move our way up the "chain" from child to parent, until we can't go further. while current do local category, display_name, nocap if type(current) == "string" then category = current display_name = current:gsub("^Category:", "") else if not current.getCategoryName then error("Internal error: Bad format in breadcrumb chain structure, probably a misformatted value for `parents`: " .. mw.dumpObject(current)) end category = "Category:" .. current:getCategoryName() display_name, nocap = current:getBreadcrumbName() end if not nocap then display_name = mw.getContentLanguage():ucfirst(display_name) end insert(steps, 1, ("[[:%s|%s]]"):format(category, display_name)) -- Move up the "chain" by one level. if type(current) == "string" then current = nil else current = current:getParents() end if current then current = current[1].name end end local templateStyles = require("Module:TemplateStyles")(category_tree_styles_css) local ol = mw.html.create("ol") for i, step in ipairs(steps) do local li = mw.html.create("li") if i ~= 1 then local span = mw.html.create("span") :attr("aria-hidden", "true") :addClass("ts-categoryBreadcrumbs-separator") :wikitext(" » ") li:node(span) end li:wikitext(step) ol:node(li) end return templateStyles .. tostring(mw.html.create("div") :attr("role", "navigation") :attr("aria-label", "Breadcrumb") :addClass("ts-categoryBreadcrumbs") :node(ol)) end local function show_also(current) local also = current._info.also if also and #also > 0 then return ('<div style="margin-top:-1em;margin-bottom:1.5em">%s</div>'):format(require("Module:also").main(also)) end return nil end -- Show a short description text for the category. local function show_description(current) return current.getDescription and current:getDescription() or nil end local function show_appendix(current) local appendix = current.getAppendix and current:getAppendix() return appendix and ("For more information, see [[%s]]."):format(appendix) or nil end local function sort_children(child1, child2) return string_compare(uupper(child1.sort), uupper(child2.sort)) end -- Show a list of child categories. local function show_children(current) local children = current.getChildren and current:getChildren() or nil if not children then return nil end sort(children, sort_children) local children_list = {} for _, child in ipairs(children) do local child_name, child_pagetitle = child.name if type(child_name) == "string" then child_pagetitle = child_name else child_pagetitle = "Category:" .. child_name:getCategoryName() end if new_title(child_pagetitle).exists then insert(children_list, ("* [[:%s]]: %s"):format( child_pagetitle, child.description or type(child_name) == "string" and child_name:gsub("^Category:", "") .. "." or child_name:getDescription("child") )) end end return concat(children_list, "\n") end -- Show a table of contents with links to each letter in the language's script. local function show_TOC(current) local titleText = current_title.text local inCategoryPages = pages_in_category(titleText, "pages") local inCategorySubcats = pages_in_category(titleText, "subcats") local TOC_type -- Compute type of table of contents required. if inCategoryPages > 2500 or inCategorySubcats > 2500 then TOC_type = "full" elseif inCategoryPages > 200 or inCategorySubcats > 200 then TOC_type = "normal" else -- No (usual) need for a TOC if all pages or subcategories can fit on one page; -- but allow this to be overridden by a custom TOC handler. TOC_type = "none" end if current.getTOC then local TOC_text = current:getTOC(TOC_type) if TOC_text ~= true then return TOC_text or nil end end if TOC_type ~= "none" then local templatename = current:getTOCTemplateName() local TOC_template if TOC_type == "full" then -- This category is very large, see if there is a "full" version of the TOC. local TOC_template_full = new_title(templatename .. "/full") if TOC_template_full.exists then TOC_template = TOC_template_full end end if not TOC_template then local TOC_template_normal = new_title(templatename) if TOC_template_normal.exists then TOC_template = TOC_template_normal end end if TOC_template then return current_frame:expandTemplate{title = TOC_template.text, args = {}} end end return nil end -- Show the "catfix" that adds language attributes and script classes to the page. local function show_catfix(current) local lang, sc = current:getCatfixInfo() return lang and m_utilities.catfix(lang, sc) or nil end -- Show the parent categories that the current category should be placed in. local function show_categories(current, categories) local parents = current.getParents and current:getParents() or nil if not parents then return nil end for _, parent in ipairs(parents) do local parent_name = parent.name local sortkey = type(parent.sort) == "table" and parent.sort:makeSortKey() or parent.sort if type(parent_name) == "string" then insert(categories, ("[[%s|%s]]"):format(parent_name, sortkey)) else insert(categories, ("[[Category:%s|%s]]"):format(parent_name:getCategoryName(), sortkey)) end end -- Also put the category in its corresponding "umbrella" or "by language" category. local umbrella = current:getUmbrella() if umbrella then -- FIXME: use a language-neutral sorting function like the Unicode Collation Algorithm. local sortkey = current._lang and current._lang:getCanonicalName() or current:getCategoryName() sortkey = require("Module:languages").getByCode("en", true):makeSortKey(sortkey) if type(umbrella) == "string" then insert(categories, ("[[%s|%s]]"):format(umbrella, sortkey)) else insert(categories, ("[[Category:%s|%s]]"):format(umbrella:getCategoryName(), sortkey)) end end -- Check for various unwanted parser functions, which should be integrated into the category tree data instead. -- Note: HTML comments shouldn't be removed from `content` until after this step, as they can affect the result. local content = current_title:getContent() if not content then -- This happens when using [[Special:ExpandTemplates]] to call {{auto cat}} on a nonexistent category page, -- which is needed by Benwing's create_wanted_categories.py script. return end local defaultsort, displaytitle, page_has_param for node in parse(content):iterate_nodes() do local node_class = class_else_type(node) if node_class == "template" then local name = node:get_name() if name == "DEFAULTSORT:" and not defaultsort then insert(categories, "[[Category:Pages with DEFAULTSORT conflicts]]") defaultsort = true elseif name == "DISPLAYTITLE:" and not displaytitle then insert(categories,"[[Category:Pages with DISPLAYTITLE conflicts]]") displaytitle = true end elseif node_class == "parameter" and not page_has_param then insert(categories,"[[Category:Pages with raw triple-brace template parameters]]") page_has_param = true end end -- Check for raw category markup, which should also be integrated into the category tree data. content = remove_comments(content, "BOTH") local head = content:find("[[", 1, true) while head do local close = content:find("]]", head + 2, true) if not close then break end -- Make sure there are no intervening "[[" between head and close. local open = content:find("[[", head + 2, true) while open and open < close do head = open open = content:find("[[", head + 2, true) end local cat = content:sub(head + 2, close - 1) local colon = cat:match("^[ _\128-\244]*[Cc][Aa][Tt][EeGgOoRrYy _\128-\244]*():") if colon then local pipe = cat:find("|", colon + 1, true) if pipe ~= #cat then local title = new_title(pipe and cat:sub(1, pipe - 1) or cat) if title and title.namespace == 14 then insert(categories,"[[Category:Categories with categories using raw markup]]") break end end end head = open end end local function generate_output(current) if current then for _, functionName in pairs{ "getBreadcrumbName", "getDataModule", "canBeEmpty", "getDescription", "getParents", "getChildren", "getUmbrella", "getAppendix", "getTOCTemplateName", } do if not is_callable(current[functionName]) then require("Module:debug").track{"category tree/missing function", "category tree/missing function/" .. functionName} end end end local boxes, display, categories = {}, {}, {} -- Categories should never show files as a gallery. insert(categories, "__NOGALLERY__") if current_frame:getParent():getTitle() == "Template:auto cat" then insert(categories, "[[Category:Categories calling Template:auto cat]]") end -- Check if the category is empty local totalPages = pages_in_category(current_title.text, "all") local hugeCategory = totalPages > 1000000 -- 1 million -- Categorize huge categories, as they cause DynamicPageList to time out and make the category inaccessible. if hugeCategory then insert(categories, "[[Category:Huge categories]]") end -- Are the parameters valid? if not current then -- Signal failure so export.show can try the next handler. return nil, true end -- Does the category have the correct name? local currentName = current:getCategoryName() local correctName = current_title.text == currentName if not correctName then insert(categories, "[[Category:Categories with incorrect names]]") insert(display, show_error( ("Based on the data in the category tree, this category should be called '''[[:Category:%s]]'''."):format(currentName), "This category has an incorrect name." )) end -- Add cleanup category for empty categories. local canBeEmpty = current:canBeEmpty() if canBeEmpty and correctName then insert(categories, " __EXPECTUNUSEDCATEGORY__") elseif totalPages == 0 then insert(categories, "[[Category:Empty categories]]") end if current:isHidden() then insert(categories, " __HIDDENCAT__") end -- Put all the float-right stuff into a <div> that does not clear, so that float-left stuff like the breadcrumbs and -- description can go opposite the float-right stuff without vertical space. insert(boxes, "<div style=\"float: right;\">") insert(boxes, show_topright(current)) insert(boxes, show_editlink(current)) insert(boxes, show_related_changes()) -- Show pagelist, unless it's a huge category (since they can't use DynamicPageList - see above). if not hugeCategory then insert(boxes, show_pagelist(current)) end insert(boxes, "</div>") -- Generate the displayed information insert(display, show_breadcrumbs(current)) insert(display, show_also(current)) insert(display, show_description(current)) insert(display, show_appendix(current)) insert(display, show_children(current)) insert(display, show_TOC(current)) insert(display, show_catfix(current)) insert(display, '<br class="clear-both-in-vector-2022-only">') show_categories(current, categories) return concat(boxes, "\n") .. "\n" .. concat(display, "\n\n") .. concat(categories, "") end --[==[ List of handler functions that try to match the page name. A handler should return the name of a submodule to [[Module:category tree]] and an info table which is passed as an argument to the submodule. If a handler does not recognize the page name, it should return nil. Note that the order of handlers matters! ]==] local handlers = {} -- Thesaurus per-language category insert(handlers, function(title) local code, label = title:match("^Thesaurus:(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Topic per-language category insert(handlers, function(title) local code, label = title:match("^(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Lect category e.g. for [[:Category:New Zealand English]] or [[:Category:Issime Walser]] insert(handlers, function(title, args) local lect = args.lect or args.dialect if lect ~= "" and yesno(lect, true) then -- Same as boolean in [[Module:parameters]]. return poscatboiler_subsystem, {label = title, args = args, raw = true} end end) -- poscatboiler per-language label, e.g. [[Category:English non-lemma forms]] insert(handlers, function(title, args) local lang, label = export.split_lang_label(title) if not lang then return end local baseLabel, script = label:match("(.+) in (.-)$") if script and baseLabel ~= "terms" then local scriptObj = require("Module:scripts").getByCategoryName(script) if scriptObj then return poscatboiler_subsystem, {label = baseLabel, code = lang:getCode(), sc = scriptObj:getCode(), args = args} end end return poscatboiler_subsystem, {label = label, code = lang:getCode(), args = args} end) -- poscatboiler label umbrella category insert(handlers, function(title, args) local label = title:match("(.+) by language$") if label then -- The poscatboiler code will appropriately lowercase if needed. return poscatboiler_subsystem, {label = label, args = args} end end) -- poscatboiler raw handlers insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args, raw = true} end) -- poscatboiler umbrella handlers without 'by language' insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args} end) function export.show(frame) local args, other_args = require("Module:parameters").process(frame:getParent().args, { ["also"] = {type = "title", sublist = "comma without whitespace", namespace = 14} }, true) if args.also then for k, arg in next, args.also do args.also[k] = arg.prefixedText end end for k, arg in next, other_args do other_args[k] = trim(arg) end if namespace == 10 then -- Template return "(This template should be used on pages in the [[Help:Namespaces#Category|Category:]] namespace.)" elseif namespace ~= 14 then -- Category error("This template/module can only be used on pages in the [[mw:Help:Namespaces#Category|Category:]] namespace.") end local saw_tree_lookup_failure = false local failure_consumed_args = false -- Go through each handler in turn. If a handler doesn't recognize the format of the category, it will return nil, -- and we will consider the next handler. Otherwise, it returns a template name and arguments to call it with, but -- even then, that template might return an error, and we need to consider the next handler. This happens, for -- example, with the category "CAT:Mato Grosso, Brazil", where "Mato" is the name of a language, so the poscatboiler -- per-language label handler fires and tries to find a label "Grosso, Brazil". This throws an error, and -- previously, this blocked further handler consideration, but now we check for the error and continue checking -- handlers; eventually, the topic umbrella handler will fire and correctly handle the category. for _, handler in ipairs(handlers) do -- Use a new title object and args table for each handler, to keep them isolated. local submodule, info = handler(current_title.text, deep_copy(other_args)) if submodule then info.also = deep_copy(args.also) require("Module:debug").track("auto cat/" .. submodule) -- `failed` is true if no match was found in the category tree. submodule = require(category_tree_submodule_prefix .. submodule) local cattext, failed = generate_output(submodule.main(info)) if failed then saw_tree_lookup_failure = true failure_consumed_args = failure_consumed_args or not not info.args elseif not info.args and next(other_args) then error(extra_args_error) else return cattext end end end -- No handler produced a valid category-tree match. -- Preserve previous behavior: if no failing handler consumed args, surface extra-arg errors first. if saw_tree_lookup_failure and not failure_consumed_args and next(other_args) then error(extra_args_error) end error_not_in_category_tree() end -- TODO: new test entrypoint. return export 20082foazy5jvfa9vdvvqoxes2njf6y 238730 238729 2026-11-11T11:01:55Z Lee 19 [[:en:Module:category_tree]] වෙතින් එක් සංශෝධනයක් 238729 Scribunto text/plain -- Prevent substitution. if mw.isSubsting() then return require("Module:unsubst") end local export = {} local category_tree_submodule_prefix = "Module:category tree/" local category_tree_styles_css = "Module:category tree/styles.css" local m_str_utils = require("Module:string utilities") local m_template_parser = require("Module:template parser") local m_utilities = require("Module:utilities") local ceil = math.ceil local class_else_type = m_template_parser.class_else_type local concat = table.concat local deep_copy = require("Module:table").deepCopy local full_url = mw.uri.fullUrl local insert = table.insert local is_callable = require("Module:fun").is_callable local log10 = math.log10 or require("Module:math").log10 local new_title = mw.title.new local pages_in_category = mw.site.stats.pagesInCategory local parse = m_template_parser.parse local remove_comments = require("Module:string/removeComments") local sort = table.sort local split = m_str_utils.split local string_compare = require("Module:string/compare") local trim = m_str_utils.trim local uupper = m_str_utils.upper local yesno = require("Module:yesno") local current_frame = mw.getCurrentFrame() local current_title = mw.title.getCurrentTitle() local namespace = current_title.namespace local poscatboiler_subsystem = "poscatboiler" local extra_args_error = "Extra arguments to {{((}}auto cat{{))}} are not allowed for this category." -- Generates a sortkey for a numeral `n`, adding leading zeroes to avoid the "1, 10, 2, 3" sorting problem. `max_n` is the greatest expected value of `n`, and is used to determine how many leading zeroes are needed. If not supplied, it defaults to the number of languages. function export.numeral_sortkey(n, max_n) max_n = max_n or require("Module:list of languages").count() return ("#%%0%dd"):format(ceil(log10(max_n + 1))):format(n) end function export.split_lang_label(title_text) local getByCanonicalName = require("Module:languages").getByCanonicalName -- Progressively remove a word from the potential canonical name until it -- matches an actual canonical name. local words = split(title_text, " ", true) for i = #words - 1, 1, -1 do local lang = getByCanonicalName(concat(words, " ", 1, i)) if lang then return lang, concat(words, " ", i + 1) end end return nil, title_text end local function show_error(text, title) return require("Module:message box").maintenance( "red", "[[File:Codex icon Alert red.svg|40px|alt=alert]]", title or "This category is not defined in Wiktionary's category tree.", text ) end local function error_not_in_category_tree() error( "This category is not defined in Wiktionary's category tree. " .. "Double-check the category name for typos. " .. "Search existing categories or request definition at [[Wiktionary:Category and label treatment requests|WT:CLTR]]. " .. "Affected category: " .. current_title.fullText, 2 ) end -- Show the text that goes at the very top right of the page. local function show_topright(current) return current.getTopright and current:getTopright() or nil end local function link_box(content) return ("<div class=\"noprint plainlinks\" style=\"float: right; clear: both; margin: 0 0 .5em 1em; background: var(--wikt-palette-paleblue, #f9f9f9); border: 1px var(--border-color-base, #aaaaaa) solid; margin-top: -1px; padding: 5px; font-weight: bold;\">%s</div>"):format(content) end local function show_editlink(current) return link_box(("[%s Edit category data]"):format(tostring(full_url(current:getDataModule(), "action=edit")))) end local function show_related_changes() local title = current_title.fullText return link_box(("[%s <span title=\"Recent edits and other changes to pages in %s\">Recent changes</span>]"):format( tostring(full_url("Special:RecentChangesLinked", { target = title, showlinkedto = 0, })), title )) end local function show_pagelist(current) local namespace = "namespace=" local info = current:getInfo() local lang_code = info.code if info.label == "citations" or info.label == "citations of undefined terms" then namespace = namespace .. "Citations" elseif lang_code then local lang = require("Module:languages").getByCode(lang_code, true, true) if lang then -- Proto-Norse (gmq-pro) is probably the only language with a code ending in -pro -- that's intended to have mostly non-reconstructed entries. if (lang_code:find("%-pro$") and lang_code ~= "gmq-pro") or lang:hasType("reconstructed") then namespace = namespace .. "Reconstruction" elseif lang:hasType("appendix-constructed") then namespace = namespace .. "Appendix" end end elseif info.label:match("templates") then namespace = namespace .. "Template" elseif info.label:match("modules") then namespace = namespace .. "Module" elseif info.label:match("^Wiktionary") or info.label:match("^Pages") then namespace = "" end return ([=[ {| id="newest-and-oldest-pages" class="wikitable mw-collapsible" style="float: right; clear: both; margin: 0 0 .5em 1em;" ! Newest and oldest pages&nbsp; |- | id="recent-additions" style="font-size:0.9em;" | '''Newest pages ordered by last [[mw:Manual:Categorylinks table#cl_timestamp|category link update]]:''' %s |- | id="oldest-pages" style="font-size:0.9em;" | '''Oldest pages ordered by last edit:''' %s |}]=]):format( current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=categoryadd order=descending]=] ):format(current_title.text, namespace) ), current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=lastedit order=ascending]=] ):format(current_title.text, namespace) ) ) end -- Show navigational "breadcrumbs" at the top of the page. local function show_breadcrumbs(current) local steps = {} -- Start at the current label and move our way up the "chain" from child to parent, until we can't go further. while current do local category, display_name, nocap if type(current) == "string" then category = current display_name = current:gsub("^Category:", "") else if not current.getCategoryName then error("Internal error: Bad format in breadcrumb chain structure, probably a misformatted value for `parents`: " .. mw.dumpObject(current)) end category = "Category:" .. current:getCategoryName() display_name, nocap = current:getBreadcrumbName() end if not nocap then display_name = mw.getContentLanguage():ucfirst(display_name) end insert(steps, 1, ("[[:%s|%s]]"):format(category, display_name)) -- Move up the "chain" by one level. if type(current) == "string" then current = nil else current = current:getParents() end if current then current = current[1].name end end local templateStyles = require("Module:TemplateStyles")(category_tree_styles_css) local ol = mw.html.create("ol") for i, step in ipairs(steps) do local li = mw.html.create("li") if i ~= 1 then local span = mw.html.create("span") :attr("aria-hidden", "true") :addClass("ts-categoryBreadcrumbs-separator") :wikitext(" » ") li:node(span) end li:wikitext(step) ol:node(li) end return templateStyles .. tostring(mw.html.create("div") :attr("role", "navigation") :attr("aria-label", "Breadcrumb") :addClass("ts-categoryBreadcrumbs") :node(ol)) end local function show_also(current) local also = current._info.also if also and #also > 0 then return ('<div style="margin-top:-1em;margin-bottom:1.5em">%s</div>'):format(require("Module:also").main(also)) end return nil end -- Show a short description text for the category. local function show_description(current) return current.getDescription and current:getDescription() or nil end local function show_appendix(current) local appendix = current.getAppendix and current:getAppendix() return appendix and ("For more information, see [[%s]]."):format(appendix) or nil end local function sort_children(child1, child2) return string_compare(uupper(child1.sort), uupper(child2.sort)) end -- Show a list of child categories. local function show_children(current) local children = current.getChildren and current:getChildren() or nil if not children then return nil end sort(children, sort_children) local children_list = {} for _, child in ipairs(children) do local child_name, child_pagetitle = child.name if type(child_name) == "string" then child_pagetitle = child_name else child_pagetitle = "Category:" .. child_name:getCategoryName() end if new_title(child_pagetitle).exists then insert(children_list, ("* [[:%s]]: %s"):format( child_pagetitle, child.description or type(child_name) == "string" and child_name:gsub("^Category:", "") .. "." or child_name:getDescription("child") )) end end return concat(children_list, "\n") end -- Show a table of contents with links to each letter in the language's script. local function show_TOC(current) local titleText = current_title.text local inCategoryPages = pages_in_category(titleText, "pages") local inCategorySubcats = pages_in_category(titleText, "subcats") local TOC_type -- Compute type of table of contents required. if inCategoryPages > 2500 or inCategorySubcats > 2500 then TOC_type = "full" elseif inCategoryPages > 200 or inCategorySubcats > 200 then TOC_type = "normal" else -- No (usual) need for a TOC if all pages or subcategories can fit on one page; -- but allow this to be overridden by a custom TOC handler. TOC_type = "none" end if current.getTOC then local TOC_text = current:getTOC(TOC_type) if TOC_text ~= true then return TOC_text or nil end end if TOC_type ~= "none" then local templatename = current:getTOCTemplateName() local TOC_template if TOC_type == "full" then -- This category is very large, see if there is a "full" version of the TOC. local TOC_template_full = new_title(templatename .. "/full") if TOC_template_full.exists then TOC_template = TOC_template_full end end if not TOC_template then local TOC_template_normal = new_title(templatename) if TOC_template_normal.exists then TOC_template = TOC_template_normal end end if TOC_template then return current_frame:expandTemplate{title = TOC_template.text, args = {}} end end return nil end -- Show the "catfix" that adds language attributes and script classes to the page. local function show_catfix(current) local lang, sc = current:getCatfixInfo() return lang and m_utilities.catfix(lang, sc) or nil end -- Show the parent categories that the current category should be placed in. local function show_categories(current, categories) local parents = current.getParents and current:getParents() or nil if not parents then return nil end for _, parent in ipairs(parents) do local parent_name = parent.name local sortkey = type(parent.sort) == "table" and parent.sort:makeSortKey() or parent.sort if type(parent_name) == "string" then insert(categories, ("[[%s|%s]]"):format(parent_name, sortkey)) else insert(categories, ("[[Category:%s|%s]]"):format(parent_name:getCategoryName(), sortkey)) end end -- Also put the category in its corresponding "umbrella" or "by language" category. local umbrella = current:getUmbrella() if umbrella then -- FIXME: use a language-neutral sorting function like the Unicode Collation Algorithm. local sortkey = current._lang and current._lang:getCanonicalName() or current:getCategoryName() sortkey = require("Module:languages").getByCode("en", true):makeSortKey(sortkey) if type(umbrella) == "string" then insert(categories, ("[[%s|%s]]"):format(umbrella, sortkey)) else insert(categories, ("[[Category:%s|%s]]"):format(umbrella:getCategoryName(), sortkey)) end end -- Check for various unwanted parser functions, which should be integrated into the category tree data instead. -- Note: HTML comments shouldn't be removed from `content` until after this step, as they can affect the result. local content = current_title:getContent() if not content then -- This happens when using [[Special:ExpandTemplates]] to call {{auto cat}} on a nonexistent category page, -- which is needed by Benwing's create_wanted_categories.py script. return end local defaultsort, displaytitle, page_has_param for node in parse(content):iterate_nodes() do local node_class = class_else_type(node) if node_class == "template" then local name = node:get_name() if name == "DEFAULTSORT:" and not defaultsort then insert(categories, "[[Category:Pages with DEFAULTSORT conflicts]]") defaultsort = true elseif name == "DISPLAYTITLE:" and not displaytitle then insert(categories,"[[Category:Pages with DISPLAYTITLE conflicts]]") displaytitle = true end elseif node_class == "parameter" and not page_has_param then insert(categories,"[[Category:Pages with raw triple-brace template parameters]]") page_has_param = true end end -- Check for raw category markup, which should also be integrated into the category tree data. content = remove_comments(content, "BOTH") local head = content:find("[[", 1, true) while head do local close = content:find("]]", head + 2, true) if not close then break end -- Make sure there are no intervening "[[" between head and close. local open = content:find("[[", head + 2, true) while open and open < close do head = open open = content:find("[[", head + 2, true) end local cat = content:sub(head + 2, close - 1) local colon = cat:match("^[ _\128-\244]*[Cc][Aa][Tt][EeGgOoRrYy _\128-\244]*():") if colon then local pipe = cat:find("|", colon + 1, true) if pipe ~= #cat then local title = new_title(pipe and cat:sub(1, pipe - 1) or cat) if title and title.namespace == 14 then insert(categories,"[[Category:Categories with categories using raw markup]]") break end end end head = open end end local function generate_output(current) if current then for _, functionName in pairs{ "getBreadcrumbName", "getDataModule", "canBeEmpty", "getDescription", "getParents", "getChildren", "getUmbrella", "getAppendix", "getTOCTemplateName", } do if not is_callable(current[functionName]) then require("Module:debug").track{"category tree/missing function", "category tree/missing function/" .. functionName} end end end local boxes, display, categories = {}, {}, {} -- Categories should never show files as a gallery. insert(categories, "__NOGALLERY__") if current_frame:getParent():getTitle() == "Template:auto cat" then insert(categories, "[[Category:Categories calling Template:auto cat]]") end -- Check if the category is empty local totalPages = pages_in_category(current_title.text, "all") local hugeCategory = totalPages > 1000000 -- 1 million -- Categorize huge categories, as they cause DynamicPageList to time out and make the category inaccessible. if hugeCategory then insert(categories, "[[Category:Huge categories]]") end -- Are the parameters valid? if not current then -- Signal failure so export.show can try the next handler. return nil, true end -- Does the category have the correct name? local currentName = current:getCategoryName() local correctName = current_title.text == currentName if not correctName then insert(categories, "[[Category:Categories with incorrect names]]") insert(display, show_error( ("Based on the data in the category tree, this category should be called '''[[:Category:%s]]'''."):format(currentName), "This category has an incorrect name." )) end -- Add cleanup category for empty categories. local canBeEmpty = current:canBeEmpty() if canBeEmpty and correctName then insert(categories, " __EXPECTUNUSEDCATEGORY__") elseif totalPages == 0 then insert(categories, "[[Category:Empty categories]]") end if current:isHidden() then insert(categories, " __HIDDENCAT__") end -- Put all the float-right stuff into a <div> that does not clear, so that float-left stuff like the breadcrumbs and -- description can go opposite the float-right stuff without vertical space. insert(boxes, "<div style=\"float: right;\">") insert(boxes, show_topright(current)) insert(boxes, show_editlink(current)) insert(boxes, show_related_changes()) -- Show pagelist, unless it's a huge category (since they can't use DynamicPageList - see above). if not hugeCategory then insert(boxes, show_pagelist(current)) end insert(boxes, "</div>") -- Generate the displayed information insert(display, show_breadcrumbs(current)) insert(display, show_also(current)) insert(display, show_description(current)) insert(display, show_appendix(current)) insert(display, show_children(current)) insert(display, show_TOC(current)) insert(display, show_catfix(current)) insert(display, '<br class="clear-both-in-vector-2022-only">') show_categories(current, categories) return concat(boxes, "\n") .. "\n" .. concat(display, "\n\n") .. concat(categories, "") end --[==[ List of handler functions that try to match the page name. A handler should return the name of a submodule to [[Module:category tree]] and an info table which is passed as an argument to the submodule. If a handler does not recognize the page name, it should return nil. Note that the order of handlers matters! ]==] local handlers = {} -- Thesaurus per-language category insert(handlers, function(title) local code, label = title:match("^Thesaurus:(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Topic per-language category insert(handlers, function(title) local code, label = title:match("^(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Lect category e.g. for [[:Category:New Zealand English]] or [[:Category:Issime Walser]] insert(handlers, function(title, args) local lect = args.lect or args.dialect if lect ~= "" and yesno(lect, true) then -- Same as boolean in [[Module:parameters]]. return poscatboiler_subsystem, {label = title, args = args, raw = true} end end) -- poscatboiler per-language label, e.g. [[Category:English non-lemma forms]] insert(handlers, function(title, args) local lang, label = export.split_lang_label(title) if not lang then return end local baseLabel, script = label:match("(.+) in (.-)$") if script and baseLabel ~= "terms" then local scriptObj = require("Module:scripts").getByCategoryName(script) if scriptObj then return poscatboiler_subsystem, {label = baseLabel, code = lang:getCode(), sc = scriptObj:getCode(), args = args} end end return poscatboiler_subsystem, {label = label, code = lang:getCode(), args = args} end) -- poscatboiler label umbrella category insert(handlers, function(title, args) local label = title:match("(.+) by language$") if label then -- The poscatboiler code will appropriately lowercase if needed. return poscatboiler_subsystem, {label = label, args = args} end end) -- poscatboiler raw handlers insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args, raw = true} end) -- poscatboiler umbrella handlers without 'by language' insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args} end) function export.show(frame) local args, other_args = require("Module:parameters").process(frame:getParent().args, { ["also"] = {type = "title", sublist = "comma without whitespace", namespace = 14} }, true) if args.also then for k, arg in next, args.also do args.also[k] = arg.prefixedText end end for k, arg in next, other_args do other_args[k] = trim(arg) end if namespace == 10 then -- Template return "(This template should be used on pages in the [[Help:Namespaces#Category|Category:]] namespace.)" elseif namespace ~= 14 then -- Category error("This template/module can only be used on pages in the [[mw:Help:Namespaces#Category|Category:]] namespace.") end local saw_tree_lookup_failure = false local failure_consumed_args = false -- Go through each handler in turn. If a handler doesn't recognize the format of the category, it will return nil, -- and we will consider the next handler. Otherwise, it returns a template name and arguments to call it with, but -- even then, that template might return an error, and we need to consider the next handler. This happens, for -- example, with the category "CAT:Mato Grosso, Brazil", where "Mato" is the name of a language, so the poscatboiler -- per-language label handler fires and tries to find a label "Grosso, Brazil". This throws an error, and -- previously, this blocked further handler consideration, but now we check for the error and continue checking -- handlers; eventually, the topic umbrella handler will fire and correctly handle the category. for _, handler in ipairs(handlers) do -- Use a new title object and args table for each handler, to keep them isolated. local submodule, info = handler(current_title.text, deep_copy(other_args)) if submodule then info.also = deep_copy(args.also) require("Module:debug").track("auto cat/" .. submodule) -- `failed` is true if no match was found in the category tree. submodule = require(category_tree_submodule_prefix .. submodule) local cattext, failed = generate_output(submodule.main(info)) if failed then saw_tree_lookup_failure = true failure_consumed_args = failure_consumed_args or not not info.args elseif not info.args and next(other_args) then error(extra_args_error) else return cattext end end end -- No handler produced a valid category-tree match. -- Preserve previous behavior: if no failing handler consumed args, surface extra-arg errors first. if saw_tree_lookup_failure and not failure_consumed_args and next(other_args) then error(extra_args_error) end error_not_in_category_tree() end -- TODO: new test entrypoint. return export 20082foazy5jvfa9vdvvqoxes2njf6y 238731 238730 2026-11-11T11:02:24Z Lee 19 පැරණි සංස්කරණයකින් ගත් කොටස්... 238731 Scribunto text/plain -- Prevent substitution. if mw.isSubsting() then return require("Module:unsubst") end local export = {} local category_tree_submodule_prefix = "Module:category tree/" local category_tree_styles_css = "Module:category tree/styles.css" local m_str_utils = require("Module:string utilities") local m_template_parser = require("Module:template parser") local m_utilities = require("Module:utilities") local ceil = math.ceil local class_else_type = m_template_parser.class_else_type local concat = table.concat local deep_copy = require("Module:table").deepCopy local full_url = mw.uri.fullUrl local insert = table.insert local is_callable = require("Module:fun").is_callable local log10 = math.log10 or require("Module:math").log10 local new_title = mw.title.new local pages_in_category = mw.site.stats.pagesInCategory local parse = m_template_parser.parse local remove_comments = require("Module:string/removeComments") local sort = table.sort local split = m_str_utils.split local string_compare = require("Module:string/compare") local trim = m_str_utils.trim local uupper = m_str_utils.upper local yesno = require("Module:yesno") local current_frame = mw.getCurrentFrame() local current_title = mw.title.getCurrentTitle() local namespace = current_title.namespace local poscatboiler_subsystem = "poscatboiler" local extra_args_error = "Extra arguments to {{((}}auto cat{{))}} are not allowed for this category." -- Generates a sortkey for a numeral `n`, adding leading zeroes to avoid the "1, 10, 2, 3" sorting problem. `max_n` is the greatest expected value of `n`, and is used to determine how many leading zeroes are needed. If not supplied, it defaults to the number of languages. function export.numeral_sortkey(n, max_n) max_n = max_n or require("Module:list of languages").count() return ("#%%0%dd"):format(ceil(log10(max_n + 1))):format(n) end function export.split_lang_label(title_text) local getByCanonicalName = require("Module:languages").getByCanonicalName -- Progressively remove a word from the potential canonical name until it -- matches an actual canonical name. local words = split(title_text, " ", true) for i = #words - 1, 1, -1 do local lang = getByCanonicalName(concat(words, " ", 1, i)) if lang then return lang, concat(words, " ", i + 1) end end return nil, title_text end local function show_error(text, title) return require("Module:message box").maintenance( "red", "[[File:Codex icon Alert red.svg|40px|alt=alert]]", title or "මෙම ප්‍රවර්ගය වික්ෂණරියේ ප්‍රවර්ග පද්ධතිය තුළ අර්ථ දක්වා නොමැත.", text ) end local function error_not_in_category_tree() error( "මෙම ප්‍රවර්ගය වික්ෂණරියේ ප්‍රවර්ග පද්ධතිය තුළ අර්ථ දක්වා නොමැත. " .. "ප්‍රවර්ග නාමය තුළ යතුරු ලියන දෝෂ පවතී දැයි නැවත පරීක්ෂා කර බලන්න. <br>" .. "Search existing categories or request definition at [[Wiktionary:Category and label treatment requests|WT:CLTR]]. " .. "Affected category: " .. current_title.fullText, 2 ) end -- Show the text that goes at the very top right of the page. local function show_topright(current) return current.getTopright and current:getTopright() or nil end local function link_box(content) return ("<div class=\"noprint plainlinks\" style=\"float: right; clear: both; margin: 0 0 .5em 1em; background: var(--wikt-palette-paleblue, #f9f9f9); border: 1px var(--border-color-base, #aaaaaa) solid; margin-top: -1px; padding: 5px; font-weight: bold;\">%s</div>"):format(content) end local function show_editlink(current) return link_box(("[%s ප්‍රවර්ග දත්ත සංස්කරණය]"):format(tostring(full_url(current:getDataModule(), "action=edit")))) end local function show_related_changes() local title = current_title.fullText return link_box(("[%s <span title=\"Recent edits and other changes to pages in %s\">නව වෙනස්වීම්</span>]"):format( tostring(full_url("Special:RecentChangesLinked", { target = title, showlinkedto = 0, })), title )) end local function show_pagelist(current) local namespace = "namespace=" local info = current:getInfo() local lang_code = info.code if info.label == "citations" or info.label == "citations of undefined terms" then namespace = namespace .. "Citations" elseif lang_code then local lang = require("Module:languages").getByCode(lang_code, true, true) if lang then -- Proto-Norse (gmq-pro) is probably the only language with a code ending in -pro -- that's intended to have mostly non-reconstructed entries. if (lang_code:find("%-pro$") and lang_code ~= "gmq-pro") or lang:hasType("reconstructed") then namespace = namespace .. "Reconstruction" elseif lang:hasType("appendix-constructed") then namespace = namespace .. "Appendix" end end elseif info.label:match("templates") then namespace = namespace .. "Template" elseif info.label:match("modules") then namespace = namespace .. "Module" elseif info.label:match("^Wiktionary") or info.label:match("^Pages") then namespace = "" end return ([=[ {| id="newest-and-oldest-pages" class="wikitable mw-collapsible mw-collapsed" style="float: right; clear: both; margin: 0 0 .5em 1em;" ! නවතම සහ පැරණිතම පිටු&nbsp; |- | id="recent-additions" style="font-size:0.9em;" | '''Newest pages ordered by last [[mw:Manual:Categorylinks table#cl_timestamp|category link update]]:''' %s |- | id="oldest-pages" style="font-size:0.9em;" | '''Oldest pages ordered by last edit:''' %s |}]=]):format( current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=categoryadd order=descending]=] ):format(current_title.text, namespace) ), current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=lastedit order=ascending]=] ):format(current_title.text, namespace) ) ) end -- Show navigational "breadcrumbs" at the top of the page. local function show_breadcrumbs(current) local steps = {} -- Start at the current label and move our way up the "chain" from child to parent, until we can't go further. while current do local category, display_name, nocap if type(current) == "string" then category = current display_name = current:gsub("^Category:", "") else if not current.getCategoryName then error("Internal error: Bad format in breadcrumb chain structure, probably a misformatted value for `parents`: " .. mw.dumpObject(current)) end category = "Category:" .. current:getCategoryName() display_name, nocap = current:getBreadcrumbName() end if not nocap then display_name = mw.getContentLanguage():ucfirst(display_name) end insert(steps, 1, ("[[:%s|%s]]"):format(category, display_name)) -- Move up the "chain" by one level. if type(current) == "string" then current = nil else current = current:getParents() end if current then current = current[1].name end end local templateStyles = require("Module:TemplateStyles")(category_tree_styles_css) local ol = mw.html.create("ol") for i, step in ipairs(steps) do local li = mw.html.create("li") if i ~= 1 then local span = mw.html.create("span") :attr("aria-hidden", "true") :addClass("ts-categoryBreadcrumbs-separator") :wikitext(" » ") li:node(span) end li:wikitext(step) ol:node(li) end return templateStyles .. tostring(mw.html.create("div") :attr("role", "navigation") :attr("aria-label", "Breadcrumb") :addClass("ts-categoryBreadcrumbs") :node(ol)) end local function show_also(current) local also = current._info.also if also and #also > 0 then return ('<div style="margin-top:-1em;margin-bottom:1.5em">%s</div>'):format(require("Module:also").main(also)) end return nil end -- Show a short description text for the category. local function show_description(current) return current.getDescription and current:getDescription() or nil end local function show_appendix(current) local appendix = current.getAppendix and current:getAppendix() return appendix and ("For more information, see [[%s]]."):format(appendix) or nil end local function sort_children(child1, child2) return string_compare(uupper(child1.sort), uupper(child2.sort)) end -- Show a list of child categories. local function show_children(current) local children = current.getChildren and current:getChildren() or nil if not children then return nil end sort(children, sort_children) local children_list = {} for _, child in ipairs(children) do local child_name, child_pagetitle = child.name if type(child_name) == "string" then child_pagetitle = child_name else child_pagetitle = "ප්‍රවර්ගය:" .. child_name:getCategoryName() end if new_title(child_pagetitle).exists then insert(children_list, ("* [[:%s]]: %s"):format( child_pagetitle, child.description or type(child_name) == "string" and child_name:gsub("^Category:", "") .. "." or child_name:getDescription("child") )) end end return concat(children_list, "\n") end -- Show a table of contents with links to each letter in the language's script. local function show_TOC(current) local titleText = current_title.text local inCategoryPages = pages_in_category(titleText, "pages") local inCategorySubcats = pages_in_category(titleText, "subcats") local TOC_type -- Compute type of table of contents required. if inCategoryPages > 2500 or inCategorySubcats > 2500 then TOC_type = "full" elseif inCategoryPages > 200 or inCategorySubcats > 200 then TOC_type = "normal" else -- No (usual) need for a TOC if all pages or subcategories can fit on one page; -- but allow this to be overridden by a custom TOC handler. TOC_type = "none" end if current.getTOC then local TOC_text = current:getTOC(TOC_type) if TOC_text ~= true then return TOC_text or nil end end if TOC_type ~= "none" then local templatename = current:getTOCTemplateName() local TOC_template if TOC_type == "full" then -- This category is very large, see if there is a "full" version of the TOC. local TOC_template_full = new_title(templatename .. "/full") if TOC_template_full.exists then TOC_template = TOC_template_full end end if not TOC_template then local TOC_template_normal = new_title(templatename) if TOC_template_normal.exists then TOC_template = TOC_template_normal end end if TOC_template then return current_frame:expandTemplate{title = TOC_template.text, args = {}} end end return nil end -- Show the "catfix" that adds language attributes and script classes to the page. local function show_catfix(current) local lang, sc = current:getCatfixInfo() return lang and m_utilities.catfix(lang, sc) or nil end -- Show the parent categories that the current category should be placed in. local function show_categories(current, categories) local parents = current.getParents and current:getParents() or nil if not parents then return nil end for _, parent in ipairs(parents) do local parent_name = parent.name local sortkey = type(parent.sort) == "table" and parent.sort:makeSortKey() or parent.sort if type(parent_name) == "string" then insert(categories, ("[[%s|%s]]"):format(parent_name, sortkey)) else insert(categories, ("[[Category:%s|%s]]"):format(parent_name:getCategoryName(), sortkey)) end end -- Also put the category in its corresponding "umbrella" or "by language" category. local umbrella = current:getUmbrella() if umbrella then -- FIXME: use a language-neutral sorting function like the Unicode Collation Algorithm. local sortkey = current._lang and current._lang:getCanonicalName() or current:getCategoryName() sortkey = require("Module:languages").getByCode("en", true):makeSortKey(sortkey) if type(umbrella) == "string" then insert(categories, ("[[%s|%s]]"):format(umbrella, sortkey)) else insert(categories, ("[[Category:%s|%s]]"):format(umbrella:getCategoryName(), sortkey)) end end -- Check for various unwanted parser functions, which should be integrated into the category tree data instead. -- Note: HTML comments shouldn't be removed from `content` until after this step, as they can affect the result. local content = current_title:getContent() if not content then -- This happens when using [[Special:ExpandTemplates]] to call {{auto cat}} on a nonexistent category page, -- which is needed by Benwing's create_wanted_categories.py script. return end local defaultsort, displaytitle, page_has_param for node in parse(content):iterate_nodes() do local node_class = class_else_type(node) if node_class == "template" then local name = node:get_name() if name == "DEFAULTSORT:" and not defaultsort then insert(categories, "[[Category:Pages with DEFAULTSORT conflicts]]") defaultsort = true elseif name == "DISPLAYTITLE:" and not displaytitle then insert(categories,"[[Category:Pages with DISPLAYTITLE conflicts]]") displaytitle = true end elseif node_class == "parameter" and not page_has_param then insert(categories,"[[Category:Pages with raw triple-brace template parameters]]") page_has_param = true end end -- Check for raw category markup, which should also be integrated into the category tree data. content = remove_comments(content, "BOTH") local head = content:find("[[", 1, true) while head do local close = content:find("]]", head + 2, true) if not close then break end -- Make sure there are no intervening "[[" between head and close. local open = content:find("[[", head + 2, true) while open and open < close do head = open open = content:find("[[", head + 2, true) end local cat = content:sub(head + 2, close - 1) local colon = cat:match("^[ _\128-\244]*[Cc][Aa][Tt][EeGgOoRrYy _\128-\244]*():") if colon then local pipe = cat:find("|", colon + 1, true) if pipe ~= #cat then local title = new_title(pipe and cat:sub(1, pipe - 1) or cat) if title and title.namespace == 14 then insert(categories,"[[Category:Categories with categories using raw markup]]") break end end end head = open end end local function generate_output(current) if current then for _, functionName in pairs{ "getBreadcrumbName", "getDataModule", "canBeEmpty", "getDescription", "getParents", "getChildren", "getUmbrella", "getAppendix", "getTOCTemplateName", } do if not is_callable(current[functionName]) then require("Module:debug").track{"category tree/missing function", "category tree/missing function/" .. functionName} end end end local boxes, display, categories = {}, {}, {} -- Categories should never show files as a gallery. insert(categories, "__NOGALLERY__") if current_frame:getParent():getTitle() == "සැකිල්ල:auto cat" then insert(categories, "[[Category:Categories calling Template:auto cat]]") end -- Check if the category is empty local totalPages = pages_in_category(current_title.text, "all") local hugeCategory = totalPages > 1000000 -- 1 million -- Categorize huge categories, as they cause DynamicPageList to time out and make the category inaccessible. if hugeCategory then insert(categories, "[[Category:Huge categories]]") end -- Are the parameters valid? if not current then -- Signal failure so export.show can try the next handler. return nil, true end -- Does the category have the correct name? local currentName = current:getCategoryName() local correctName = current_title.text == currentName if not correctName then insert(categories, "[[ප්‍රවර්ගය:දෝෂ සහගත නාම සහිත ප්‍රවර්ග]]") insert(display, show_error( ("ප්‍රවර්ග පද්ධතිය තුළ පවතින දත්ත වලට අනුව, මෙම ප්‍රවර්ගයේ නාමය විය යුත්තේ '''[[:ප්‍රවර්ගය:%s]]''' වෙයි."):format(currentName), "This category has an incorrect name." )) end -- Add cleanup category for empty categories. local canBeEmpty = current:canBeEmpty() if canBeEmpty and correctName then insert(categories, " __EXPECTUNUSEDCATEGORY__") elseif totalPages == 0 then insert(categories, "[[ප්‍රවර්ගය:හිස් ප්‍රවර්ග]]") end if current:isHidden() then insert(categories, " __HIDDENCAT__") end -- Put all the float-right stuff into a <div> that does not clear, so that float-left stuff like the breadcrumbs and -- description can go opposite the float-right stuff without vertical space. insert(boxes, "<div style=\"float: right;\">") insert(boxes, show_topright(current)) insert(boxes, show_editlink(current)) insert(boxes, show_related_changes()) -- Show pagelist, unless it's a huge category (since they can't use DynamicPageList - see above). if not hugeCategory then insert(boxes, show_pagelist(current)) end insert(boxes, "</div>") -- Generate the displayed information insert(display, show_breadcrumbs(current)) insert(display, show_also(current)) insert(display, show_description(current)) insert(display, show_appendix(current)) insert(display, show_children(current)) insert(display, show_TOC(current)) insert(display, show_catfix(current)) insert(display, '<br class="clear-both-in-vector-2022-only">') show_categories(current, categories) return concat(boxes, "\n") .. "\n" .. concat(display, "\n\n") .. concat(categories, "") end --[==[ List of handler functions that try to match the page name. A handler should return the name of a submodule to [[Module:category tree]] and an info table which is passed as an argument to the submodule. If a handler does not recognize the page name, it should return nil. Note that the order of handlers matters! ]==] local handlers = {} -- Thesaurus per-language category insert(handlers, function(title) local code, label = title:match("^Thesaurus:(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Topic per-language category insert(handlers, function(title) local code, label = title:match("^(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Lect category e.g. for [[:Category:New Zealand English]] or [[:Category:Issime Walser]] insert(handlers, function(title, args) local lect = args.lect or args.dialect if lect ~= "" and yesno(lect, true) then -- Same as boolean in [[Module:parameters]]. return poscatboiler_subsystem, {label = title, args = args, raw = true} end end) -- poscatboiler per-language label, e.g. [[Category:English non-lemma forms]] insert(handlers, function(title, args) local lang, label = export.split_lang_label(title) if not lang then return end local baseLabel, script = label:match("(.+), (.-) භාවිතා කොට ලියන ලද$") if script and baseLabel ~= "යෙදුම්" then local scriptObj = require("Module:scripts").getByCategoryName(script) if scriptObj then return poscatboiler_subsystem, {label = baseLabel, code = lang:getCode(), sc = scriptObj:getCode(), args = args} end end return poscatboiler_subsystem, {label = label, code = lang:getCode(), args = args} end) -- poscatboiler label umbrella category insert(handlers, function(title, args) local label = title:match("භාෂාව අනුව (.+)$") if label then -- The poscatboiler code will appropriately lowercase if needed. return poscatboiler_subsystem, {label = label, args = args} end end) -- poscatboiler raw handlers insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args, raw = true} end) -- poscatboiler umbrella handlers without 'by language' insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args} end) function export.show(frame) local args, other_args = require("Module:parameters").process(frame:getParent().args, { ["also"] = {type = "title", sublist = "comma without whitespace", namespace = 14} }, true) if args.also then for k, arg in next, args.also do args.also[k] = arg.prefixedText end end for k, arg in next, other_args do other_args[k] = trim(arg) end if namespace == 10 then -- Template return "(This template should be used on pages in the [[Help:Namespaces#Category|Category:]] namespace.)" elseif namespace ~= 14 then -- Category error("This template/module can only be used on pages in the [[mw:Help:Namespaces#Category|Category:]] namespace.") end local saw_tree_lookup_failure = false local failure_consumed_args = false -- Go through each handler in turn. If a handler doesn't recognize the format of the category, it will return nil, -- and we will consider the next handler. Otherwise, it returns a template name and arguments to call it with, but -- even then, that template might return an error, and we need to consider the next handler. This happens, for -- example, with the category "CAT:Mato Grosso, Brazil", where "Mato" is the name of a language, so the poscatboiler -- per-language label handler fires and tries to find a label "Grosso, Brazil". This throws an error, and -- previously, this blocked further handler consideration, but now we check for the error and continue checking -- handlers; eventually, the topic umbrella handler will fire and correctly handle the category. for _, handler in ipairs(handlers) do -- Use a new title object and args table for each handler, to keep them isolated. local submodule, info = handler(current_title.text, deep_copy(other_args)) if submodule then info.also = deep_copy(args.also) require("Module:debug").track("auto cat/" .. submodule) -- `failed` is true if no match was found in the category tree. submodule = require(category_tree_submodule_prefix .. submodule) local cattext, failed = generate_output(submodule.main(info)) if failed then saw_tree_lookup_failure = true failure_consumed_args = failure_consumed_args or not not info.args elseif not info.args and next(other_args) then error(extra_args_error) else return cattext end end end -- No handler produced a valid category-tree match. -- Preserve previous behavior: if no failing handler consumed args, surface extra-arg errors first. if saw_tree_lookup_failure and not failure_consumed_args and next(other_args) then error(extra_args_error) end error_not_in_category_tree() end -- TODO: new test entrypoint. return export at8sgj2qm4r3hzc3y3sbumvx7x72x3o 238732 238731 2026-11-11T11:08:35Z Lee 19 238732 Scribunto text/plain -- Prevent substitution. if mw.isSubsting() then return require("Module:unsubst") end local export = {} local category_tree_submodule_prefix = "Module:category tree/" local category_tree_styles_css = "Module:category tree/styles.css" local m_str_utils = require("Module:string utilities") local m_template_parser = require("Module:template parser") local m_utilities = require("Module:utilities") local ceil = math.ceil local class_else_type = m_template_parser.class_else_type local concat = table.concat local deep_copy = require("Module:table").deepCopy local full_url = mw.uri.fullUrl local insert = table.insert local is_callable = require("Module:fun").is_callable local log10 = math.log10 or require("Module:math").log10 local new_title = mw.title.new local pages_in_category = mw.site.stats.pagesInCategory local parse = m_template_parser.parse local remove_comments = require("Module:string/removeComments") local sort = table.sort local split = m_str_utils.split local string_compare = require("Module:string/compare") local trim = m_str_utils.trim local uupper = m_str_utils.upper local yesno = require("Module:yesno") local current_frame = mw.getCurrentFrame() local current_title = mw.title.getCurrentTitle() local namespace = current_title.namespace local poscatboiler_subsystem = "poscatboiler" local extra_args_error = "Extra arguments to {{((}}auto cat{{))}} are not allowed for this category." -- Generates a sortkey for a numeral `n`, adding leading zeroes to avoid the "1, 10, 2, 3" sorting problem. `max_n` is the greatest expected value of `n`, and is used to determine how many leading zeroes are needed. If not supplied, it defaults to the number of languages. function export.numeral_sortkey(n, max_n) max_n = max_n or require("Module:list of languages").count() return ("#%%0%dd"):format(ceil(log10(max_n + 1))):format(n) end function export.split_lang_label(title_text) local getByCanonicalName = require("Module:languages").getByCanonicalName -- Progressively remove a word from the potential canonical name until it -- matches an actual canonical name. local words = split(title_text, " ", true) for i = #words - 1, 1, -1 do local lang = getByCanonicalName(concat(words, " ", 1, i)) if lang then return lang, concat(words, " ", i + 1) end end return nil, title_text end local function show_error(text, title) return require("Module:message box").maintenance( "red", "[[File:Codex icon Alert red.svg|40px|alt=alert]]", title or "මෙම ප්‍රවර්ගය වික්ෂණරියේ ප්‍රවර්ග පද්ධතිය තුළ අර්ථ දක්වා නොමැත.", text ) end local function error_not_in_category_tree() error( "මෙම ප්‍රවර්ගය වික්ෂණරියේ ප්‍රවර්ග පද්ධතිය තුළ අර්ථ දක්වා නොමැත. " .. "ප්‍රවර්ග නාමය තුළ යතුරු ලියන දෝෂ පවතී දැයි නැවත පරීක්ෂා කර බලන්න. " .. "දැනට පවතින ප්‍රවර්ග ලැයිස්තුව තුළ සොයා බලන්න. එසේත් නැත්නම් [[Wiktionary:Category and label treatment requests|WT:CLTR]] වෙත ගොස් නව ප්‍රවර්ගය ඉල්ලා සිටින්න. " .. "අදාළ ප්‍රවර්ගයේ නාමය: " .. current_title.fullText, 2 ) end -- Show the text that goes at the very top right of the page. local function show_topright(current) return current.getTopright and current:getTopright() or nil end local function link_box(content) return ("<div class=\"noprint plainlinks\" style=\"float: right; clear: both; margin: 0 0 .5em 1em; background: var(--wikt-palette-paleblue, #f9f9f9); border: 1px var(--border-color-base, #aaaaaa) solid; margin-top: -1px; padding: 5px; font-weight: bold;\">%s</div>"):format(content) end local function show_editlink(current) return link_box(("[%s ප්‍රවර්ග දත්ත සංස්කරණය]"):format(tostring(full_url(current:getDataModule(), "action=edit")))) end local function show_related_changes() local title = current_title.fullText return link_box(("[%s <span title=\"Recent edits and other changes to pages in %s\">නව වෙනස්වීම්</span>]"):format( tostring(full_url("Special:RecentChangesLinked", { target = title, showlinkedto = 0, })), title )) end local function show_pagelist(current) local namespace = "namespace=" local info = current:getInfo() local lang_code = info.code if info.label == "citations" or info.label == "citations of undefined terms" then namespace = namespace .. "Citations" elseif lang_code then local lang = require("Module:languages").getByCode(lang_code, true, true) if lang then -- Proto-Norse (gmq-pro) is probably the only language with a code ending in -pro -- that's intended to have mostly non-reconstructed entries. if (lang_code:find("%-pro$") and lang_code ~= "gmq-pro") or lang:hasType("reconstructed") then namespace = namespace .. "Reconstruction" elseif lang:hasType("appendix-constructed") then namespace = namespace .. "Appendix" end end elseif info.label:match("templates") then namespace = namespace .. "Template" elseif info.label:match("modules") then namespace = namespace .. "Module" elseif info.label:match("^Wiktionary") or info.label:match("^Pages") then namespace = "" end return ([=[ {| id="newest-and-oldest-pages" class="wikitable mw-collapsible mw-collapsed" style="float: right; clear: both; margin: 0 0 .5em 1em;" ! නවතම සහ පැරණිතම පිටු&nbsp; |- | id="recent-additions" style="font-size:0.9em;" | '''Newest pages ordered by last [[mw:Manual:Categorylinks table#cl_timestamp|category link update]]:''' %s |- | id="oldest-pages" style="font-size:0.9em;" | '''Oldest pages ordered by last edit:''' %s |}]=]):format( current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=categoryadd order=descending]=] ):format(current_title.text, namespace) ), current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=lastedit order=ascending]=] ):format(current_title.text, namespace) ) ) end -- Show navigational "breadcrumbs" at the top of the page. local function show_breadcrumbs(current) local steps = {} -- Start at the current label and move our way up the "chain" from child to parent, until we can't go further. while current do local category, display_name, nocap if type(current) == "string" then category = current display_name = current:gsub("^Category:", "") else if not current.getCategoryName then error("Internal error: Bad format in breadcrumb chain structure, probably a misformatted value for `parents`: " .. mw.dumpObject(current)) end category = "Category:" .. current:getCategoryName() display_name, nocap = current:getBreadcrumbName() end if not nocap then display_name = mw.getContentLanguage():ucfirst(display_name) end insert(steps, 1, ("[[:%s|%s]]"):format(category, display_name)) -- Move up the "chain" by one level. if type(current) == "string" then current = nil else current = current:getParents() end if current then current = current[1].name end end local templateStyles = require("Module:TemplateStyles")(category_tree_styles_css) local ol = mw.html.create("ol") for i, step in ipairs(steps) do local li = mw.html.create("li") if i ~= 1 then local span = mw.html.create("span") :attr("aria-hidden", "true") :addClass("ts-categoryBreadcrumbs-separator") :wikitext(" » ") li:node(span) end li:wikitext(step) ol:node(li) end return templateStyles .. tostring(mw.html.create("div") :attr("role", "navigation") :attr("aria-label", "Breadcrumb") :addClass("ts-categoryBreadcrumbs") :node(ol)) end local function show_also(current) local also = current._info.also if also and #also > 0 then return ('<div style="margin-top:-1em;margin-bottom:1.5em">%s</div>'):format(require("Module:also").main(also)) end return nil end -- Show a short description text for the category. local function show_description(current) return current.getDescription and current:getDescription() or nil end local function show_appendix(current) local appendix = current.getAppendix and current:getAppendix() return appendix and ("For more information, see [[%s]]."):format(appendix) or nil end local function sort_children(child1, child2) return string_compare(uupper(child1.sort), uupper(child2.sort)) end -- Show a list of child categories. local function show_children(current) local children = current.getChildren and current:getChildren() or nil if not children then return nil end sort(children, sort_children) local children_list = {} for _, child in ipairs(children) do local child_name, child_pagetitle = child.name if type(child_name) == "string" then child_pagetitle = child_name else child_pagetitle = "ප්‍රවර්ගය:" .. child_name:getCategoryName() end if new_title(child_pagetitle).exists then insert(children_list, ("* [[:%s]]: %s"):format( child_pagetitle, child.description or type(child_name) == "string" and child_name:gsub("^Category:", "") .. "." or child_name:getDescription("child") )) end end return concat(children_list, "\n") end -- Show a table of contents with links to each letter in the language's script. local function show_TOC(current) local titleText = current_title.text local inCategoryPages = pages_in_category(titleText, "pages") local inCategorySubcats = pages_in_category(titleText, "subcats") local TOC_type -- Compute type of table of contents required. if inCategoryPages > 2500 or inCategorySubcats > 2500 then TOC_type = "full" elseif inCategoryPages > 200 or inCategorySubcats > 200 then TOC_type = "normal" else -- No (usual) need for a TOC if all pages or subcategories can fit on one page; -- but allow this to be overridden by a custom TOC handler. TOC_type = "none" end if current.getTOC then local TOC_text = current:getTOC(TOC_type) if TOC_text ~= true then return TOC_text or nil end end if TOC_type ~= "none" then local templatename = current:getTOCTemplateName() local TOC_template if TOC_type == "full" then -- This category is very large, see if there is a "full" version of the TOC. local TOC_template_full = new_title(templatename .. "/full") if TOC_template_full.exists then TOC_template = TOC_template_full end end if not TOC_template then local TOC_template_normal = new_title(templatename) if TOC_template_normal.exists then TOC_template = TOC_template_normal end end if TOC_template then return current_frame:expandTemplate{title = TOC_template.text, args = {}} end end return nil end -- Show the "catfix" that adds language attributes and script classes to the page. local function show_catfix(current) local lang, sc = current:getCatfixInfo() return lang and m_utilities.catfix(lang, sc) or nil end -- Show the parent categories that the current category should be placed in. local function show_categories(current, categories) local parents = current.getParents and current:getParents() or nil if not parents then return nil end for _, parent in ipairs(parents) do local parent_name = parent.name local sortkey = type(parent.sort) == "table" and parent.sort:makeSortKey() or parent.sort if type(parent_name) == "string" then insert(categories, ("[[%s|%s]]"):format(parent_name, sortkey)) else insert(categories, ("[[Category:%s|%s]]"):format(parent_name:getCategoryName(), sortkey)) end end -- Also put the category in its corresponding "umbrella" or "by language" category. local umbrella = current:getUmbrella() if umbrella then -- FIXME: use a language-neutral sorting function like the Unicode Collation Algorithm. local sortkey = current._lang and current._lang:getCanonicalName() or current:getCategoryName() sortkey = require("Module:languages").getByCode("en", true):makeSortKey(sortkey) if type(umbrella) == "string" then insert(categories, ("[[%s|%s]]"):format(umbrella, sortkey)) else insert(categories, ("[[Category:%s|%s]]"):format(umbrella:getCategoryName(), sortkey)) end end -- Check for various unwanted parser functions, which should be integrated into the category tree data instead. -- Note: HTML comments shouldn't be removed from `content` until after this step, as they can affect the result. local content = current_title:getContent() if not content then -- This happens when using [[Special:ExpandTemplates]] to call {{auto cat}} on a nonexistent category page, -- which is needed by Benwing's create_wanted_categories.py script. return end local defaultsort, displaytitle, page_has_param for node in parse(content):iterate_nodes() do local node_class = class_else_type(node) if node_class == "template" then local name = node:get_name() if name == "DEFAULTSORT:" and not defaultsort then insert(categories, "[[Category:Pages with DEFAULTSORT conflicts]]") defaultsort = true elseif name == "DISPLAYTITLE:" and not displaytitle then insert(categories,"[[Category:Pages with DISPLAYTITLE conflicts]]") displaytitle = true end elseif node_class == "parameter" and not page_has_param then insert(categories,"[[Category:Pages with raw triple-brace template parameters]]") page_has_param = true end end -- Check for raw category markup, which should also be integrated into the category tree data. content = remove_comments(content, "BOTH") local head = content:find("[[", 1, true) while head do local close = content:find("]]", head + 2, true) if not close then break end -- Make sure there are no intervening "[[" between head and close. local open = content:find("[[", head + 2, true) while open and open < close do head = open open = content:find("[[", head + 2, true) end local cat = content:sub(head + 2, close - 1) local colon = cat:match("^[ _\128-\244]*[Cc][Aa][Tt][EeGgOoRrYy _\128-\244]*():") if colon then local pipe = cat:find("|", colon + 1, true) if pipe ~= #cat then local title = new_title(pipe and cat:sub(1, pipe - 1) or cat) if title and title.namespace == 14 then insert(categories,"[[Category:Categories with categories using raw markup]]") break end end end head = open end end local function generate_output(current) if current then for _, functionName in pairs{ "getBreadcrumbName", "getDataModule", "canBeEmpty", "getDescription", "getParents", "getChildren", "getUmbrella", "getAppendix", "getTOCTemplateName", } do if not is_callable(current[functionName]) then require("Module:debug").track{"category tree/missing function", "category tree/missing function/" .. functionName} end end end local boxes, display, categories = {}, {}, {} -- Categories should never show files as a gallery. insert(categories, "__NOGALLERY__") if current_frame:getParent():getTitle() == "සැකිල්ල:auto cat" then insert(categories, "[[Category:Categories calling Template:auto cat]]") end -- Check if the category is empty local totalPages = pages_in_category(current_title.text, "all") local hugeCategory = totalPages > 1000000 -- 1 million -- Categorize huge categories, as they cause DynamicPageList to time out and make the category inaccessible. if hugeCategory then insert(categories, "[[Category:Huge categories]]") end -- Are the parameters valid? if not current then -- Signal failure so export.show can try the next handler. return nil, true end -- Does the category have the correct name? local currentName = current:getCategoryName() local correctName = current_title.text == currentName if not correctName then insert(categories, "[[ප්‍රවර්ගය:දෝෂ සහගත නාම සහිත ප්‍රවර්ග]]") insert(display, show_error( ("ප්‍රවර්ග පද්ධතිය තුළ පවතින දත්ත වලට අනුව, මෙම ප්‍රවර්ගයේ නාමය විය යුත්තේ '''[[:ප්‍රවර්ගය:%s]]''' වෙයි."):format(currentName), "This category has an incorrect name." )) end -- Add cleanup category for empty categories. local canBeEmpty = current:canBeEmpty() if canBeEmpty and correctName then insert(categories, " __EXPECTUNUSEDCATEGORY__") elseif totalPages == 0 then insert(categories, "[[ප්‍රවර්ගය:හිස් ප්‍රවර්ග]]") end if current:isHidden() then insert(categories, " __HIDDENCAT__") end -- Put all the float-right stuff into a <div> that does not clear, so that float-left stuff like the breadcrumbs and -- description can go opposite the float-right stuff without vertical space. insert(boxes, "<div style=\"float: right;\">") insert(boxes, show_topright(current)) insert(boxes, show_editlink(current)) insert(boxes, show_related_changes()) -- Show pagelist, unless it's a huge category (since they can't use DynamicPageList - see above). if not hugeCategory then insert(boxes, show_pagelist(current)) end insert(boxes, "</div>") -- Generate the displayed information insert(display, show_breadcrumbs(current)) insert(display, show_also(current)) insert(display, show_description(current)) insert(display, show_appendix(current)) insert(display, show_children(current)) insert(display, show_TOC(current)) insert(display, show_catfix(current)) insert(display, '<br class="clear-both-in-vector-2022-only">') show_categories(current, categories) return concat(boxes, "\n") .. "\n" .. concat(display, "\n\n") .. concat(categories, "") end --[==[ List of handler functions that try to match the page name. A handler should return the name of a submodule to [[Module:category tree]] and an info table which is passed as an argument to the submodule. If a handler does not recognize the page name, it should return nil. Note that the order of handlers matters! ]==] local handlers = {} -- Thesaurus per-language category insert(handlers, function(title) local code, label = title:match("^Thesaurus:(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Topic per-language category insert(handlers, function(title) local code, label = title:match("^(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Lect category e.g. for [[:Category:New Zealand English]] or [[:Category:Issime Walser]] insert(handlers, function(title, args) local lect = args.lect or args.dialect if lect ~= "" and yesno(lect, true) then -- Same as boolean in [[Module:parameters]]. return poscatboiler_subsystem, {label = title, args = args, raw = true} end end) -- poscatboiler per-language label, e.g. [[Category:English non-lemma forms]] insert(handlers, function(title, args) local lang, label = export.split_lang_label(title) if not lang then return end local baseLabel, script = label:match("(.+), (.-) භාවිතා කොට ලියන ලද$") if script and baseLabel ~= "යෙදුම්" then local scriptObj = require("Module:scripts").getByCategoryName(script) if scriptObj then return poscatboiler_subsystem, {label = baseLabel, code = lang:getCode(), sc = scriptObj:getCode(), args = args} end end return poscatboiler_subsystem, {label = label, code = lang:getCode(), args = args} end) -- poscatboiler label umbrella category insert(handlers, function(title, args) local label = title:match("භාෂාව අනුව (.+)$") if label then -- The poscatboiler code will appropriately lowercase if needed. return poscatboiler_subsystem, {label = label, args = args} end end) -- poscatboiler raw handlers insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args, raw = true} end) -- poscatboiler umbrella handlers without 'by language' insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args} end) function export.show(frame) local args, other_args = require("Module:parameters").process(frame:getParent().args, { ["also"] = {type = "title", sublist = "comma without whitespace", namespace = 14} }, true) if args.also then for k, arg in next, args.also do args.also[k] = arg.prefixedText end end for k, arg in next, other_args do other_args[k] = trim(arg) end if namespace == 10 then -- Template return "(This template should be used on pages in the [[Help:Namespaces#Category|Category:]] namespace.)" elseif namespace ~= 14 then -- Category error("This template/module can only be used on pages in the [[mw:Help:Namespaces#Category|Category:]] namespace.") end local saw_tree_lookup_failure = false local failure_consumed_args = false -- Go through each handler in turn. If a handler doesn't recognize the format of the category, it will return nil, -- and we will consider the next handler. Otherwise, it returns a template name and arguments to call it with, but -- even then, that template might return an error, and we need to consider the next handler. This happens, for -- example, with the category "CAT:Mato Grosso, Brazil", where "Mato" is the name of a language, so the poscatboiler -- per-language label handler fires and tries to find a label "Grosso, Brazil". This throws an error, and -- previously, this blocked further handler consideration, but now we check for the error and continue checking -- handlers; eventually, the topic umbrella handler will fire and correctly handle the category. for _, handler in ipairs(handlers) do -- Use a new title object and args table for each handler, to keep them isolated. local submodule, info = handler(current_title.text, deep_copy(other_args)) if submodule then info.also = deep_copy(args.also) require("Module:debug").track("auto cat/" .. submodule) -- `failed` is true if no match was found in the category tree. submodule = require(category_tree_submodule_prefix .. submodule) local cattext, failed = generate_output(submodule.main(info)) if failed then saw_tree_lookup_failure = true failure_consumed_args = failure_consumed_args or not not info.args elseif not info.args and next(other_args) then error(extra_args_error) else return cattext end end end -- No handler produced a valid category-tree match. -- Preserve previous behavior: if no failing handler consumed args, surface extra-arg errors first. if saw_tree_lookup_failure and not failure_consumed_args and next(other_args) then error(extra_args_error) end error_not_in_category_tree() end -- TODO: new test entrypoint. return export 5kxrrv84kznxab9klgszw19prsm35ix චීනය 0 10848 238665 48326 2026-11-11T02:53:40Z Lee 19 238665 wikitext text/x-wiki ==සිංහල== {{wp}} {{slim-wikipedia|China (disambiguation)}} {{commonscat}} [[File:Zh-Territories of Dynasties in China.gif|thumb|right|250px|A reconstruction of the extent of various Chinese realms since the [[Zhou]].]] ===නිරුක්තිය=== {{rfe|si}} ===සංඥා නාම පදය=== {{si-proper noun|-|Chinas}} # {{ස්ථානය|si|country|cont/Asia}}. <center><gallery widths="200px" heights="200px"> China and Japan, John Nicaragua Dower (1844).jpg|An 1844 map of China (i.e., the [[Qing]] Empire), including Taiwan, Mongolia, Korea, eastern Manchuria (now Russian), and Assam in India. Asia 1932.jpg|A 1932 map of the [[Far East]], showing China (i.e., [[China proper]]) without [[Manchuria]], Mongolia (i.e., [[w:Greater Mongolia|Greater Mongolia]]), "[[Sinkiang]]", "[[Tibet|Tibit]]", or Japanese Taiwan. China Proper 1944.png|A map of the divisions of the [[Republic of China]] in 1944, from the American [[w:propaganda film|propaganda film]] ''[[w:Why We Fight|Why We Fight: The Battle of China]]''. China CIA map.png|The [[CIA]]'s 2008 map of China, showing the PRC's claim on Taiwan (but not the [[South China Sea]]) and India's claim on the PRC (but not China's on [[Arunachal Pradesh]]). China Acht vertikale und acht horizontale Linien.png|A 2002 map of the railways of China, showing the PRC and ROC's [[w:Nine-dash line|nine-dash claim]] in the [[South China Sea]]. Both Chinas also [[w:Diaoyu Islands dispute|claim the "Diaoyu" Islands]], currently administered as Japan's [[w:Senkaku Islands|Senkakus]]. </gallery></center> ===නාම පදය=== {{si-noun|~}} ===ආශ්‍රිත=== * {{list:countries of Asia/si}} * [[Appendix:Countries of the world]] * "[[w:Names of China|Names of China]]" and "[[w:China in world languages|China in world languages]]" at [[w:Main Page|Wikipedia]] ===මූලාශ්‍ර=== <references> </references> * {{R:OED Online|China|n.¹ and adj|31735|2019}} [[Category:si:චීනය]] [[Category:si:ආසියාව තුළ රටවල්]] [[Category:si:Exonyms]] t0sl5a3sm6f5qybjnll28zefca53lcf සැකිල්ල:cite-web/testcases 10 12242 238669 39112 2026-10-23T22:45:03Z en>Saighneánach 0 238669 wikitext text/x-wiki {{mbox|text=Use this page to test the template {{temp|cite-web}}.}} ==Date, year and accessdate== * {{cite-web|author=Author|title=An Interesting Webpage|url=http://www.google.com|work=Website, Inc.|date=1 March 2016|accessdate=6 March 2016}}. * {{cite-web|author=Author|title=An Interesting Webpage|url=http://www.google.com|work=Website, Inc.|year=2010|accessdate=6 March 2016}}. * {{cite-web|author=Author|title=An Interesting Webpage|url=http://www.google.com|work=Website, Inc.|accessdate=6 March 2016}}. * {{cite-web|author=Author|title=An Interesting Webpage|url=http://www.google.com|work=Website, Inc.}}. * {{cite-web|author=Nişanyan, Sevan|authorlink=Sevan Nişanyan|entry=entry|trans-entry=translation|work=Nişanyan Sözlük|entryurl=http://www.nisanyansozluk.com/?k={{urlencode:{{{1|{{PAGENAME}}}}}}}&x=0&y=0|date=22 March 2016}}<noinclude>[[Category:Experimental templates]]</noinclude> 4m5sgiqaaonanvemoh2q7d5voo78qvf 238670 238669 2026-11-11T03:11:30Z Lee 19 [[:en:Template:cite-web/testcases]] වෙතින් එක් සංශෝධනයක් 238669 wikitext text/x-wiki {{mbox|text=Use this page to test the template {{temp|cite-web}}.}} ==Date, year and accessdate== * {{cite-web|author=Author|title=An Interesting Webpage|url=http://www.google.com|work=Website, Inc.|date=1 March 2016|accessdate=6 March 2016}}. * {{cite-web|author=Author|title=An Interesting Webpage|url=http://www.google.com|work=Website, Inc.|year=2010|accessdate=6 March 2016}}. * {{cite-web|author=Author|title=An Interesting Webpage|url=http://www.google.com|work=Website, Inc.|accessdate=6 March 2016}}. * {{cite-web|author=Author|title=An Interesting Webpage|url=http://www.google.com|work=Website, Inc.}}. * {{cite-web|author=Nişanyan, Sevan|authorlink=Sevan Nişanyan|entry=entry|trans-entry=translation|work=Nişanyan Sözlük|entryurl=http://www.nisanyansozluk.com/?k={{urlencode:{{{1|{{PAGENAME}}}}}}}&x=0&y=0|date=22 March 2016}}<noinclude>[[Category:Experimental templates]]</noinclude> 4m5sgiqaaonanvemoh2q7d5voo78qvf සැකිල්ල:cite-web/documentation 10 12243 238673 167395 2024-08-18T01:08:17Z en>ExcarnateSojourner 0 categorize 238673 wikitext text/x-wiki {{documentation subpage}} See {{tl|quote-web}} for usage. {{citation templates}} <includeonly> [[Category:Citation templates]] </includeonly> hvqdg0jswsydeuam9ni9mezbniteegz 238674 238673 2026-11-11T03:11:45Z Lee 19 [[:en:Template:cite-web/documentation]] වෙතින් එක් සංශෝධනයක් 238673 wikitext text/x-wiki {{documentation subpage}} See {{tl|quote-web}} for usage. {{citation templates}} <includeonly> [[Category:Citation templates]] </includeonly> hvqdg0jswsydeuam9ni9mezbniteegz Module:ja-see 828 14261 238718 210726 2026-08-30T02:43:12Z en>Andrybak 0 CSS: fix linter warnings 238718 Scribunto text/plain -- Prevent substitution. if mw.isSubsting() then return require("Module:unsubst") end local m_ja = require("Module:ja") local m_sc = require("Module:scripts") local m_str_utils = require("Module:string utilities") local concat = table.concat local format_cat = require("Module:utilities").format_categories local insert = table.insert local load_data = mw.loadData local maintenance_cats = require("Module:headword").maintenance_cats local new_title = mw.title.new local split = m_str_utils.split local ugmatch = mw.ustring.gmatch local ugsub = mw.ustring.gsub local ulen = m_str_utils.len local umatch = m_str_utils.match local usub = m_str_utils.sub local export = {} local kana_to_romaji = require("Module:Hrkt-translit").tr local headword_data = load_data("Module:headword/data") local pagename = headword_data.pagename local lang = require('Module:languages').getByCode("ja") local Hira = m_sc.getByCode("Hira") local Kana = m_sc.getByCode("Kana") local Hrkt = m_sc.getByCode("Hrkt") local langname = lang:getCanonicalName() local data = load_data("Module:ja/data") local d_kyu = load_data("Module:ja/data/kyu") local range = load_data("Module:ja/data/range") local function gmatch_array(s, pattern) local output = {} for e in ugmatch(s, pattern) do insert(output, e) end return output end local function map(arr, f) local output = {} for _, e in ipairs(arr) do local fe = f(e) if fe ~= nil then insert(output, fe) end end return output end local function filter(arr, f) local output = {} for _, e in ipairs(arr) do if f(e) then insert(output, e) end end return output end local function contains(arr, item) for _, e in ipairs(arr) do if e == item then return true end end return false end -- f should be str->str in the following functions local function memoize(f) local output = {} return function(s) if not output[s] then output[s] = f(s) end return output[s] end end local getContent_memo = memoize(function(title) return new_title(title):getContent() or '' end) local function group(arr, f) local r = {} for _, e in ipairs(arr) do local fe = f(e) if r[#r] and r[#r].key == fe then insert(r[#r], e) else insert(r, { e, key = fe }) end end return r end local function ja(text) return '<span lang="ja" class="Jpan">' .. text .. '</span>' end local function link(lemma, display) return ja("[[" .. lemma .. "#" .. langname .. "|" .. (display or lemma) .. "]]") end local function link_bracket(lemma, display) return ja("【[[" .. lemma .. "#" .. langname .. "|" .. (display or lemma) .. "]]】") end local result --[[ returns an array of definitions, each having the format { def = <definition>, kanji_spellings = <array of alternative kanji spellings listed in {{ja-kanjitab|alt=...}}, can be overrided with {{ja-def|...}}>, kana_spellings = <array of alternative kana spellings listed in the headword template>, historical_kana_spellings = <array of historical kana spellings listed in the headword template>, header = <name of PoS header>, headword_line = <wikicode of headword line>, } ]] local function get_definitions_from_wikicode(wikicode, title) local current_kanji_spellings = {} local current_kanji_spellings_with_labels = {} local current_kana_spellings = {} local current_historical_kana_spellings = {} local current_head_level = '==' local current_header = langname local current_headword_line local status -- nil, 'under_headword', 'under_kanji', 'in_ja_readings' wikicode = wikicode:gsub('\n*<br */?>\n*({{ja%-altread)', '%1') -- in the local function `function format_definition` below, -- insertion of `|hira=` affects `{{tlb}}` -- (`{{tlb|ja|followed by a verb phrase|hira=によって}}`) -- and then that bad wikitext is preprocessed -- (`The parameter "hira" is not used by this template`). -- we are not doing anything with `{{tlb}}` anyway, -- so remove it wikicode = wikicode:gsub(' *{{tlb.-}}', '') local output = {} for line in (wikicode:match("==" .. langname .. "==\n(.*)") or ""):gmatch"[^\n]+" do if status == 'under_headword' then if line:match'^#+[^#:*]' then insert(output, { def = line :gsub('<ref>.-<.ref>', '') :gsub('<ref .->.-<.ref>', '') :gsub('<ref.-/>', '') :gsub('{{attention|ja.-}}', '') :gsub('{{senseid|ja.-}}', ''), kanji_spellings = line:match'{{ja%-def|' and split(line:match'{{ja%-def|([^}]+)', '|') or line:match'<!%-%- kana only %-%->' and {} or current_kanji_spellings, kanji_spellings_with_labels = current_kanji_spellings_with_labels, kana_spellings = current_kana_spellings, historical_kana_spellings = current_historical_kana_spellings, header = current_header, headword_line = current_headword_line, }) end elseif status == 'under_kanji' then if line:match'^#+[^#:*]' then insert(output, { def = '#' .. line :gsub('<ref>.-<.ref>', '') :gsub('<ref .->.-<.ref>', '') :gsub('<ref.-/>', '') :gsub('{{attention|ja.-}}', ''), kanji_spellings = {}, kanji_spellings_with_labels = {}, kana_spellings = {}, historical_kana_spellings = {}, header = current_header, headword_line = current_headword_line, }) elseif line:match'^{{ja%-readings%f[|}%z]' then output[#output].kanji_readings = {} status = 'in_ja_readings' end elseif status == 'in_ja_readings' then for rs in line:gmatch'|[a-z]+=([^|}]+)' do for r in rs:gmatch'(..-)%f[,%z],?' do r = r:gsub('%-', ''):match('..-%f[<%z]'):match'^%s*(.-)%s*$' if not contains(output[#output].kanji_readings, r) then insert(output[#output].kanji_readings, r:gsub('%-', ''):match'^%s*(.-)%s*$') end end end if line:match'}}' then status = 'under_kanji' end end -- the following branches are ordered by frequency; read backwards if line:match'^{{ja%-noun[|}]' or line:match'^{{ja%-adj[|}]' or line:match'^{{ja%-pos[|}]' or line:match'^{{ja%-phrase[|}]' or line:match'^{{ja%-verb[|}]' or line:match'^{{ja%-verb form[|}]' or line:match'^{{ja%-verb%-suru[|}]' or line:match'{{ja%-altread[|}]' or line:match'{{ja%-adv[|}]' then local escaped_line = line:gsub('%[%[([^%[%]|]-)|([^%[%]|]-)%]%]', '[[%1`%2]]'):gsub('|hhira=', '|hist='):gsub('|hkata=', '|hist=') escaped_line = escaped_line:gsub('|hira=', '|') -- ja-altread escaped_line = escaped_line:gsub('|kata=', '|') -- ja-altread current_kana_spellings = map(gmatch_array(escaped_line, '|([・、' .. range.kana .. '\'%^%-%. %%]+)'), m_ja.remove_ruby_markup) current_historical_kana_spellings = map(gmatch_array(escaped_line, '|hist=([' .. range.kana .. '\'%^%-%. %%]+)'), m_ja.remove_ruby_markup) current_headword_line = line status = 'under_headword' elseif line:match'^{{ja%-kanji[|}]' then current_kana_spellings = {} current_historical_kana_spellings = {} current_headword_line = line insert(output, { def = '#' .. data.grades[m_ja.kanji_grade(title)], kanji_spellings = {}, kanji_spellings_with_labels = {}, kana_spellings = {}, historical_kana_spellings = {}, header = current_header, headword_line = line, }) status = 'under_kanji' elseif line:match'^===+[^=]+===+$' then local head_level_new, header_new = line:match'^(===+)([^=]+)===+$' if not status or head_level_new:len() <= current_head_level:len() then current_head_level, current_header = head_level_new, header_new status = nil end elseif line:match("^{{ja%-kanjitab[|}]") then local alt_argument = line:match("|alt=([^|}]+)") current_kanji_spellings = alt_argument and split(alt_argument:gsub(':[^,]*', ''), ',') or {} current_kanji_spellings_with_labels = alt_argument and split(alt_argument, ',') or {} elseif line:match'^==[^=]+==$' then break end end return output end -- ditto, except that each definition also contains the title of the page it is from local function get_definitions_from_entry(title) local wikicode = getContent_memo(title) local defs = get_definitions_from_wikicode(wikicode, title) map(defs, function(def) def.title = title insert(({ Hira = true, Kana = true, ['Hira+Kana'] = true })[m_ja.script(title)] and def.kana_spellings or def.kanji_spellings, title) end) return defs end local function format_table_content(defs, frame, title, no_cat) local function ruby(kanji, kana) -- this function ought to be in [[Module:ja]] local kanji_segments = ugsub(kanji, "([" .. range.kanji .. range.ideograph .. range.latin .. range.numbers .. "]+)", "`%1`") -- returns possible matches between kanji and kana -- for example, match_k('`物`の`哀`れ', 'もののあわれ') returns { '[物](も)の[哀](のあわ)れ', '[物](もの)の[哀](あわ)れ' } local function match_k(kanji_segments, kana) if kanji_segments:find('`') then local kana_portion, kanji_portion, rest = umatch(kanji_segments, '(.-)`(.-)`(.*)') kana = umatch(kana, '^' .. kana_portion .. '(.*)') if not kana then return {} end local candidates = {} for i = 1, ulen(kana) do for _, candidate in ipairs(match_k(rest, usub(kana, i + 1))) do insert(candidates, kana_portion .. '[' .. kanji_portion .. '](' .. usub(kana, 1, i) .. ')' .. candidate) end end return candidates else return (kanji_segments == kana) and { kana } or {} end end local matches = match_k(kanji_segments, kana) local output = #matches == 1 and matches[1] or ('[' .. kanji .. '](' .. kana .. ')') return output:gsub("%[([^%[%]]+)%]%(([^%(%)]+)%)", "<ruby><rb>%1</rb><rt>%2</rt></ruby>") end local function format_headword(defs) local def_title = defs[1].title local kana = defs[1].kana_spellings[1] local headword = link_bracket(def_title, kana and pagename ~= kana and ruby(def_title, kana) or def_title) local kanji_grade = ulen(def_title) == 1 and m_ja.kanji_grade(def_title) return "<span style=\"font-size:x-large\">" .. headword .. "</span>" .. (kanji_grade and "<span class=\"explain\" title=\"" .. data.grades[kanji_grade] .. "\" style=\"vertical-align: top;\">" .. data.grade_labels[kanji_grade] .. "</span>" or "" ) end local preprocess_memo = memoize(function (s) return frame:preprocess(s) end) local function format_definitions(defs) local headword_line_categories = {} local alt_forms, alt_forms_rep = {}, { [title] = true, [defs[1].title] = true } local kanji_readings local function format_definition(def) local cat_prefixes = { ["CAT"] = true, ["CATEGORY"] = true } local def_text = def.def:match'{{rfdef[|}]' and "''This term needs a translation to English.''" or preprocess_memo(def.def :gsub('^#+ *', '') --TODO: strip unwanted templates and parser functions (e.g. {{c}}). Will use wiki parser once ready, as this can get very complex. ) :gsub("(%[%[[ _]*(%a-)[ _]*:.-%]%])", function(link, cat_prefix) if cat_prefixes[cat_prefix:upper()] then return "" end return link end) local def_prefix = def.def:match'^#+':gsub('#', ':') local def_pos_label = ' <span style="padding-right:.6em;color:var(--wikt-palette-darkgrey, #54595d);font-size:80%">[' .. def.header:ulower() .. ']</span> ' if not no_cat and def.kana_spellings[1] then local cat_hira, cat_kata = {}, {} require'Module:Jpan-headword'.cat{ lang = lang, pagename = title, categories = cat_hira, katakana_category = cat_kata, pos = def.header:gsub('^.', string.ulower) } insert(headword_line_categories, format_cat( cat_hira, lang, lang:makeSortKey(def.kana_spellings[1]) )) insert(headword_line_categories, format_cat( cat_kata, lang, lang:makeSortKey(def.kana_spellings[1], Kana) )) end if def.kana_spellings[1] then alt_forms_rep[def.kana_spellings[1]] = true end for _, s in ipairs(def.kanji_spellings) do if not alt_forms_rep[s] then alt_forms_rep[s] = true insert(alt_forms, s) end end for _, s in ipairs(def.kana_spellings) do if not alt_forms_rep[s] then alt_forms_rep[s] = true insert(alt_forms, s) end end kanji_readings = def.kanji_readings or kanji_readings return def_prefix .. def_pos_label .. def_text end local formatted_defs = concat(map(defs, format_definition), '\n') if #alt_forms == 1 and alt_forms[1] == title then alt_forms = {} end return concat(headword_line_categories) .. '\n' .. formatted_defs .. (#alt_forms > 0 and '\n: <div style="background-color:var(--wikt-palette-cream,#f8f8f0);color:inherit;"><span style="color:var(--wikt-palette-darkgrey, #54595d);font-size:80%">' .. (#alt_forms == 1 and 'Alternative spelling' or 'Alternative spellings') .. '</span><br><span style="margin-left:.8em">' .. concat(map(alt_forms, link), ', ') .. '</span></div>' or '') .. (kanji_readings and '\n: <div style="background-color:var(--wikt-palette-cream,#f8f8f0);color:inherit;"><span style="color:var(--wikt-palette-darkgrey, #54595d);font-size:80%">Kanji reading:</span><br><span style="margin-left:.8em">' .. concat(map(kanji_readings, link), ', ') .. '</span></div>' or '') end local is_first_row = true local function format_row(defs) local output = '|-\n| style="white-space:nowrap;width:15%;vertical-align:top;' .. (is_first_row and '' or 'border-top:1px solid var(--wikt-palette-grey-4,lightgray);') .. '" | ' .. format_headword(defs) .. '\n| style="' .. (is_first_row and '' or 'border-top:1px solid var(--wikt-palette-grey-4,lightgray);') .. '" |\n' .. format_definitions(defs) .. '\n' is_first_row = false return output end local def_groups = group(defs, function(def) return def.title .. ',' .. (def.kana_spellings[1] or '') end) local rows = map(def_groups, format_row) return '{| style="width: 100%"\n' .. concat(rows) .. '|}' end local function translit(title) local sc = m_ja.script(title) if sc == "Hira" or sc == "Kana" or sc == "Hira+Kana" then return kana_to_romaji(title, "ja") end end local function translit_kana(title) return kana_to_romaji(title, "ja") end local redirect_type = { -- auto-detected types { name = 'romaji', article = 'the', sc = "Latn", display = function(title) return title end, detect = function(title, defs) if m_ja.script(title) ~= 'Romaji' then return {} end local rom = title:ulower():gsub('[- ]', '') return filter(defs, function(def) for _, k in ipairs(def.kana_spellings) do if rom == kana_to_romaji(k, "ja") then insert(result, format_cat({langname .. " romanizations"}, lang)) return true end end return false end) end, no_cat = true, }, { name = 'hiragana spelling', article = 'the', translit = translit_kana, detect = function(title, defs) if m_ja.script(title) ~= 'Hira' then return {} end local rom = kana_to_romaji(title, "ja"):ulower():gsub('[- ]', '') return filter(defs, function(def) if not contains(def.kana_spellings, title) and contains(def.historical_kana_spellings, title) then return false end for _, k in ipairs(def.kana_spellings) do if rom == kana_to_romaji(k, "ja") then return true end end return false end) end, }, { name = 'katakana spelling', article = 'the', translit = translit_kana, detect = function(title, defs) if m_ja.script(title) ~= 'Kana' then return {} end local rom = kana_to_romaji(title, "ja"):ulower():gsub('[- ]', '') return filter(defs, function(def) if not contains(def.kana_spellings, title) and contains(def.historical_kana_spellings, title) then return false end for _, k in ipairs(def.kana_spellings) do if rom == kana_to_romaji(k, "ja") then return true end end return false end) end, }, { name = 'historical kana spelling', article = 'a', translit = function(title) return kana_to_romaji(title, "ja", nil, {hist = true}) end, detect = function(title, defs) return filter(defs, function(def) if not contains(def.kana_spellings, title) and contains(def.historical_kana_spellings, title) then local sc = m_ja.script(title) if sc == 'Hira' then insert(result, format_cat( {langname .. " historical hiragana"}, lang, lang:makeSortKey(def.historical_kana_spellings[1], Hira) )) elseif sc == 'Kana' then insert(result, format_cat( {langname .. " historical katakana"}, lang, lang:makeSortKey(def.historical_kana_spellings[1], Kana) )) elseif sc == 'Hira+Kana' then insert(result, format_cat( {langname .. " terms spelled with mixed historical kana"}, lang, lang:makeSortKey(def.historical_kana_spellings[1], Hrkt) )) end return true end end) end, }, { name = 'kyūjitai', article = 'the', detect = function(title, defs) local shin = title:gsub('.[\128-\191]*', function(c) if c == '辨' or c == '辯' or c == '瓣' then return '弁' end return d_kyu[1]:match('(%S*)' .. c .. '%s') or c end) if shin == title then return {} end return ulen(title) == 1 and filter(defs, function(def) return def.header == "Kanji" end) or filter(defs, function(def) if shin == def.title then if def.kana_spellings[1] then insert(result, format_cat({langname .. " kyūjitai spellings"}, lang, lang:makeSortKey(def.kana_spellings[1]))) end return true end end) end, display = function(title) return ja(title:gsub('.[\128-\191]*', function(c) return d_kyu[1]:match(c .. '(&#x%x+;)%s') or c end)) end, no_cat = true, }, { name = 'kyūjitai of an alternative spelling', article = 'the', detect = function(title, defs, key) local shin = title:gsub('.[\128-\191]*', function(c) if c == '辨' or c == '辯' or c == '瓣' then return '弁' end return d_kyu[1]:match('(%S*)' .. c .. '%s') or c end) if shin == title then return {} end return filter(defs, function(def) if shin ~= def.title and contains(def.kanji_spellings, shin) and (not key or contains(def.kana_spellings, key)) then if def.kana_spellings[1] then insert(result, format_cat({langname .. " kyūjitai spellings"}, lang, lang:makeSortKey(def.kana_spellings[1]))) end return true end end) end, display = function(title) return ja(title:gsub('.[\128-\191]*', function(c) return d_kyu[1]:match(c .. '(&#x%x+;)%s') or c end)) end, display_labels = function(title) local shin = title:gsub('.[\128-\191]*', function(c) if c == '辨' or c == '辯' or c == '瓣' then return '弁' end return d_kyu[1]:match('(%S*)' .. c .. '%s') or c end) return '(' .. link(shin) .. ')' end, no_cat = true, }, { name = 'alternative spelling', article = 'an', detect = function(title, defs, key) return filter(defs, function(def) return contains(def.kanji_spellings, title) and (not key or contains(def.kana_spellings, key)) or contains(def.kana_spellings, title) end) end, display_labels = function(title, defs) for _, def in ipairs(defs) do for _, kl in ipairs(def.kanji_spellings_with_labels) do local ks, lb = kl:match'^(.-):(.+)$' if ks == title then return require("Module:labels").show_labels { labels = split(lb, ' '), lang = lang } end end end return '' end, is_fallback = true, }, -- manual input only types ['vk'] = { name = 'variant kanji form', article = 'a', detect = function(title, defs) return ulen(title) == 1 and filter(defs, function(def) return def.header == "Kanji" end) or defs end, }, ['iter'] = { name = 'form with iteration marks', article = 'a', detect = function(_, defs) return defs end, }, ['niter'] = { name = 'form without iteration marks', article = 'a', detect = function(_, defs) return defs end, }, ['eshin'] = { name = 'extended shinjitai', article = 'an', detect = function(title, defs) return ulen(title) == 1 and filter(defs, function(def) return def.header == "Kanji" end) or defs end, }, names = { ['rom'] = 1, ['hira'] = 2, ['kata'] = 3, ['hkana'] = 4, ['kyu'] = 5, ['kyualt'] = 6, ['alt'] = 7, ['vk'] = 'vk', ['iter'] = 'iter', ['niter'] = 'niter', ['eshin'] = 'eshin', }, } function export.show(frame) local title = pagename local args = require("Module:parameters").process(frame:getParent().args, { [1] = { list = true }, ['term'] = { list = true, allow_holes = true, separate_no_index = true }, ['type'] = { list = true, allow_holes = true, separate_no_index = true }, ['key'] = { list = true, allow_holes = true }, }) result = { '{| class="wikitable ja-see" style="min-width:70%"\n|-\n| <b>', 'For pronunciation and definitions of ', ja(title), ' – see the following entr', #args[1] > 1 and 'ies' or 'y', '.', '</b>', } local bad_redirects = {} local name_count = 0 local name_previous, rt_previous local function make_footnote(term) insert(result, '\n|-\n| (This term, ') insert(result, require("Module:links").full_link({ lang = lang, sc = rt_previous.sc and require("Module:scripts").getByCode(rt_previous.sc) or nil, alt = (rt_previous.display or ja)(title), tr = (rt_previous.translit or translit)(term or title) or nil }, "term")) insert(result, ', is ') insert(result, name_previous) insert(result, ' of the above term') if name_count > 1 then insert(result, 's') end insert(result, '.)') end local function add_to_result(name, rt, defs, term) if rt.display_labels then name = name .. ' ' .. rt.display_labels(title, defs) end if name_previous and name_previous ~= name then make_footnote(term) name_count = 1 else name_count = name_count + 1 end name_previous = name rt_previous = rt insert(result, '\n|-\n| style="background-color:var(--wikt-palette-white,#ffffff);color:inherit;" |\n') insert(result, format_table_content(defs, frame, title, rt.no_cat)) end for i_lemma, lemma in ipairs(args[1]) do local defs = get_definitions_from_entry(lemma) --mw.logObject(defs) --use this to inspect "defs" local label_term = args.term[i_lemma] or args.term.default local label_lemma = args.type[i_lemma] or args.type.default if label_lemma then local ll1, ll2 = label_lemma:match'^(.-)(%S*)$' local rt = redirect_type[redirect_type.names[ll2]] if rt then defs = rt.detect(title, defs) if #defs > 0 then -- This code deals with the redirect type description's articles like "the hiragana", "a rare hiragana", "an unusual hiragana" when there is a manual input |type=.... add_to_result((label_lemma:match'^an? ' or label_lemma:match'^the ') and ll1 .. rt.name or rt.article .. ' ' .. ll1 .. rt.name, rt, defs, label_term) else insert(bad_redirects, lemma) end else add_to_result(label_lemma, {}, defs, label_term) end else local success = false for _, rt in ipairs(redirect_type) do if not (success and rt.is_fallback) then local defs_try = rt.detect(title, defs, args.key[i_lemma]) if #defs_try > 0 then success = true add_to_result(rt.article .. ' ' .. rt.name, rt, defs_try, label_term) end end end if not success then insert(bad_redirects, lemma) end end end if name_previous then make_footnote(args.term.default) if new_title(langname .. ' kanji read as ' .. title, 14).exists then insert(result, '<br><span style="font-size:85%;">For a list of all kanji read as ') insert(result, ja(title)) insert(result, ', see ') insert(result, '[[:Category:' .. langname .. ' kanji read as ') insert(result, title) insert(result, ']].</span>') end insert(result, '\n|}') else -- failure to find any definitions result[6] = ': ' .. concat(map(args[1], function(title) return '<span style="font-size:120%">' .. link(title) .. '</span>' end), ', ') insert(result, '\n|}') end if #bad_redirects > 0 then insert(result, '\n<small class="attentionseeking maintenance-line">(The following ' .. (#bad_redirects == 1 and 'entry does' or 'entries do') .. ' not have a page created for ' .. (#bad_redirects == 1 and 'it' or 'them') .. ' yet: ') insert(result, concat(map(bad_redirects, link), ", ")) insert(result, '.)</small>') insert(result, format_cat({langname .. " redlinks/ja-see"}, lang)) end -- Standard maintenance categories usually done by [[Module:headword]]. local lang_cats, page_cats = {}, {} maintenance_cats(headword_data.page, lang, lang_cats, page_cats) insert(result, format_cat(lang_cats, lang)) insert(result, format_cat(page_cats, nil, "-")) return concat(result) end function export.show_kango(frame) -- to be removed return export.show(frame, 'kango') end function export.show_gv(frame) -- to be removed return export.show(frame, 'glyphvar') end return export kmvhkugx85dc6kn6c8tgb852xe3pf41 238719 238718 2026-11-11T08:43:14Z Lee 19 [[:en:Module:ja-see]] වෙතින් එක් සංශෝධනයක් 238718 Scribunto text/plain -- Prevent substitution. if mw.isSubsting() then return require("Module:unsubst") end local m_ja = require("Module:ja") local m_sc = require("Module:scripts") local m_str_utils = require("Module:string utilities") local concat = table.concat local format_cat = require("Module:utilities").format_categories local insert = table.insert local load_data = mw.loadData local maintenance_cats = require("Module:headword").maintenance_cats local new_title = mw.title.new local split = m_str_utils.split local ugmatch = mw.ustring.gmatch local ugsub = mw.ustring.gsub local ulen = m_str_utils.len local umatch = m_str_utils.match local usub = m_str_utils.sub local export = {} local kana_to_romaji = require("Module:Hrkt-translit").tr local headword_data = load_data("Module:headword/data") local pagename = headword_data.pagename local lang = require('Module:languages').getByCode("ja") local Hira = m_sc.getByCode("Hira") local Kana = m_sc.getByCode("Kana") local Hrkt = m_sc.getByCode("Hrkt") local langname = lang:getCanonicalName() local data = load_data("Module:ja/data") local d_kyu = load_data("Module:ja/data/kyu") local range = load_data("Module:ja/data/range") local function gmatch_array(s, pattern) local output = {} for e in ugmatch(s, pattern) do insert(output, e) end return output end local function map(arr, f) local output = {} for _, e in ipairs(arr) do local fe = f(e) if fe ~= nil then insert(output, fe) end end return output end local function filter(arr, f) local output = {} for _, e in ipairs(arr) do if f(e) then insert(output, e) end end return output end local function contains(arr, item) for _, e in ipairs(arr) do if e == item then return true end end return false end -- f should be str->str in the following functions local function memoize(f) local output = {} return function(s) if not output[s] then output[s] = f(s) end return output[s] end end local getContent_memo = memoize(function(title) return new_title(title):getContent() or '' end) local function group(arr, f) local r = {} for _, e in ipairs(arr) do local fe = f(e) if r[#r] and r[#r].key == fe then insert(r[#r], e) else insert(r, { e, key = fe }) end end return r end local function ja(text) return '<span lang="ja" class="Jpan">' .. text .. '</span>' end local function link(lemma, display) return ja("[[" .. lemma .. "#" .. langname .. "|" .. (display or lemma) .. "]]") end local function link_bracket(lemma, display) return ja("【[[" .. lemma .. "#" .. langname .. "|" .. (display or lemma) .. "]]】") end local result --[[ returns an array of definitions, each having the format { def = <definition>, kanji_spellings = <array of alternative kanji spellings listed in {{ja-kanjitab|alt=...}}, can be overrided with {{ja-def|...}}>, kana_spellings = <array of alternative kana spellings listed in the headword template>, historical_kana_spellings = <array of historical kana spellings listed in the headword template>, header = <name of PoS header>, headword_line = <wikicode of headword line>, } ]] local function get_definitions_from_wikicode(wikicode, title) local current_kanji_spellings = {} local current_kanji_spellings_with_labels = {} local current_kana_spellings = {} local current_historical_kana_spellings = {} local current_head_level = '==' local current_header = langname local current_headword_line local status -- nil, 'under_headword', 'under_kanji', 'in_ja_readings' wikicode = wikicode:gsub('\n*<br */?>\n*({{ja%-altread)', '%1') -- in the local function `function format_definition` below, -- insertion of `|hira=` affects `{{tlb}}` -- (`{{tlb|ja|followed by a verb phrase|hira=によって}}`) -- and then that bad wikitext is preprocessed -- (`The parameter "hira" is not used by this template`). -- we are not doing anything with `{{tlb}}` anyway, -- so remove it wikicode = wikicode:gsub(' *{{tlb.-}}', '') local output = {} for line in (wikicode:match("==" .. langname .. "==\n(.*)") or ""):gmatch"[^\n]+" do if status == 'under_headword' then if line:match'^#+[^#:*]' then insert(output, { def = line :gsub('<ref>.-<.ref>', '') :gsub('<ref .->.-<.ref>', '') :gsub('<ref.-/>', '') :gsub('{{attention|ja.-}}', '') :gsub('{{senseid|ja.-}}', ''), kanji_spellings = line:match'{{ja%-def|' and split(line:match'{{ja%-def|([^}]+)', '|') or line:match'<!%-%- kana only %-%->' and {} or current_kanji_spellings, kanji_spellings_with_labels = current_kanji_spellings_with_labels, kana_spellings = current_kana_spellings, historical_kana_spellings = current_historical_kana_spellings, header = current_header, headword_line = current_headword_line, }) end elseif status == 'under_kanji' then if line:match'^#+[^#:*]' then insert(output, { def = '#' .. line :gsub('<ref>.-<.ref>', '') :gsub('<ref .->.-<.ref>', '') :gsub('<ref.-/>', '') :gsub('{{attention|ja.-}}', ''), kanji_spellings = {}, kanji_spellings_with_labels = {}, kana_spellings = {}, historical_kana_spellings = {}, header = current_header, headword_line = current_headword_line, }) elseif line:match'^{{ja%-readings%f[|}%z]' then output[#output].kanji_readings = {} status = 'in_ja_readings' end elseif status == 'in_ja_readings' then for rs in line:gmatch'|[a-z]+=([^|}]+)' do for r in rs:gmatch'(..-)%f[,%z],?' do r = r:gsub('%-', ''):match('..-%f[<%z]'):match'^%s*(.-)%s*$' if not contains(output[#output].kanji_readings, r) then insert(output[#output].kanji_readings, r:gsub('%-', ''):match'^%s*(.-)%s*$') end end end if line:match'}}' then status = 'under_kanji' end end -- the following branches are ordered by frequency; read backwards if line:match'^{{ja%-noun[|}]' or line:match'^{{ja%-adj[|}]' or line:match'^{{ja%-pos[|}]' or line:match'^{{ja%-phrase[|}]' or line:match'^{{ja%-verb[|}]' or line:match'^{{ja%-verb form[|}]' or line:match'^{{ja%-verb%-suru[|}]' or line:match'{{ja%-altread[|}]' or line:match'{{ja%-adv[|}]' then local escaped_line = line:gsub('%[%[([^%[%]|]-)|([^%[%]|]-)%]%]', '[[%1`%2]]'):gsub('|hhira=', '|hist='):gsub('|hkata=', '|hist=') escaped_line = escaped_line:gsub('|hira=', '|') -- ja-altread escaped_line = escaped_line:gsub('|kata=', '|') -- ja-altread current_kana_spellings = map(gmatch_array(escaped_line, '|([・、' .. range.kana .. '\'%^%-%. %%]+)'), m_ja.remove_ruby_markup) current_historical_kana_spellings = map(gmatch_array(escaped_line, '|hist=([' .. range.kana .. '\'%^%-%. %%]+)'), m_ja.remove_ruby_markup) current_headword_line = line status = 'under_headword' elseif line:match'^{{ja%-kanji[|}]' then current_kana_spellings = {} current_historical_kana_spellings = {} current_headword_line = line insert(output, { def = '#' .. data.grades[m_ja.kanji_grade(title)], kanji_spellings = {}, kanji_spellings_with_labels = {}, kana_spellings = {}, historical_kana_spellings = {}, header = current_header, headword_line = line, }) status = 'under_kanji' elseif line:match'^===+[^=]+===+$' then local head_level_new, header_new = line:match'^(===+)([^=]+)===+$' if not status or head_level_new:len() <= current_head_level:len() then current_head_level, current_header = head_level_new, header_new status = nil end elseif line:match("^{{ja%-kanjitab[|}]") then local alt_argument = line:match("|alt=([^|}]+)") current_kanji_spellings = alt_argument and split(alt_argument:gsub(':[^,]*', ''), ',') or {} current_kanji_spellings_with_labels = alt_argument and split(alt_argument, ',') or {} elseif line:match'^==[^=]+==$' then break end end return output end -- ditto, except that each definition also contains the title of the page it is from local function get_definitions_from_entry(title) local wikicode = getContent_memo(title) local defs = get_definitions_from_wikicode(wikicode, title) map(defs, function(def) def.title = title insert(({ Hira = true, Kana = true, ['Hira+Kana'] = true })[m_ja.script(title)] and def.kana_spellings or def.kanji_spellings, title) end) return defs end local function format_table_content(defs, frame, title, no_cat) local function ruby(kanji, kana) -- this function ought to be in [[Module:ja]] local kanji_segments = ugsub(kanji, "([" .. range.kanji .. range.ideograph .. range.latin .. range.numbers .. "]+)", "`%1`") -- returns possible matches between kanji and kana -- for example, match_k('`物`の`哀`れ', 'もののあわれ') returns { '[物](も)の[哀](のあわ)れ', '[物](もの)の[哀](あわ)れ' } local function match_k(kanji_segments, kana) if kanji_segments:find('`') then local kana_portion, kanji_portion, rest = umatch(kanji_segments, '(.-)`(.-)`(.*)') kana = umatch(kana, '^' .. kana_portion .. '(.*)') if not kana then return {} end local candidates = {} for i = 1, ulen(kana) do for _, candidate in ipairs(match_k(rest, usub(kana, i + 1))) do insert(candidates, kana_portion .. '[' .. kanji_portion .. '](' .. usub(kana, 1, i) .. ')' .. candidate) end end return candidates else return (kanji_segments == kana) and { kana } or {} end end local matches = match_k(kanji_segments, kana) local output = #matches == 1 and matches[1] or ('[' .. kanji .. '](' .. kana .. ')') return output:gsub("%[([^%[%]]+)%]%(([^%(%)]+)%)", "<ruby><rb>%1</rb><rt>%2</rt></ruby>") end local function format_headword(defs) local def_title = defs[1].title local kana = defs[1].kana_spellings[1] local headword = link_bracket(def_title, kana and pagename ~= kana and ruby(def_title, kana) or def_title) local kanji_grade = ulen(def_title) == 1 and m_ja.kanji_grade(def_title) return "<span style=\"font-size:x-large\">" .. headword .. "</span>" .. (kanji_grade and "<span class=\"explain\" title=\"" .. data.grades[kanji_grade] .. "\" style=\"vertical-align: top;\">" .. data.grade_labels[kanji_grade] .. "</span>" or "" ) end local preprocess_memo = memoize(function (s) return frame:preprocess(s) end) local function format_definitions(defs) local headword_line_categories = {} local alt_forms, alt_forms_rep = {}, { [title] = true, [defs[1].title] = true } local kanji_readings local function format_definition(def) local cat_prefixes = { ["CAT"] = true, ["CATEGORY"] = true } local def_text = def.def:match'{{rfdef[|}]' and "''This term needs a translation to English.''" or preprocess_memo(def.def :gsub('^#+ *', '') --TODO: strip unwanted templates and parser functions (e.g. {{c}}). Will use wiki parser once ready, as this can get very complex. ) :gsub("(%[%[[ _]*(%a-)[ _]*:.-%]%])", function(link, cat_prefix) if cat_prefixes[cat_prefix:upper()] then return "" end return link end) local def_prefix = def.def:match'^#+':gsub('#', ':') local def_pos_label = ' <span style="padding-right:.6em;color:var(--wikt-palette-darkgrey, #54595d);font-size:80%">[' .. def.header:ulower() .. ']</span> ' if not no_cat and def.kana_spellings[1] then local cat_hira, cat_kata = {}, {} require'Module:Jpan-headword'.cat{ lang = lang, pagename = title, categories = cat_hira, katakana_category = cat_kata, pos = def.header:gsub('^.', string.ulower) } insert(headword_line_categories, format_cat( cat_hira, lang, lang:makeSortKey(def.kana_spellings[1]) )) insert(headword_line_categories, format_cat( cat_kata, lang, lang:makeSortKey(def.kana_spellings[1], Kana) )) end if def.kana_spellings[1] then alt_forms_rep[def.kana_spellings[1]] = true end for _, s in ipairs(def.kanji_spellings) do if not alt_forms_rep[s] then alt_forms_rep[s] = true insert(alt_forms, s) end end for _, s in ipairs(def.kana_spellings) do if not alt_forms_rep[s] then alt_forms_rep[s] = true insert(alt_forms, s) end end kanji_readings = def.kanji_readings or kanji_readings return def_prefix .. def_pos_label .. def_text end local formatted_defs = concat(map(defs, format_definition), '\n') if #alt_forms == 1 and alt_forms[1] == title then alt_forms = {} end return concat(headword_line_categories) .. '\n' .. formatted_defs .. (#alt_forms > 0 and '\n: <div style="background-color:var(--wikt-palette-cream,#f8f8f0);color:inherit;"><span style="color:var(--wikt-palette-darkgrey, #54595d);font-size:80%">' .. (#alt_forms == 1 and 'Alternative spelling' or 'Alternative spellings') .. '</span><br><span style="margin-left:.8em">' .. concat(map(alt_forms, link), ', ') .. '</span></div>' or '') .. (kanji_readings and '\n: <div style="background-color:var(--wikt-palette-cream,#f8f8f0);color:inherit;"><span style="color:var(--wikt-palette-darkgrey, #54595d);font-size:80%">Kanji reading:</span><br><span style="margin-left:.8em">' .. concat(map(kanji_readings, link), ', ') .. '</span></div>' or '') end local is_first_row = true local function format_row(defs) local output = '|-\n| style="white-space:nowrap;width:15%;vertical-align:top;' .. (is_first_row and '' or 'border-top:1px solid var(--wikt-palette-grey-4,lightgray);') .. '" | ' .. format_headword(defs) .. '\n| style="' .. (is_first_row and '' or 'border-top:1px solid var(--wikt-palette-grey-4,lightgray);') .. '" |\n' .. format_definitions(defs) .. '\n' is_first_row = false return output end local def_groups = group(defs, function(def) return def.title .. ',' .. (def.kana_spellings[1] or '') end) local rows = map(def_groups, format_row) return '{| style="width: 100%"\n' .. concat(rows) .. '|}' end local function translit(title) local sc = m_ja.script(title) if sc == "Hira" or sc == "Kana" or sc == "Hira+Kana" then return kana_to_romaji(title, "ja") end end local function translit_kana(title) return kana_to_romaji(title, "ja") end local redirect_type = { -- auto-detected types { name = 'romaji', article = 'the', sc = "Latn", display = function(title) return title end, detect = function(title, defs) if m_ja.script(title) ~= 'Romaji' then return {} end local rom = title:ulower():gsub('[- ]', '') return filter(defs, function(def) for _, k in ipairs(def.kana_spellings) do if rom == kana_to_romaji(k, "ja") then insert(result, format_cat({langname .. " romanizations"}, lang)) return true end end return false end) end, no_cat = true, }, { name = 'hiragana spelling', article = 'the', translit = translit_kana, detect = function(title, defs) if m_ja.script(title) ~= 'Hira' then return {} end local rom = kana_to_romaji(title, "ja"):ulower():gsub('[- ]', '') return filter(defs, function(def) if not contains(def.kana_spellings, title) and contains(def.historical_kana_spellings, title) then return false end for _, k in ipairs(def.kana_spellings) do if rom == kana_to_romaji(k, "ja") then return true end end return false end) end, }, { name = 'katakana spelling', article = 'the', translit = translit_kana, detect = function(title, defs) if m_ja.script(title) ~= 'Kana' then return {} end local rom = kana_to_romaji(title, "ja"):ulower():gsub('[- ]', '') return filter(defs, function(def) if not contains(def.kana_spellings, title) and contains(def.historical_kana_spellings, title) then return false end for _, k in ipairs(def.kana_spellings) do if rom == kana_to_romaji(k, "ja") then return true end end return false end) end, }, { name = 'historical kana spelling', article = 'a', translit = function(title) return kana_to_romaji(title, "ja", nil, {hist = true}) end, detect = function(title, defs) return filter(defs, function(def) if not contains(def.kana_spellings, title) and contains(def.historical_kana_spellings, title) then local sc = m_ja.script(title) if sc == 'Hira' then insert(result, format_cat( {langname .. " historical hiragana"}, lang, lang:makeSortKey(def.historical_kana_spellings[1], Hira) )) elseif sc == 'Kana' then insert(result, format_cat( {langname .. " historical katakana"}, lang, lang:makeSortKey(def.historical_kana_spellings[1], Kana) )) elseif sc == 'Hira+Kana' then insert(result, format_cat( {langname .. " terms spelled with mixed historical kana"}, lang, lang:makeSortKey(def.historical_kana_spellings[1], Hrkt) )) end return true end end) end, }, { name = 'kyūjitai', article = 'the', detect = function(title, defs) local shin = title:gsub('.[\128-\191]*', function(c) if c == '辨' or c == '辯' or c == '瓣' then return '弁' end return d_kyu[1]:match('(%S*)' .. c .. '%s') or c end) if shin == title then return {} end return ulen(title) == 1 and filter(defs, function(def) return def.header == "Kanji" end) or filter(defs, function(def) if shin == def.title then if def.kana_spellings[1] then insert(result, format_cat({langname .. " kyūjitai spellings"}, lang, lang:makeSortKey(def.kana_spellings[1]))) end return true end end) end, display = function(title) return ja(title:gsub('.[\128-\191]*', function(c) return d_kyu[1]:match(c .. '(&#x%x+;)%s') or c end)) end, no_cat = true, }, { name = 'kyūjitai of an alternative spelling', article = 'the', detect = function(title, defs, key) local shin = title:gsub('.[\128-\191]*', function(c) if c == '辨' or c == '辯' or c == '瓣' then return '弁' end return d_kyu[1]:match('(%S*)' .. c .. '%s') or c end) if shin == title then return {} end return filter(defs, function(def) if shin ~= def.title and contains(def.kanji_spellings, shin) and (not key or contains(def.kana_spellings, key)) then if def.kana_spellings[1] then insert(result, format_cat({langname .. " kyūjitai spellings"}, lang, lang:makeSortKey(def.kana_spellings[1]))) end return true end end) end, display = function(title) return ja(title:gsub('.[\128-\191]*', function(c) return d_kyu[1]:match(c .. '(&#x%x+;)%s') or c end)) end, display_labels = function(title) local shin = title:gsub('.[\128-\191]*', function(c) if c == '辨' or c == '辯' or c == '瓣' then return '弁' end return d_kyu[1]:match('(%S*)' .. c .. '%s') or c end) return '(' .. link(shin) .. ')' end, no_cat = true, }, { name = 'alternative spelling', article = 'an', detect = function(title, defs, key) return filter(defs, function(def) return contains(def.kanji_spellings, title) and (not key or contains(def.kana_spellings, key)) or contains(def.kana_spellings, title) end) end, display_labels = function(title, defs) for _, def in ipairs(defs) do for _, kl in ipairs(def.kanji_spellings_with_labels) do local ks, lb = kl:match'^(.-):(.+)$' if ks == title then return require("Module:labels").show_labels { labels = split(lb, ' '), lang = lang } end end end return '' end, is_fallback = true, }, -- manual input only types ['vk'] = { name = 'variant kanji form', article = 'a', detect = function(title, defs) return ulen(title) == 1 and filter(defs, function(def) return def.header == "Kanji" end) or defs end, }, ['iter'] = { name = 'form with iteration marks', article = 'a', detect = function(_, defs) return defs end, }, ['niter'] = { name = 'form without iteration marks', article = 'a', detect = function(_, defs) return defs end, }, ['eshin'] = { name = 'extended shinjitai', article = 'an', detect = function(title, defs) return ulen(title) == 1 and filter(defs, function(def) return def.header == "Kanji" end) or defs end, }, names = { ['rom'] = 1, ['hira'] = 2, ['kata'] = 3, ['hkana'] = 4, ['kyu'] = 5, ['kyualt'] = 6, ['alt'] = 7, ['vk'] = 'vk', ['iter'] = 'iter', ['niter'] = 'niter', ['eshin'] = 'eshin', }, } function export.show(frame) local title = pagename local args = require("Module:parameters").process(frame:getParent().args, { [1] = { list = true }, ['term'] = { list = true, allow_holes = true, separate_no_index = true }, ['type'] = { list = true, allow_holes = true, separate_no_index = true }, ['key'] = { list = true, allow_holes = true }, }) result = { '{| class="wikitable ja-see" style="min-width:70%"\n|-\n| <b>', 'For pronunciation and definitions of ', ja(title), ' – see the following entr', #args[1] > 1 and 'ies' or 'y', '.', '</b>', } local bad_redirects = {} local name_count = 0 local name_previous, rt_previous local function make_footnote(term) insert(result, '\n|-\n| (This term, ') insert(result, require("Module:links").full_link({ lang = lang, sc = rt_previous.sc and require("Module:scripts").getByCode(rt_previous.sc) or nil, alt = (rt_previous.display or ja)(title), tr = (rt_previous.translit or translit)(term or title) or nil }, "term")) insert(result, ', is ') insert(result, name_previous) insert(result, ' of the above term') if name_count > 1 then insert(result, 's') end insert(result, '.)') end local function add_to_result(name, rt, defs, term) if rt.display_labels then name = name .. ' ' .. rt.display_labels(title, defs) end if name_previous and name_previous ~= name then make_footnote(term) name_count = 1 else name_count = name_count + 1 end name_previous = name rt_previous = rt insert(result, '\n|-\n| style="background-color:var(--wikt-palette-white,#ffffff);color:inherit;" |\n') insert(result, format_table_content(defs, frame, title, rt.no_cat)) end for i_lemma, lemma in ipairs(args[1]) do local defs = get_definitions_from_entry(lemma) --mw.logObject(defs) --use this to inspect "defs" local label_term = args.term[i_lemma] or args.term.default local label_lemma = args.type[i_lemma] or args.type.default if label_lemma then local ll1, ll2 = label_lemma:match'^(.-)(%S*)$' local rt = redirect_type[redirect_type.names[ll2]] if rt then defs = rt.detect(title, defs) if #defs > 0 then -- This code deals with the redirect type description's articles like "the hiragana", "a rare hiragana", "an unusual hiragana" when there is a manual input |type=.... add_to_result((label_lemma:match'^an? ' or label_lemma:match'^the ') and ll1 .. rt.name or rt.article .. ' ' .. ll1 .. rt.name, rt, defs, label_term) else insert(bad_redirects, lemma) end else add_to_result(label_lemma, {}, defs, label_term) end else local success = false for _, rt in ipairs(redirect_type) do if not (success and rt.is_fallback) then local defs_try = rt.detect(title, defs, args.key[i_lemma]) if #defs_try > 0 then success = true add_to_result(rt.article .. ' ' .. rt.name, rt, defs_try, label_term) end end end if not success then insert(bad_redirects, lemma) end end end if name_previous then make_footnote(args.term.default) if new_title(langname .. ' kanji read as ' .. title, 14).exists then insert(result, '<br><span style="font-size:85%;">For a list of all kanji read as ') insert(result, ja(title)) insert(result, ', see ') insert(result, '[[:Category:' .. langname .. ' kanji read as ') insert(result, title) insert(result, ']].</span>') end insert(result, '\n|}') else -- failure to find any definitions result[6] = ': ' .. concat(map(args[1], function(title) return '<span style="font-size:120%">' .. link(title) .. '</span>' end), ', ') insert(result, '\n|}') end if #bad_redirects > 0 then insert(result, '\n<small class="attentionseeking maintenance-line">(The following ' .. (#bad_redirects == 1 and 'entry does' or 'entries do') .. ' not have a page created for ' .. (#bad_redirects == 1 and 'it' or 'them') .. ' yet: ') insert(result, concat(map(bad_redirects, link), ", ")) insert(result, '.)</small>') insert(result, format_cat({langname .. " redlinks/ja-see"}, lang)) end -- Standard maintenance categories usually done by [[Module:headword]]. local lang_cats, page_cats = {}, {} maintenance_cats(headword_data.page, lang, lang_cats, page_cats) insert(result, format_cat(lang_cats, lang)) insert(result, format_cat(page_cats, nil, "-")) return concat(result) end function export.show_kango(frame) -- to be removed return export.show(frame, 'kango') end function export.show_gv(frame) -- to be removed return export.show(frame, 'glyphvar') end return export kmvhkugx85dc6kn6c8tgb852xe3pf41 238720 238719 2026-11-11T08:58:56Z Lee 19 පැරණි සංස්කරණයකින් ගත් කොටස්... 238720 Scribunto text/plain local m_sinhala = require("Module:sinhala") -- Prevent substitution. if mw.isSubsting() then return require("Module:unsubst") end local m_ja = require("Module:ja") local m_sc = require("Module:scripts") local m_str_utils = require("Module:string utilities") local concat = table.concat local format_cat = require("Module:utilities").format_categories local insert = table.insert local load_data = mw.loadData local maintenance_cats = require("Module:headword").maintenance_cats local new_title = mw.title.new local split = m_str_utils.split local ugmatch = mw.ustring.gmatch local ugsub = mw.ustring.gsub local ulen = m_str_utils.len local umatch = m_str_utils.match local usub = m_str_utils.sub local export = {} local kana_to_romaji = require("Module:Hrkt-translit").tr local headword_data = load_data("Module:headword/data") local pagename = headword_data.pagename local lang = require('Module:languages').getByCode("ja") local Hira = m_sc.getByCode("Hira") local Kana = m_sc.getByCode("Kana") local Hrkt = m_sc.getByCode("Hrkt") local langname = lang:getCanonicalName() local data = load_data("Module:ja/data") local d_kyu = load_data("Module:ja/data/kyu") local range = load_data("Module:ja/data/range") local function gmatch_array(s, pattern) local output = {} for e in ugmatch(s, pattern) do insert(output, e) end return output end local function map(arr, f) local output = {} for _, e in ipairs(arr) do local fe = f(e) if fe ~= nil then insert(output, fe) end end return output end local function filter(arr, f) local output = {} for _, e in ipairs(arr) do if f(e) then insert(output, e) end end return output end local function contains(arr, item) for _, e in ipairs(arr) do if e == item then return true end end return false end -- f should be str->str in the following functions local function memoize(f) local output = {} return function(s) if not output[s] then output[s] = f(s) end return output[s] end end local getContent_memo = memoize(function(title) return new_title(title):getContent() or '' end) local function group(arr, f) local r = {} for _, e in ipairs(arr) do local fe = f(e) if r[#r] and r[#r].key == fe then insert(r[#r], e) else insert(r, { e, key = fe }) end end return r end local function ja(text) return '<span lang="ja" class="Jpan">' .. text .. '</span>' end local function link(lemma, display) return ja("[[" .. lemma .. "#" .. langname .. "|" .. (display or lemma) .. "]]") end local function link_bracket(lemma, display) return ja("【[[" .. lemma .. "#" .. langname .. "|" .. (display or lemma) .. "]]】") end local result --[[ returns an array of definitions, each having the format { def = <definition>, kanji_spellings = <array of alternative kanji spellings listed in {{ja-kanjitab|alt=...}}, can be overrided with {{ja-def|...}}>, kana_spellings = <array of alternative kana spellings listed in the headword template>, historical_kana_spellings = <array of historical kana spellings listed in the headword template>, header = <name of PoS header>, headword_line = <wikicode of headword line>, } ]] local function get_definitions_from_wikicode(wikicode, title) local current_kanji_spellings = {} local current_kanji_spellings_with_labels = {} local current_kana_spellings = {} local current_historical_kana_spellings = {} local current_head_level = '==' local current_header = langname local current_headword_line local status -- nil, 'under_headword', 'under_kanji', 'in_ja_readings' wikicode = wikicode:gsub('\n*<br */?>\n*({{ja%-altread)', '%1') -- in the local function `function format_definition` below, -- insertion of `|hira=` affects `{{tlb}}` -- (`{{tlb|ja|followed by a verb phrase|hira=によって}}`) -- and then that bad wikitext is preprocessed -- (`The parameter "hira" is not used by this template`). -- we are not doing anything with `{{tlb}}` anyway, -- so remove it wikicode = wikicode:gsub(' *{{tlb.-}}', '') local output = {} for line in (wikicode:match("==[ ]*" .. langname .. "[ ]*==\n(.*)") or ""):gmatch"[^\n]+" do if status == 'under_headword' then if line:match'^#+[^#:*]' then insert(output, { def = line :gsub('<ref>.-<.ref>', '') :gsub('<ref .->.-<.ref>', '') :gsub('<ref.-/>', '') :gsub('{{attention|ja.-}}', '') :gsub('{{senseid|ja.-}}', ''), kanji_spellings = line:match'{{ja%-def|' and split(line:match'{{ja%-def|([^}]+)', '|') or line:match'<!%-%- kana only %-%->' and {} or current_kanji_spellings, kanji_spellings_with_labels = current_kanji_spellings_with_labels, kana_spellings = current_kana_spellings, historical_kana_spellings = current_historical_kana_spellings, header = current_header, headword_line = current_headword_line, }) end elseif status == 'under_kanji' then if line:match'^#+[^#:*]' then insert(output, { def = '#' .. line :gsub('<ref>.-<.ref>', '') :gsub('<ref .->.-<.ref>', '') :gsub('<ref.-/>', '') :gsub('{{attention|ja.-}}', ''), kanji_spellings = {}, kanji_spellings_with_labels = {}, kana_spellings = {}, historical_kana_spellings = {}, header = current_header, headword_line = current_headword_line, }) elseif line:match'^{{ja%-readings%f[|}%z]' then output[#output].kanji_readings = {} status = 'in_ja_readings' end elseif status == 'in_ja_readings' then for rs in line:gmatch'|[a-z]+=([^|}]+)' do for r in rs:gmatch'(..-)%f[,%z],?' do r = r:gsub('%-', ''):match('..-%f[<%z]'):match'^%s*(.-)%s*$' if not contains(output[#output].kanji_readings, r) then insert(output[#output].kanji_readings, r:gsub('%-', ''):match'^%s*(.-)%s*$') end end end if line:match'}}' then status = 'under_kanji' end end -- the following branches are ordered by frequency; read backwards if line:match'^{{ja%-noun[|}]' or line:match'^{{ja%-adj[|}]' or line:match'^{{ja%-pos[|}]' or line:match'^{{ja%-phrase[|}]' or line:match'^{{ja%-verb[|}]' or line:match'^{{ja%-verb form[|}]' or line:match'^{{ja%-verb%-suru[|}]' or line:match'{{ja%-altread[|}]' or line:match'{{ja%-adv[|}]' then local escaped_line = line:gsub('%[%[([^%[%]|]-)|([^%[%]|]-)%]%]', '[[%1`%2]]'):gsub('|hhira=', '|hist='):gsub('|hkata=', '|hist=') escaped_line = escaped_line:gsub('|hira=', '|') -- ja-altread escaped_line = escaped_line:gsub('|kata=', '|') -- ja-altread current_kana_spellings = map(gmatch_array(escaped_line, '|([・、' .. range.kana .. '\'%^%-%. %%]+)'), m_ja.remove_ruby_markup) current_historical_kana_spellings = map(gmatch_array(escaped_line, '|hist=([' .. range.kana .. '\'%^%-%. %%]+)'), m_ja.remove_ruby_markup) current_headword_line = line status = 'under_headword' elseif line:match'^{{ja%-kanji[|}]' then current_kana_spellings = {} current_historical_kana_spellings = {} current_headword_line = line insert(output, { def = '#' .. data.grades[m_ja.kanji_grade(title)], kanji_spellings = {}, kanji_spellings_with_labels = {}, kana_spellings = {}, historical_kana_spellings = {}, header = current_header, headword_line = line, }) status = 'under_kanji' elseif line:match'^===+[^=]+===+$' then local head_level_new, header_new = line:match'^(===+)([^=]+)===+$' if not status or head_level_new:len() <= current_head_level:len() then current_head_level, current_header = head_level_new, header_new status = nil end elseif line:match("^{{ja%-kanjitab[|}]") then local alt_argument = line:match("|alt=([^|}]+)") current_kanji_spellings = alt_argument and split(alt_argument:gsub(':[^,]*', ''), ',') or {} current_kanji_spellings_with_labels = alt_argument and split(alt_argument, ',') or {} elseif line:match'^==[^=]+==$' then break end end return output end -- ditto, except that each definition also contains the title of the page it is from local function get_definitions_from_entry(title) local wikicode = getContent_memo(title) local defs = get_definitions_from_wikicode(wikicode, title) map(defs, function(def) def.title = title insert(({ Hira = true, Kana = true, ['Hira+Kana'] = true })[m_ja.script(title)] and def.kana_spellings or def.kanji_spellings, title) end) return defs end local function format_table_content(defs, frame, title, no_cat) local function ruby(kanji, kana) -- this function ought to be in [[Module:ja]] local kanji_segments = ugsub(kanji, "([" .. range.kanji .. range.ideograph .. range.latin .. range.numbers .. "]+)", "`%1`") -- returns possible matches between kanji and kana -- for example, match_k('`物`の`哀`れ', 'もののあわれ') returns { '[物](も)の[哀](のあわ)れ', '[物](もの)の[哀](あわ)れ' } local function match_k(kanji_segments, kana) if kanji_segments:find('`') then local kana_portion, kanji_portion, rest = umatch(kanji_segments, '(.-)`(.-)`(.*)') kana = umatch(kana, '^' .. kana_portion .. '(.*)') if not kana then return {} end local candidates = {} for i = 1, ulen(kana) do for _, candidate in ipairs(match_k(rest, usub(kana, i + 1))) do insert(candidates, kana_portion .. '[' .. kanji_portion .. '](' .. usub(kana, 1, i) .. ')' .. candidate) end end return candidates else return (kanji_segments == kana) and { kana } or {} end end local matches = match_k(kanji_segments, kana) local output = #matches == 1 and matches[1] or ('[' .. kanji .. '](' .. kana .. ')') return output:gsub("%[([^%[%]]+)%]%(([^%(%)]+)%)", "<ruby><rb>%1</rb><rt>%2</rt></ruby>") end local function format_headword(defs) local def_title = defs[1].title local kana = defs[1].kana_spellings[1] local headword = link_bracket(def_title, kana and pagename ~= kana and ruby(def_title, kana) or def_title) local kanji_grade = ulen(def_title) == 1 and m_ja.kanji_grade(def_title) return "<span style=\"font-size:x-large\">" .. headword .. "</span>" .. (kanji_grade and "<span class=\"explain\" title=\"" .. data.grades[kanji_grade] .. "\" style=\"vertical-align: top;\">" .. data.grade_labels[kanji_grade] .. "</span>" or "" ) end local preprocess_memo = memoize(function (s) return frame:preprocess(s) end) local function format_definitions(defs) local headword_line_categories = {} local alt_forms, alt_forms_rep = {}, { [title] = true, [defs[1].title] = true } local kanji_readings local function format_definition(def) local cat_prefixes = { ["CAT"] = true, ["CATEGORY"] = true } local def_text = def.def:match'{{rfdef[|}]' and "''This term needs a translation to English.''" or preprocess_memo(def.def :gsub('^#+ *', '') --TODO: strip unwanted templates and parser functions (e.g. {{c}}). Will use wiki parser once ready, as this can get very complex. ) :gsub("(%[%[[ _]*(%a-)[ _]*:.-%]%])", function(link, cat_prefix) if cat_prefixes[cat_prefix:upper()] then return "" end return link end) local def_prefix = def.def:match'^#+':gsub('#', ':') local def_pos_label = ' <span style="padding-right:.6em;color:var(--wikt-palette-darkgrey, #54595d);font-size:80%">[' .. def.header:ulower() .. ']</span> ' if not no_cat and def.kana_spellings[1] then local cat_hira, cat_kata = {}, {} require'Module:Jpan-headword'.cat{ lang = lang, pagename = title, categories = cat_hira, katakana_category = cat_kata, pos = def.header:gsub('^.', string.ulower) } insert(headword_line_categories, format_cat( cat_hira, lang, lang:makeSortKey(def.kana_spellings[1]) )) insert(headword_line_categories, format_cat( cat_kata, lang, lang:makeSortKey(def.kana_spellings[1], Kana) )) end if def.kana_spellings[1] then alt_forms_rep[def.kana_spellings[1]] = true end for _, s in ipairs(def.kanji_spellings) do if not alt_forms_rep[s] then alt_forms_rep[s] = true insert(alt_forms, s) end end for _, s in ipairs(def.kana_spellings) do if not alt_forms_rep[s] then alt_forms_rep[s] = true insert(alt_forms, s) end end kanji_readings = def.kanji_readings or kanji_readings return def_prefix .. def_pos_label .. def_text end local formatted_defs = concat(map(defs, format_definition), '\n') if #alt_forms == 1 and alt_forms[1] == title then alt_forms = {} end return concat(headword_line_categories) .. '\n' .. formatted_defs .. (#alt_forms > 0 and '\n: <div style="background-color:var(--wikt-palette-cream,#f8f8f0);color:inherit;"><span style="color:var(--wikt-palette-darkgrey, #54595d);font-size:80%">' .. (#alt_forms == 1 and 'වෛකල්පික අක්ෂර වින්‍යාසය' or 'වෛකල්පික අක්ෂර වින්‍යාස') .. '</span><br><span style="margin-left:.8em">' .. concat(map(alt_forms, link), ', ') .. '</span></div>' or '') .. (kanji_readings and '\n: <div style="background-color:var(--wikt-palette-cream,#f8f8f0);color:inherit;"><span style="color:var(--wikt-palette-darkgrey, #54595d);font-size:80%">Kanji reading:</span><br><span style="margin-left:.8em">' .. concat(map(kanji_readings, link), ', ') .. '</span></div>' or '') end local is_first_row = true local function format_row(defs) local output = '|-\n| style="white-space:nowrap;width:15%;vertical-align:top;' .. (is_first_row and '' or 'border-top:1px solid var(--wikt-palette-grey-4,lightgray);') .. '" | ' .. format_headword(defs) .. '\n| style="' .. (is_first_row and '' or 'border-top:1px solid var(--wikt-palette-grey-4,lightgray);') .. '" |\n' .. format_definitions(defs) .. '\n' is_first_row = false return output end local def_groups = group(defs, function(def) return def.title .. ',' .. (def.kana_spellings[1] or '') end) local rows = map(def_groups, format_row) return '{| style="width: 100%"\n' .. concat(rows) .. '|}' end local function translit(title) local sc = m_ja.script(title) if sc == "Hira" or sc == "Kana" or sc == "Hira+Kana" then return kana_to_romaji(title, "ja") end end local function translit_kana(title) return kana_to_romaji(title, "ja") end local redirect_type = { -- auto-detected types { name = 'romaji', article = 'the', sc = "Latn", display = function(title) return title end, detect = function(title, defs) if m_ja.script(title) ~= 'Romaji' then return {} end local rom = title:ulower():gsub('[- ]', '') return filter(defs, function(def) for _, k in ipairs(def.kana_spellings) do if rom == kana_to_romaji(k, "ja") then insert(result, format_cat({langname .. " romanizations"}, lang)) return true end end return false end) end, no_cat = true, }, { name = 'hiragana spelling', article = 'the', translit = translit_kana, detect = function(title, defs) if m_ja.script(title) ~= 'Hira' then return {} end local rom = kana_to_romaji(title, "ja"):ulower():gsub('[- ]', '') return filter(defs, function(def) if not contains(def.kana_spellings, title) and contains(def.historical_kana_spellings, title) then return false end for _, k in ipairs(def.kana_spellings) do if rom == kana_to_romaji(k, "ja") then return true end end return false end) end, }, { name = 'katakana spelling', article = 'the', translit = translit_kana, detect = function(title, defs) if m_ja.script(title) ~= 'Kana' then return {} end local rom = kana_to_romaji(title, "ja"):ulower():gsub('[- ]', '') return filter(defs, function(def) if not contains(def.kana_spellings, title) and contains(def.historical_kana_spellings, title) then return false end for _, k in ipairs(def.kana_spellings) do if rom == kana_to_romaji(k, "ja") then return true end end return false end) end, }, { name = 'historical kana spelling', article = 'a', translit = function(title) return kana_to_romaji(title, "ja", nil, {hist = true}) end, detect = function(title, defs) return filter(defs, function(def) if not contains(def.kana_spellings, title) and contains(def.historical_kana_spellings, title) then local sc = m_ja.script(title) if sc == 'Hira' then insert(result, format_cat( {langname .. " historical hiragana"}, lang, lang:makeSortKey(def.historical_kana_spellings[1], Hira) )) elseif sc == 'Kana' then insert(result, format_cat( {langname .. " historical katakana"}, lang, lang:makeSortKey(def.historical_kana_spellings[1], Kana) )) elseif sc == 'Hira+Kana' then insert(result, format_cat( {langname .. " terms spelled with mixed historical kana"}, lang, lang:makeSortKey(def.historical_kana_spellings[1], Hrkt) )) end return true end end) end, }, { name = 'kyūjitai', article = 'the', detect = function(title, defs) local shin = title:gsub('.[\128-\191]*', function(c) if c == '辨' or c == '辯' or c == '瓣' then return '弁' end return d_kyu[1]:match('(%S*)' .. c .. '%s') or c end) if shin == title then return {} end return ulen(title) == 1 and filter(defs, function(def) return def.header == "Kanji" end) or filter(defs, function(def) if shin == def.title then if def.kana_spellings[1] then insert(result, format_cat({langname .. " kyūjitai spellings"}, lang, lang:makeSortKey(def.kana_spellings[1]))) end return true end end) end, display = function(title) return ja(title:gsub('.[\128-\191]*', function(c) return d_kyu[1]:match(c .. '(&#x%x+;)%s') or c end)) end, no_cat = true, }, { name = 'kyūjitai of an alternative spelling', article = 'the', detect = function(title, defs, key) local shin = title:gsub('.[\128-\191]*', function(c) if c == '辨' or c == '辯' or c == '瓣' then return '弁' end return d_kyu[1]:match('(%S*)' .. c .. '%s') or c end) if shin == title then return {} end return filter(defs, function(def) if shin ~= def.title and contains(def.kanji_spellings, shin) and (not key or contains(def.kana_spellings, key)) then if def.kana_spellings[1] then insert(result, format_cat({langname .. " kyūjitai spellings"}, lang, lang:makeSortKey(def.kana_spellings[1]))) end return true end end) end, display = function(title) return ja(title:gsub('.[\128-\191]*', function(c) return d_kyu[1]:match(c .. '(&#x%x+;)%s') or c end)) end, display_labels = function(title) local shin = title:gsub('.[\128-\191]*', function(c) if c == '辨' or c == '辯' or c == '瓣' then return '弁' end return d_kyu[1]:match('(%S*)' .. c .. '%s') or c end) return '(' .. link(shin) .. ')' end, no_cat = true, }, { name = 'alternative spelling', article = 'an', detect = function(title, defs, key) return filter(defs, function(def) return contains(def.kanji_spellings, title) and (not key or contains(def.kana_spellings, key)) or contains(def.kana_spellings, title) end) end, display_labels = function(title, defs) for _, def in ipairs(defs) do for _, kl in ipairs(def.kanji_spellings_with_labels) do local ks, lb = kl:match'^(.-):(.+)$' if ks == title then return require("Module:labels").show_labels { labels = split(lb, ' '), lang = lang } end end end return '' end, is_fallback = true, }, -- manual input only types ['vk'] = { name = 'variant kanji form', article = 'a', detect = function(title, defs) return ulen(title) == 1 and filter(defs, function(def) return def.header == "Kanji" end) or defs end, }, ['iter'] = { name = 'form with iteration marks', article = 'a', detect = function(_, defs) return defs end, }, ['niter'] = { name = 'form without iteration marks', article = 'a', detect = function(_, defs) return defs end, }, ['eshin'] = { name = 'extended shinjitai', article = 'an', detect = function(title, defs) return ulen(title) == 1 and filter(defs, function(def) return def.header == "Kanji" end) or defs end, }, names = { ['rom'] = 1, ['hira'] = 2, ['kata'] = 3, ['hkana'] = 4, ['kyu'] = 5, ['kyualt'] = 6, ['alt'] = 7, ['vk'] = 'vk', ['iter'] = 'iter', ['niter'] = 'niter', ['eshin'] = 'eshin', }, } function export.show(frame) local title = pagename local args = require("Module:parameters").process(frame:getParent().args, { [1] = { list = true }, ['term'] = { list = true, allow_holes = true, separate_no_index = true }, ['type'] = { list = true, allow_holes = true, separate_no_index = true }, ['key'] = { list = true, allow_holes = true }, }) result = { '{| class="wikitable ja-see" style="min-width:70%"\n|-\n| <b>', '', ja(title), ' යන යෙදුමේ උච්චාරණය සහ අර්ථ දැක්වීම සඳහා – මතු දැක්වෙන ', #args[1] > 1 and 'ප්‍රවේශ' or 'ප්‍රවේශය', ' වෙත යොමු වන්න.', '</b>', } local bad_redirects = {} local name_count = 0 local name_previous, rt_previous local function make_footnote(term) insert(result, '\n|-\n| (') insert(result, require("Module:links").full_link({ lang = lang, sc = rt_previous.sc and require("Module:scripts").getByCode(rt_previous.sc) or nil, alt = (rt_previous.display or ja)(title), tr = (rt_previous.translit or translit)(term or title) or nil }, "term")) insert(result, ', නම් වන මෙම යෙදුම, ') insert(result, ' ඉහත ') if name_count > 1 then insert(result, 'යෙදුම්වල ') else insert(result, 'යෙදුමේ ') end insert(result, m_sinhala.sinhala(name_previous)) insert(result, ' වෙයි.)') end local function add_to_result(name, rt, defs, term) if rt.display_labels then name = name .. ' ' .. rt.display_labels(title, defs) end if name_previous and name_previous ~= name then make_footnote(term) name_count = 1 else name_count = name_count + 1 end name_previous = name rt_previous = rt insert(result, '\n|-\n| style="background-color:var(--wikt-palette-white,#ffffff);color:inherit;" |\n') insert(result, format_table_content(defs, frame, title, rt.no_cat)) end for i_lemma, lemma in ipairs(args[1]) do local defs = get_definitions_from_entry(lemma) --mw.logObject(defs) --use this to inspect "defs" local label_term = args.term[i_lemma] or args.term.default local label_lemma = args.type[i_lemma] or args.type.default if label_lemma then local ll1, ll2 = label_lemma:match'^(.-)(%S*)$' local rt = redirect_type[redirect_type.names[ll2]] if rt then defs = rt.detect(title, defs) if #defs > 0 then -- This code deals with the redirect type description's articles like "the hiragana", "a rare hiragana", "an unusual hiragana" when there is a manual input |type=.... add_to_result((label_lemma:match'^an? ' or label_lemma:match'^the ') and ll1 .. rt.name or rt.article .. ' ' .. ll1 .. rt.name, rt, defs, label_term) else insert(bad_redirects, lemma) end else add_to_result(label_lemma, {}, defs, label_term) end else local success = false for _, rt in ipairs(redirect_type) do if not (success and rt.is_fallback) then local defs_try = rt.detect(title, defs, args.key[i_lemma]) if #defs_try > 0 then success = true add_to_result(rt.article .. ' ' .. rt.name, rt, defs_try, label_term) end end end if not success then insert(bad_redirects, lemma) end end end if name_previous then make_footnote(args.term.default) if new_title(langname .. ' කන්ජි, ' .. title .. "ලෙස කියවන", 14).exists then insert(result, '<br><span style="font-size:85%;">') insert(result, ja(title)) insert(result, ' ලෙස කියවන කන්ජි ලැයිස්තුවක් සඳහා, ') insert(result, '[[:ප්‍රවර්ගය:' .. langname .. ' කන්ජි, ') insert(result, title) insert(result, ' ලෙස කියවන]] වෙතට යොමු වන්න.)</span>') end insert(result, '\n|}') else -- failure to find any definitions result[6] = ': ' .. concat(map(args[1], function(title) return '<span style="font-size:120%">' .. link(title) .. '</span>' end), ', ') insert(result, '\n|}') end if #bad_redirects > 0 then insert(result, '\n<small class="attentionseeking maintenance-line">(මතු දැක්වෙන ' .. (#bad_redirects == 1 and 'ප්‍රවේශය' or 'ප්‍රවේශ') .. ' සඳහා ' .. (#bad_redirects == 1 and 'පිටුවක්' or 'පිටු') .. ' තවම නිර්මාණය කොට නොමැත: ') insert(result, concat(map(bad_redirects, link), ", ")) insert(result, '.)</small>') insert(result, format_cat({langname .. " රතු සබැඳි/ja-see"}, lang)) end -- Standard maintenance categories usually done by [[Module:headword]]. local lang_cats, page_cats = {}, {} maintenance_cats(headword_data.page, lang, lang_cats, page_cats) insert(result, format_cat(lang_cats, lang)) insert(result, format_cat(page_cats, nil, "-")) return concat(result) end function export.show_kango(frame) -- to be removed return export.show(frame, 'kango') end function export.show_gv(frame) -- to be removed return export.show(frame, 'glyphvar') end return export pjvv9mnw1ypm72of3lr66yeel21l3s6 සැකිල්ල:R:Merriam-Webster Online 10 114218 238693 168308 2026-10-28T11:10:07Z en>Juwan 0 238693 wikitext text/x-wiki <includeonly>{{#if: {{{subentry|}}} | “{{#invoke:string/templates|replace|{{#invoke:string/templates|replace|{{{subentry}}}|'|’}}|’’|''}}{{#if:{{{subpos|}}}|, ''{{{subpos}}}{{#switch:{{{subpos|}}} | idiom | phrase = <!-- Do nothing --> | . }}''}}” under&#32; }}<!-- -->{{#invoke:quote|call_template | template = cite-web | entry = {{#invoke:string/templates|replace|{{#invoke:string/templates|replace|{{{entry|{{{1|{{pagename}}}}}}}}|'|’}}|’’|''}}<!-- -->{{#if: {{{part of speech|{{{pos|{{{2|}}}}}}}}} |, {{#if: {{{noformat|}}} | {{{part of speech|{{{pos|}}}}}} | ''{{{part of speech|{{{pos|}}}}}}{{#switch:{{{part of speech|{{{pos|}}}}}} | idiom | phrase = <!-- Do nothing --> |. }}'' }} }} | entryurl = {{#if:{{{url|}}}{{{2|}}}|{{{url|{{{2|}}}}}}|https://www.merriam-webster.com/dictionary/{{urlencode:{{{entry|{{{1|{{pagename}}}}}}}}|PATH}}}} | year = 1996–present | work = w:Merriam-Webster Online | location = Springfield, Massachusetts | publisher = Merriam-Webster, Inc. | section = {{#if:{{{source|}}}|reproduced from ''[[w:Webster's Dictionary#Merriam-Webster's Collegiate Dictionary|Merriam-Webster’s Collegiate Dictionary]]'', 11th edition, Springfield, Mass.: Merriam-Webster, 2003, <small>{{OCLC|960294982}}</small>}} | textparam = 3 | passage_block = {{{passage_block|{{{text_block|}}}}}} | usenodot = 1 | allowparams = 1, 2, entry, noformat, part of speech, passage_block, pos, source, subentry, subpos, text_block, url }}</includeonly><!-- --><noinclude> {{R:Merriam-Webster Online|dictionary|pos=n}} {{documentation}} </noinclude> p21ltej7up7ksd1gla7cnj85lpi0mi7 238694 238693 2026-11-11T03:24:18Z Lee 19 [[:en:Template:R:Merriam-Webster_Online]] වෙතින් එක් සංශෝධනයක් 238693 wikitext text/x-wiki <includeonly>{{#if: {{{subentry|}}} | “{{#invoke:string/templates|replace|{{#invoke:string/templates|replace|{{{subentry}}}|'|’}}|’’|''}}{{#if:{{{subpos|}}}|, ''{{{subpos}}}{{#switch:{{{subpos|}}} | idiom | phrase = <!-- Do nothing --> | . }}''}}” under&#32; }}<!-- -->{{#invoke:quote|call_template | template = cite-web | entry = {{#invoke:string/templates|replace|{{#invoke:string/templates|replace|{{{entry|{{{1|{{pagename}}}}}}}}|'|’}}|’’|''}}<!-- -->{{#if: {{{part of speech|{{{pos|{{{2|}}}}}}}}} |, {{#if: {{{noformat|}}} | {{{part of speech|{{{pos|}}}}}} | ''{{{part of speech|{{{pos|}}}}}}{{#switch:{{{part of speech|{{{pos|}}}}}} | idiom | phrase = <!-- Do nothing --> |. }}'' }} }} | entryurl = {{#if:{{{url|}}}{{{2|}}}|{{{url|{{{2|}}}}}}|https://www.merriam-webster.com/dictionary/{{urlencode:{{{entry|{{{1|{{pagename}}}}}}}}|PATH}}}} | year = 1996–present | work = w:Merriam-Webster Online | location = Springfield, Massachusetts | publisher = Merriam-Webster, Inc. | section = {{#if:{{{source|}}}|reproduced from ''[[w:Webster's Dictionary#Merriam-Webster's Collegiate Dictionary|Merriam-Webster’s Collegiate Dictionary]]'', 11th edition, Springfield, Mass.: Merriam-Webster, 2003, <small>{{OCLC|960294982}}</small>}} | textparam = 3 | passage_block = {{{passage_block|{{{text_block|}}}}}} | usenodot = 1 | allowparams = 1, 2, entry, noformat, part of speech, passage_block, pos, source, subentry, subpos, text_block, url }}</includeonly><!-- --><noinclude> {{R:Merriam-Webster Online|dictionary|pos=n}} {{documentation}} </noinclude> p21ltej7up7ksd1gla7cnj85lpi0mi7 සැකිල්ල:R:Merriam-Webster Online/documentation 10 114219 238695 197036 2026-02-14T17:40:37Z en>~2026-72188-4 0 clarification 238695 wikitext text/x-wiki {{documentation subpage}} ===Usage=== {{shortcut|Template:R:MWO|Template:R:MWOnline}} This template may be used in "References" and "Further reading" sections, and on talk pages, to provide a citation to the ''[https://www.merriam-webster.com Merriam-Webster Online]'' ("MW Online") website. ===Parameters=== * {{para|1}} or {{para|entry}} – the name of the entry on MW Online. If this parameter is not stated, the name of the Wiktionary entry is used. * {{para|pos}} or {{para|part of speech}} – the [[part of speech]] of the entry. By default, the template italicizes the value assigned to the parameter and adds a [[full stop]] ([[period]]) to the end. To turn off the default formatting for the purpose of specifying a different formatting using wikitext markup and templates, specify {{para|noformat|1}} or {{para|noformat|yes}}. * {{para|2}} or {{para|url}} – if the default [[URL]] is not linking to the correct webpage, use this parameter to indicate the URL of the MW Online webpage to be linked to. * {{para|subentry}} – a term that appears as a subentry under an entry. * {{para|subpos}} – the part of speech of the subentry. * {{para|source}} – use {{para|source|1}} or {{para|source|yes}} to display the source originally relied on by MW Online, per [https://www.merriam-webster.com/about-us/faq FAQ]: ''[[w:Webster's Dictionary#Merriam-Webster's Collegiate Dictionary|Merriam-Webster's Collegiate Dictionary]]'' (11th edition, 2003). * {{para|3}}, {{para|text}}, or {{para|passage}} – a passage quoted from the website. * {{para|nodot}} – by default, the template adds a full stop (period) at the end of the citation. To suppress this punctuation, use {{para|nodot|1}} or {{para|nodot|yes}}. ===Examples=== * '''Wikitext''': {{temp|R:Merriam-Webster Online}} (assuming the template is used on the {{m|en|quahog}} page) * '''Result''': {{R:Merriam-Webster Online|entry=quahog}} * '''Wikitext''': {{temp|R:Merriam-Webster Online|2=<nowiki>entry=Kung</nowiki>}} * '''Result''': {{R:Merriam-Webster Online|entry=Kung}} * '''Wikitext''': ** {{temp|R:Merriam Webster Online|2=entry=meet one's Waterloo|3=pos=idiom|4=url=<nowiki>https://www.merriam-webster.com/dictionary/meet%20one%27s%20Waterloo</nowiki>|5=source=1}}; or ** {{temp|R:Merriam Webster Online|2=meet one's Waterloo|3=pos=idiom|4=<nowiki>https://www.merriam-webster.com/dictionary/meet%20one%27s%20Waterloo</nowiki>|5=source=1}} * '''Result''': {{R:Merriam-Webster Online|entry=meet one's Waterloo|pos=idiom|url=https://www.merriam-webster.com/dictionary/meet%20one%27s%20Waterloo|source=1}} * '''Wikitext''': {{temp|R:Merriam-Webster Online|2=entry=dilemma|3=pos=n|4=text=<nowiki>Although some commentators insist that ''dilemma'' be restricted to instances in which the alternatives to be chosen are equally unsatisfactory, their concern is misplaced.</nowiki>|5=nodot=1}} * '''Result''': {{R:Merriam-Webster Online|entry=dilemma|pos=n|text=Although some commentators insist that ''dilemma'' be restricted to instances in which the alternatives to be chosen are equally unsatisfactory, their concern is misplaced.|nodot=1}} * '''Wikitext''': {{temp|R:Merriam-Webster Online|2=subentry=level best|3=subpos=phrase|4=entry=level|5=pos=adj}} * '''Result''': {{R:Merriam-Webster Online|subentry=level best|subpos=phrase|entry=level|pos=adj}} <includeonly> [[Category:English reference templates|Merriam-Webster Online]] </includeonly> 2vtmdlce4vg43ogrneyrev6sezlr3bo 238696 238695 2026-11-11T03:24:48Z Lee 19 [[:en:Template:R:Merriam-Webster_Online/documentation]] වෙතින් එක් සංශෝධනයක් 238695 wikitext text/x-wiki {{documentation subpage}} ===Usage=== {{shortcut|Template:R:MWO|Template:R:MWOnline}} This template may be used in "References" and "Further reading" sections, and on talk pages, to provide a citation to the ''[https://www.merriam-webster.com Merriam-Webster Online]'' ("MW Online") website. ===Parameters=== * {{para|1}} or {{para|entry}} – the name of the entry on MW Online. If this parameter is not stated, the name of the Wiktionary entry is used. * {{para|pos}} or {{para|part of speech}} – the [[part of speech]] of the entry. By default, the template italicizes the value assigned to the parameter and adds a [[full stop]] ([[period]]) to the end. To turn off the default formatting for the purpose of specifying a different formatting using wikitext markup and templates, specify {{para|noformat|1}} or {{para|noformat|yes}}. * {{para|2}} or {{para|url}} – if the default [[URL]] is not linking to the correct webpage, use this parameter to indicate the URL of the MW Online webpage to be linked to. * {{para|subentry}} – a term that appears as a subentry under an entry. * {{para|subpos}} – the part of speech of the subentry. * {{para|source}} – use {{para|source|1}} or {{para|source|yes}} to display the source originally relied on by MW Online, per [https://www.merriam-webster.com/about-us/faq FAQ]: ''[[w:Webster's Dictionary#Merriam-Webster's Collegiate Dictionary|Merriam-Webster's Collegiate Dictionary]]'' (11th edition, 2003). * {{para|3}}, {{para|text}}, or {{para|passage}} – a passage quoted from the website. * {{para|nodot}} – by default, the template adds a full stop (period) at the end of the citation. To suppress this punctuation, use {{para|nodot|1}} or {{para|nodot|yes}}. ===Examples=== * '''Wikitext''': {{temp|R:Merriam-Webster Online}} (assuming the template is used on the {{m|en|quahog}} page) * '''Result''': {{R:Merriam-Webster Online|entry=quahog}} * '''Wikitext''': {{temp|R:Merriam-Webster Online|2=<nowiki>entry=Kung</nowiki>}} * '''Result''': {{R:Merriam-Webster Online|entry=Kung}} * '''Wikitext''': ** {{temp|R:Merriam Webster Online|2=entry=meet one's Waterloo|3=pos=idiom|4=url=<nowiki>https://www.merriam-webster.com/dictionary/meet%20one%27s%20Waterloo</nowiki>|5=source=1}}; or ** {{temp|R:Merriam Webster Online|2=meet one's Waterloo|3=pos=idiom|4=<nowiki>https://www.merriam-webster.com/dictionary/meet%20one%27s%20Waterloo</nowiki>|5=source=1}} * '''Result''': {{R:Merriam-Webster Online|entry=meet one's Waterloo|pos=idiom|url=https://www.merriam-webster.com/dictionary/meet%20one%27s%20Waterloo|source=1}} * '''Wikitext''': {{temp|R:Merriam-Webster Online|2=entry=dilemma|3=pos=n|4=text=<nowiki>Although some commentators insist that ''dilemma'' be restricted to instances in which the alternatives to be chosen are equally unsatisfactory, their concern is misplaced.</nowiki>|5=nodot=1}} * '''Result''': {{R:Merriam-Webster Online|entry=dilemma|pos=n|text=Although some commentators insist that ''dilemma'' be restricted to instances in which the alternatives to be chosen are equally unsatisfactory, their concern is misplaced.|nodot=1}} * '''Wikitext''': {{temp|R:Merriam-Webster Online|2=subentry=level best|3=subpos=phrase|4=entry=level|5=pos=adj}} * '''Result''': {{R:Merriam-Webster Online|subentry=level best|subpos=phrase|entry=level|pos=adj}} <includeonly> [[Category:English reference templates|Merriam-Webster Online]] </includeonly> 2vtmdlce4vg43ogrneyrev6sezlr3bo සැකිල්ල:ja-see-kango/documentation 10 120323 238716 208916 2025-05-09T06:07:23Z en>Ookap 0 238716 wikitext text/x-wiki {{documentation subpage}} {{rfd|section=Template:ja-see-kango, Template:ja-gv}} Variant of {{temp|ja-see}}, grouping redirects to several Sino-Japanese words ([[漢語#Japanese|''kango'']]) in one Etymology section. Sometimes different Sino-Japanese morpheme strings sharing identical pronunciation and similar meaning, such as [[器械]] and [[機械]], are treated as one word on Wiktionary. In this case just redirect to the lemma entry (such as [[器械]]), and the template will display both strings of kanji. Note: Currently {{temp|ja-see}} can redirect to several words at once as well. The two templates are now more similar than different. <includeonly> [[Category:Japanese templates|see-kango]] [[Category:Disambiguation templates]] </includeonly> nkf38nclv9bfm7ug9bnu20yb9l7fd6t 238717 238716 2026-11-11T08:37:16Z Lee 19 [[:en:Template:ja-see-kango/documentation]] වෙතින් එක් සංශෝධනයක් 238716 wikitext text/x-wiki {{documentation subpage}} {{rfd|section=Template:ja-see-kango, Template:ja-gv}} Variant of {{temp|ja-see}}, grouping redirects to several Sino-Japanese words ([[漢語#Japanese|''kango'']]) in one Etymology section. Sometimes different Sino-Japanese morpheme strings sharing identical pronunciation and similar meaning, such as [[器械]] and [[機械]], are treated as one word on Wiktionary. In this case just redirect to the lemma entry (such as [[器械]]), and the template will display both strings of kanji. Note: Currently {{temp|ja-see}} can redirect to several words at once as well. The two templates are now more similar than different. <includeonly> [[Category:Japanese templates|see-kango]] [[Category:Disambiguation templates]] </includeonly> nkf38nclv9bfm7ug9bnu20yb9l7fd6t හියුබත් 0 120554 238728 237743 2026-11-11T09:15:43Z Lee 19 238728 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === සංඥා නාම පදය === {{si-proper noun}} # {{given name|si|male|from=ඉංග්‍රීසි|xlit=හියුබට්}} === මූලාශ්‍ර === <references/> * {{cite web |url=https://www.lifie.lk/2020/01/10/hela-hawla-members/ |title=දෙස, බස, රැස පෝෂණයට උර දුන් හෙළ හවුලේ ඇත්තෝ |work=lifie.lk |access-date=2025-05-06 |archiveurl=https://web.archive.org/web/20221004141736/https://www.lifie.lk/2020/01/10/hela-hawla-members/ |archivedate=1664893056 }} caiyd75qasdgg6l75h7lh7cyvkwwo8r සැකිල්ල:replace 10 125339 238675 192981 2025-12-27T06:06:28Z en>Benwing2 0 3= can be omitted to be blank 238675 wikitext text/x-wiki {{#invoke:string/templates|replace|{{{1}}}|{{{2}}}|{{{3|}}}|{{{count|{{{4|all}}}}}}|{{{plain|{{{5|yes}}}}}}}}<!-- --><noinclude>{{documentation}}</noinclude> a5boajp63b5s7mof2irflikr7g38xmb 238676 238675 2026-11-11T03:14:12Z Lee 19 [[:en:Template:replace]] වෙතින් එක් සංශෝධනයක් 238675 wikitext text/x-wiki {{#invoke:string/templates|replace|{{{1}}}|{{{2}}}|{{{3|}}}|{{{count|{{{4|all}}}}}}|{{{plain|{{{5|yes}}}}}}}}<!-- --><noinclude>{{documentation}}</noinclude> a5boajp63b5s7mof2irflikr7g38xmb සැකිල්ල:replace/documentation 10 125340 238677 202154 2026-10-27T18:43:04Z en>Benwing2 0 fix cat 238677 wikitext text/x-wiki {{documentation subpage}} This template performs string replacement. It is a wrapper for function <code>replace</code> from [[Module:string/templates]]. ==Parameters== ; {{para|1|req=1}} : The string to search. ; {{para|2|req=1}} : The string or pattern to find within source. ; {{para|3|opt=1}} : The replacement text; if omitted, same as a blank value. ; {{para|count}}, {{para|4|opt=1}} : The number of occurrences to replace, defaults to all. ; {{para|plain}}, {{para|5|opt=1}} : Boolean flag indicating that pattern should be understood as plain text (if true) and not as a Lua style regular expression, defaults to true. <includeonly> [[Category:String manipulation templates]] </includeonly> q6zvnc3syq7z2mfmcuxu9n3cefuwi8d 238678 238677 2026-11-11T03:14:42Z Lee 19 [[:en:Template:replace/documentation]] වෙතින් එක් සංශෝධනයක් 238677 wikitext text/x-wiki {{documentation subpage}} This template performs string replacement. It is a wrapper for function <code>replace</code> from [[Module:string/templates]]. ==Parameters== ; {{para|1|req=1}} : The string to search. ; {{para|2|req=1}} : The string or pattern to find within source. ; {{para|3|opt=1}} : The replacement text; if omitted, same as a blank value. ; {{para|count}}, {{para|4|opt=1}} : The number of occurrences to replace, defaults to all. ; {{para|plain}}, {{para|5|opt=1}} : Boolean flag indicating that pattern should be understood as plain text (if true) and not as a Lua style regular expression, defaults to true. <includeonly> [[Category:String manipulation templates]] </includeonly> q6zvnc3syq7z2mfmcuxu9n3cefuwi8d හරී 0 130096 238727 237742 2026-11-11T09:14:52Z Lee 19 /* මූලාශ්‍ර */ 238727 wikitext text/x-wiki == සිංහල == ===වෙනත් ආකාර=== * {{l|si|හරියි}} === නිරුක්තිය === {{etymon|si|id=හර ඊ|af|si>හර>ප්‍රකෘතිය|si>-ඊ>ප්‍රත්‍ය|tree=1}} ===උච්චාරණය=== * {{IPA|si|/ˈɦariː/}} ===ක්‍රියා පද=== {{head|si|verb |අතීත-සකර්මක අන්‍ය පුරුෂ ඒකවචන|හළි |අනතීත-කර්ම කාරක අන්‍ය පුරුෂ ඒකවචන|හැරේ |අතීත-කර්ම කාරක අන්‍ය පුරුෂ ඒකවචන|හැරිණි |අනතීත-සකර්මක අන්‍ය පුරුෂ බහුවචන|හරිති |අනතීත-සකර්මක උත්තම ඒකවචන|හරිමි |අනතීත-සකර්මක උත්තම බහුවචන|හරිමු |අනතීත-ප්‍රයුක්ත|හරවයි |අනතීත-භාව නාම|හරිනවා |අනතීත-කාරක නාම|හරින්නේ |වර්තමාන-නිපාත|හරිමින් }} # {{lb|si||සකර්මක}} {{{1|{{rfdef|si}}}}} #: ''{{{2|<!-- example sentence -->}}}'' ====ව්‍යුත්පන්න පද==== {{der3|si|තරාහරී}} ====ආශ්‍රිත පද==== {{top4}} {{der3|si|හැරුම්|හැරුම|හරන? හරින?}} {{bottom}} ==== පරිවර්තන ==== {{trans-top|හරී}} * ඉංග්‍රීසි: {{t|en|sends}} {{trans-bottom}} === මූලාශ්‍ර === <references/> * {{cite web |url=http://www.akuru.org/pps%20files/computer22.pdf |title=Computer imbroglio in keeping with Sinhala language - Part 2 |work=Aelian de Silva |access-date=2025-01-12 |archiveurl=https://web.archive.org/web/20240730054626/http://www.akuru.org/pps%20files/computer22.pdf |archivedate=1722318386 }} * "හර", කුමාරණතුංග මුනිදාස, ක්‍රියා විවරණය, පිටුව 220 [https://tipitaka.lk/library/963] * "හරී", Munidasa Cumaratunga, ''Sinhalese Through English'' එඩිය - වෙළුම 6 - කලබ 4 - පිටුව 118 [https://www.ahubudu.lk/assets/pdf/EDIYA_Veluma6,Kalaba4.pdf] [[ප්‍රවර්ගය: සිංහල ආඛ්‍යාත ක්‍රියා පද]] mkbglsbfrztv595ktwvuus1255hmz0k ගෙවිඳු 0 134438 238722 237735 2026-11-11T09:04:39Z Lee 19 238722 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === සංඥා නාම පදය === {{si-proper noun}} # {{given name|si|male}} (ගෝවින්ද) === මූලාශ්‍ර === <references/> * {{cite web|url=https://www.lifie.lk/2020/01/10/hela-hawla-members/|title=දෙස, බස, රැස පෝෂණයට උර දුන් හෙළ හවුලේ ඇත්තෝ|work=lifie.lk|access-date=2025-05-06|archiveurl=https://web.archive.org/web/20221004141736/https://www.lifie.lk/2020/01/10/hela-hawla-members/|archivedate=1664893056|access-date=1790288768}} o5xylpq3uatzufebfcb6uciuc3k22t1 238723 238722 2026-11-11T09:04:59Z Lee 19 [[Special:Contributions/Lee|Lee]] ([[User talk:Lee|සාකච්ඡාව]]) ගේ සංස්කරණයන් [[User:InternetArchiveBot|InternetArchiveBot]] ගේ අවසන් අනුවාදය වෙත ප්‍රතිවර්තනය කෙරිණි 237735 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === සංඥා නාම පදය === {{si-proper noun}} # {{given name|si|male}} (ගෝවින්ද) === මූලාශ්‍ර === <references/> * {{cite web|url=https://www.lifie.lk/2020/01/10/hela-hawla-members/|title=දෙස, බස, රැස පෝෂණයට උර දුන් හෙළ හවුලේ ඇත්තෝ|work=lifie.lk|access-date=2025-05-06|archiveurl=https://web.archive.org/web/20221004141736/https://www.lifie.lk/2020/01/10/hela-hawla-members/|archivedate=1664893056|accessdate=1790288768}} sluvk4vzihyqu60n44pxqdt3rr7po3z 238724 238723 2026-11-11T09:13:18Z Lee 19 238724 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === සංඥා නාම පදය === {{si-proper noun}} # {{given name|si|male}} (ගෝවින්ද) === මූලාශ්‍ර === <references/> * {{cite web |url=https://www.lifie.lk/2020/01/10/hela-hawla-members/ |title=දෙස, බස, රැස පෝෂණයට උර දුන් හෙළ හවුලේ ඇත්තෝ |work=lifie.lk |access-date=2025-05-06 |archiveurl=https://web.archive.org/web/20221004141736/https://www.lifie.lk/2020/01/10/hela-hawla-members/ |archivedate=1664893056 }} 3zzl1r92rkl3qfjqtcvqjuuz2fz6zdo සැකිල්ල:R:en:DAFN 10 134952 238739 216483 2026-11-11T11:54:00Z Pinthura 2424 Bot: Replacing category English reference templates with [[:ප්‍රවර්ගය:ඉංග්‍රීසි මූලාශ්‍ර සැකිලි|ඉංග්‍රීසි මූලාශ්‍ර සැකිලි]] 238739 wikitext text/x-wiki {{cite-book<!-- -->|editor=[[w:Patrick Hanks|Hanks, Patrick]]<!-- -->|title=Dictionary of American Family Names<!-- -->|trans-title=ඇමෙරිකානු පෙළපත් නාම ශබ්දකෝෂය<!-- -->|entry={{{1|{{PAGENAME}}}}}<!-- -->|entryurl=http://www.ancestry.com/name-origin?surname={{urlencode:{{{1|{{#invoke:MultiReplace|main|plain=yes|{{PAGENAME}}|&#39;|'}}}}}}}<!-- -->|location=නිව් යෝක්<!-- -->|publisher=[[w:ඔක්ස්ෆර්ඩ් විශ්වවිද්‍යාල මුද්‍රණාලය|ඔක්ස්ෆර්ඩ් විශ්වවිද්‍යාල මුද්‍රණාලය]]<!-- -->|year=2003<!-- -->|page={{{page|{{#invoke:R:en:DAFN|page_number|{{{1|{{PAGENAME}}}}}}}}}}<!-- -->|pages={{{pages|}}}<!-- -->|column={{{column|}}}<!-- -->|columns={{{columns|}}}<!-- -->|volume={{{volume|<!-- ----->{{#switch:<!-- -------->{{#invoke:string/templates|pos|{{ucfirst:{{{1|{{PAGENAME}}}}}}}|1}}<!-- -------->|A|B|C|D|E|F=1<!-- -------->|G|H|I|J|K|L|M|N=2<!-- -------->|O|P|Q|R|S|T|U|V|W|X|Y|Z=3<!-- ----->|}}}}}<!-- -->|passage={{{passage|{{{text|}}}}}}<!-- -->|pageurl={{#switch:{{{volume|<!-- ----->{{#switch:<!-- -------->{{#invoke:string/templates|pos|{{ucfirst:{{{1|{{PAGENAME}}}}}}}|1}}<!-- -------->|A|B|C|D|E|F=1<!-- -------->|G|H|I|J|K|L|M|N=2<!-- -------->|O|P|Q|R|S|T|U|V|W|X|Y|Z=3<!-- ----->|}}}}}<!-- -------->|1=https://books.google.com/books?id=vG7MZ9J6dAgC&pg=PA<!-- -------->|2=https://archive.org/details/dictionaryofamer0000unse_u7y8/page/<!-- -------->|3=https://books.google.com/books?id=vG7MZ9J6dAgC&pg=RA2-PA<!-- ----->}}{{#if:{{{page|{{{pages|}}}}}}|{{#invoke:ugly hacks|match|{{{page|{{{pages|}}}}}}|[0-9]+|}}|{{#invoke:R:en:DAFN|page_number|{{{1|{{PAGENAME}}}}}}}}}<!-- ----->{{#switch:{{{volume|<!-- ----->{{#switch:<!-- -------->{{#invoke:string/templates|pos|{{ucfirst:{{{1|{{PAGENAME}}}}}}}|1}}<!-- -------->|A|B|C|D|E|F=1<!-- -------->|G|H|I|J|K|L|M|N=2<!-- -------->|O|P|Q|R|S|T|U|V|W|X|Y|Z=3<!-- ----->|}}}}}<!-- -------->|2=/mode/1up<!-- ----->}}<!-- -->|isbn=0199771693<!-- -->}}{{#if:{{{nodot|}}}||.}}<noinclude>[[ප්‍රවර්ගය:ඉංග්‍රීසි මූලාශ්‍ර සැකිලි|DAFN]]</noinclude> 1me9p6wgjc7h0oj25fkhyoij906qzp7 කුලගෙදර 0 139052 238726 224978 2026-11-11T09:14:24Z Lee 19 238726 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # {{rfdef|si}} :# {{ux |si |'''කුලගෙදරින්''' දුම්බර කඳුවැටියේ...[පතිකුලයට අද] කැන්දන් එනවා දුම්බර මැණිකේ. |ref=<ref>{{cite-web|author=|authorlink= |title=කුලගෙදරින් - බන්දුල විජේවීර |url=https://geepadura.blogspot.com/2015/07/kulagedarin-bandula-wijeyweera-sinhala.html |archiveurl= |archivedate= |work=ගී පැදුර බ්ලොග් අඩවිය |publisher=|date= |access-date=2025-11-02 |text= }}</ref> }} === මූලාශ්‍ර === <references/> <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග්‍රීසි වචනය>>}} {{trans-bottom}} === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> s2th62x95mkzo6j4y1m29cj8bohqgax දුම්බර 0 139053 238721 224979 2026-11-11T09:03:53Z Lee 19 238721 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # {{rfdef|si}} :# {{ux |si |කුලගෙදරින් '''දුම්බර''' කඳුවැටියේ...[පතිකුලයට අද] කැන්දන් එනවා දුම්බර මැණිකේ. |ref=<ref>{{cite-web|author=|authorlink= |title=කුලගෙදරින් - බන්දුල විජේවීර |url=https://geepadura.blogspot.com/2015/07/kulagedarin-bandula-wijeyweera-sinhala.html |archiveurl= |archivedate= |work=ගී පැදුර බ්ලොග් අඩවිය |publisher=|date= |access-date=2025-11-02|text= }}</ref> }} === මූලාශ්‍ර === <references/> <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග්‍රීසි වචනය>>}} {{trans-bottom}} === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> 9lx0hw2yjchuviq7m7apkxxnywj1gf1 කඳුවැටිය 0 139054 238725 224977 2026-11-11T09:13:56Z Lee 19 238725 wikitext text/x-wiki == සිංහල == === නිරුක්තිය === {{rfe|si}} === නාම පදය === {{si-noun}} # {{rfdef|si}} :# {{ux |si |කුලගෙදරින් දුම්බර '''කඳුවැටියේ'''...[පතිකුලයට අද] කැන්දන් එනවා දුම්බර මැණිකේ. |ref=<ref>{{cite-web|author=|authorlink= |title=කුලගෙදරින් - බන්දුල විජේවීර |url=https://geepadura.blogspot.com/2015/07/kulagedarin-bandula-wijeyweera-sinhala.html |archiveurl= |archivedate= |work=ගී පැදුර බ්ලොග් අඩවිය |publisher=|date= |access-date=2025-11-02 |text= }}</ref> }} === මූලාශ්‍ර === <references/> <!-- ==== පරිවර්තන ==== {{trans-top|පරිවර්තන}} * ඉංග්‍රීසි: {{t|en|<<ඉංග්‍රීසි වචනය>>}} {{trans-bottom}} === අමතර අවධානයට === * {{l|si|<<ආශ්‍රිත පවතින වෙනත් වචන>>}} --> ilgq0tmsizvjsi0p4d6bn9vsfwrkgek සැකිල්ල:cite-web/sandbox 10 145748 238671 2024-12-27T02:46:09Z en>Atlas Þə Biologist 0 Created page with "<includeonly>{{#invoke:quote|cite_t | alias = chapter: title,webpage; trans-chapter: trans-title,trans-webpage; chapterurl: titleurl,webpageurl; chapter_tlr: webpage_tlr; chapter_series: webpage_series; chapter_seriesvolume: webpage_seriesvolume; chapter_number: webpage_number; chapter_plain: title_plain,webpage_plain; title: site,work; trans-title: trans-site,trans-work; | noroman = chapter }}</includeonly><!-- --><noinclude>{{ci..." 238671 wikitext text/x-wiki <includeonly>{{#invoke:quote|cite_t | alias = chapter: title,webpage; trans-chapter: trans-title,trans-webpage; chapterurl: titleurl,webpageurl; chapter_tlr: webpage_tlr; chapter_series: webpage_series; chapter_seriesvolume: webpage_seriesvolume; chapter_number: webpage_number; chapter_plain: title_plain,webpage_plain; title: site,work; trans-title: trans-site,trans-work; | noroman = chapter }}</includeonly><!-- --><noinclude>{{cite-web|en|author=Meg Downey|title=Marvel’s Comic Soul Stone could Explain the Jump from Infinity War’s Ending to Avengers 4: A Brief History of Crazy Multidimensional Power|url=https://www.polygon.com/2018/5/7/17328230/infinity-war-avengers-4-marvel-comics-soul-stone|archiveurl=https://web.archive.org/web/20180624110542/https://www.polygon.com/2018/5/7/17328230/infinity-war-avengers-4-marvel-comics-soul-stone|archivedate=24 June 2018|work=[[w:Polygon (website)|Polygon]]|date=7 May 2018|passage=There’s a very real chance that, rather than crumbling into the dust and floating off into the '''ether''', Thanos’s victims [in the film ''[[w:Avengers: Infinity War|Avengers: Infinity War]]''] were actually sucked up into the Soul Stone.}}<!-- -->{{documentation}}</noinclude> 4pbpke6czm6zkoc5m30ung4u71cbeee 238672 238671 2026-11-11T03:11:38Z Lee 19 [[:en:Template:cite-web/sandbox]] වෙතින් එක් සංශෝධනයක් 238671 wikitext text/x-wiki <includeonly>{{#invoke:quote|cite_t | alias = chapter: title,webpage; trans-chapter: trans-title,trans-webpage; chapterurl: titleurl,webpageurl; chapter_tlr: webpage_tlr; chapter_series: webpage_series; chapter_seriesvolume: webpage_seriesvolume; chapter_number: webpage_number; chapter_plain: title_plain,webpage_plain; title: site,work; trans-title: trans-site,trans-work; | noroman = chapter }}</includeonly><!-- --><noinclude>{{cite-web|en|author=Meg Downey|title=Marvel’s Comic Soul Stone could Explain the Jump from Infinity War’s Ending to Avengers 4: A Brief History of Crazy Multidimensional Power|url=https://www.polygon.com/2018/5/7/17328230/infinity-war-avengers-4-marvel-comics-soul-stone|archiveurl=https://web.archive.org/web/20180624110542/https://www.polygon.com/2018/5/7/17328230/infinity-war-avengers-4-marvel-comics-soul-stone|archivedate=24 June 2018|work=[[w:Polygon (website)|Polygon]]|date=7 May 2018|passage=There’s a very real chance that, rather than crumbling into the dust and floating off into the '''ether''', Thanos’s victims [in the film ''[[w:Avengers: Infinity War|Avengers: Infinity War]]''] were actually sucked up into the Soul Stone.}}<!-- -->{{documentation}}</noinclude> 4pbpke6czm6zkoc5m30ung4u71cbeee ප්‍රවර්ගය:පාලි සංඥා නාම පද, සිංහල අක්ෂරක්‍රමය භාවිතා කොට ලියන ලද 14 145749 238679 2026-11-11T03:18:50Z Pinthura 2424 සේවා: [[:[[en:Category:Pali proper nouns in Sinhalese script]]]] තුළ තිබූ පෙළ මෙහි ඇතුළු කිරීම. 238679 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 238681 238679 2026-11-11T03:19:10Z Pinthura 2424 Pinthura විසින් [[ප්‍රවර්ගය:Pali proper nouns in Sinhalese script]] සිට [[ප්‍රවර්ගය:පාලි සංඥා නාම පද, සිංහල අක්ෂරක්‍රමය භාවිතා කොට ලියන ලද]] වෙත පිටුව ගෙන යන ලදී: සේවා: නව ප්‍රවර්ග නාමය වෙත ගෙනයාම. 238679 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 238685 238681 2026-11-11T03:19:30Z Pinthura 2424 සේවා: ඉංග්‍රීසි ව්‍යාපෘතිය වෙත සබැඳියක් එක් කිරීම. 238685 wikitext text/x-wiki {{auto cat}} [[en:Category:Pali proper nouns in Sinhalese script]] 3v3dudwngjt5qf3bm5mt92ytagkb06o ප්‍රවර්ගය:සංස්කෘත සංඥා නාම පද, සිංහල අක්ෂරක්‍රමය භාවිතා කොට ලියන ලද 14 145750 238680 2026-11-11T03:19:00Z Pinthura 2424 සේවා: [[:[[en:Category:Sanskrit proper nouns in Sinhalese script]]]] තුළ තිබූ පෙළ මෙහි ඇතුළු කිරීම. 238680 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 238683 238680 2026-11-11T03:19:20Z Pinthura 2424 Pinthura විසින් [[ප්‍රවර්ගය:Sanskrit proper nouns in Sinhalese script]] සිට [[ප්‍රවර්ගය:සංස්කෘත සංඥා නාම පද, සිංහල අක්ෂරක්‍රමය භාවිතා කොට ලියන ලද]] වෙත පිටුව ගෙන යන ලදී: සේවා: නව ප්‍රවර්ග නාමය වෙත ගෙනයාම. 238680 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 238686 238683 2026-11-11T03:19:40Z Pinthura 2424 සේවා: ඉංග්‍රීසි ව්‍යාපෘතිය වෙත සබැඳියක් එක් කිරීම. 238686 wikitext text/x-wiki {{auto cat}} [[en:Category:Sanskrit proper nouns in Sinhalese script]] 2yqhamnc3d6c0lv4m2xqlfj2vyq6jlo ප්‍රවර්ගය:Pali proper nouns in Sinhalese script 14 145751 238682 2026-11-11T03:19:10Z Pinthura 2424 Pinthura විසින් [[ප්‍රවර්ගය:Pali proper nouns in Sinhalese script]] සිට [[ප්‍රවර්ගය:පාලි සංඥා නාම පද, සිංහල අක්ෂරක්‍රමය භාවිතා කොට ලියන ලද]] වෙත පිටුව ගෙන යන ලදී: සේවා: නව ප්‍රවර්ග නාමය වෙත ගෙනයාම. 238682 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:පාලි සංඥා නාම පද, සිංහල අක්ෂරක්‍රමය භාවිතා කොට ලියන ලද]] pzv02q4qv6j0p3evx8vprg8snnhrjyw 238687 238682 2026-11-11T03:19:50Z Pinthura 2424 සේවා: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම. 238687 wikitext text/x-wiki {{category redirect|පාලි සංඥා නාම පද, සිංහල අක්ෂරක්‍රමය භාවිතා කොට ලියන ලද}} evpexj1agcgjzn3or1vcgglv2iazgbx ප්‍රවර්ගය:Sanskrit proper nouns in Sinhalese script 14 145752 238684 2026-11-11T03:19:20Z Pinthura 2424 Pinthura විසින් [[ප්‍රවර්ගය:Sanskrit proper nouns in Sinhalese script]] සිට [[ප්‍රවර්ගය:සංස්කෘත සංඥා නාම පද, සිංහල අක්ෂරක්‍රමය භාවිතා කොට ලියන ලද]] වෙත පිටුව ගෙන යන ලදී: සේවා: නව ප්‍රවර්ග නාමය වෙත ගෙනයාම. 238684 wikitext text/x-wiki #යළියොමුව [[:ප්‍රවර්ගය:සංස්කෘත සංඥා නාම පද, සිංහල අක්ෂරක්‍රමය භාවිතා කොට ලියන ලද]] f8pvk5hdlqct4vsx7mo0y3iuk02fhm3 238688 238684 2026-11-11T03:20:00Z Pinthura 2424 සේවා: යළියොමුව, මෘදු ප්‍රවර්ග යළියොමුවක් බවට හැරවීම. 238688 wikitext text/x-wiki {{category redirect|සංස්කෘත සංඥා නාම පද, සිංහල අක්ෂරක්‍රමය භාවිතා කොට ලියන ලද}} 93m2dny4wn8h1p4qyv2liqn5onpszsl ප්‍රවර්ගය:Pali සංඥා නාම පද, Sinhalese අක්ෂරක්‍රමය භාවිතා කොට ලියන ලද 14 145753 238689 2026-11-11T03:20:10Z Pinthura 2424 සේවා: මෘදු ප්‍රවර්ග යළියොමුවක් නිර්මාණය. 238689 wikitext text/x-wiki {{category redirect|පාලි සංඥා නාම පද, සිංහල අක්ෂරක්‍රමය භාවිතා කොට ලියන ලද}} evpexj1agcgjzn3or1vcgglv2iazgbx ප්‍රවර්ගය:Sanskrit සංඥා නාම පද, Sinhalese අක්ෂරක්‍රමය භාවිතා කොට ලියන ලද 14 145754 238690 2026-11-11T03:20:20Z Pinthura 2424 සේවා: මෘදු ප්‍රවර්ග යළියොමුවක් නිර්මාණය. 238690 wikitext text/x-wiki {{category redirect|සංස්කෘත සංඥා නාම පද, සිංහල අක්ෂරක්‍රමය භාවිතා කොට ලියන ලද}} 93m2dny4wn8h1p4qyv2liqn5onpszsl ප්‍රවර්ගය:පාලි proper nouns in සිංහල script 14 145755 238691 2026-11-11T03:20:30Z Pinthura 2424 සේවා: මෘදු ප්‍රවර්ග යළියොමුවක් නිර්මාණය. 238691 wikitext text/x-wiki {{category redirect|පාලි සංඥා නාම පද, සිංහල අක්ෂරක්‍රමය භාවිතා කොට ලියන ලද}} evpexj1agcgjzn3or1vcgglv2iazgbx ප්‍රවර්ගය:සංස්කෘත proper nouns in සිංහල script 14 145756 238692 2026-11-11T03:20:40Z Pinthura 2424 සේවා: මෘදු ප්‍රවර්ග යළියොමුවක් නිර්මාණය. 238692 wikitext text/x-wiki {{category redirect|සංස්කෘත සංඥා නාම පද, සිංහල අක්ෂරක්‍රමය භාවිතා කොට ලියන ලද}} 93m2dny4wn8h1p4qyv2liqn5onpszsl සැකිල්ල:defdate/documentation 10 145757 238699 2026-09-29T06:37:27Z en>J3133 0 238699 wikitext text/x-wiki {{documentation subpage}} {{uses templatestyles|defdate/styles.css}} This template provides information about when a sense was first used, generally given to the nearest century. The template is placed at the end of a sense-line, after the definition. ==Parameters== {| class=wikitable ! Parameter !! Required !! Usage |- | | <code>|1=</code> || | Yes || | Year or century. If <code>|2=</code> is specified, this is the start range for year or century. |- | | <code>|2=</code> || | No || | End range for year or century. |- | | <code>|ref=</code>, <code>|ref2=</code>, <code>|ref3=</code> || | No || | Reference content |- | | <code>|refn=</code>, <code>|ref2n=</code>, <code>|ref3n=</code> || | No || | Name of a reference (for reuse) |} ==Examples== * For words that are still in use, please specify <code>'''from'''</code> a given date. *: ''e.g.'', {{temp|defdate|from 17th c.}} returns {{defdate|from 17th c.}} * For obsolete senses, two parameters may be given, automatically printing an [[en dash]]. *: ''e.g.'', {{temp|defdate|17th|19th c.}} returns {{defdate|17th|19th c.}} * References can be added using the {{para|ref}} parameter. If there are multiple references, {{para|ref2}} and {{para|ref3}} should be used. * References can then be named using the {{para|refn}} parameter. If there are multiple references, {{para|ref2n}} and {{para|ref3n}} should be used. ==Cleanup== * [[Special:WhatLinksHere/Wiktionary:Tracking/defdate/hyphen|Tracking list]] for entries using hyphens to be replaced with en dashes <includeonly> [[Category:Dating templates]] </includeonly> a1s6ne7q4scn9zhj8qmzjoqqdytps2r 238700 238699 2026-11-11T03:28:06Z Lee 19 [[:en:Template:defdate/documentation]] වෙතින් එක් සංශෝධනයක් 238699 wikitext text/x-wiki {{documentation subpage}} {{uses templatestyles|defdate/styles.css}} This template provides information about when a sense was first used, generally given to the nearest century. The template is placed at the end of a sense-line, after the definition. ==Parameters== {| class=wikitable ! Parameter !! Required !! Usage |- | | <code>|1=</code> || | Yes || | Year or century. If <code>|2=</code> is specified, this is the start range for year or century. |- | | <code>|2=</code> || | No || | End range for year or century. |- | | <code>|ref=</code>, <code>|ref2=</code>, <code>|ref3=</code> || | No || | Reference content |- | | <code>|refn=</code>, <code>|ref2n=</code>, <code>|ref3n=</code> || | No || | Name of a reference (for reuse) |} ==Examples== * For words that are still in use, please specify <code>'''from'''</code> a given date. *: ''e.g.'', {{temp|defdate|from 17th c.}} returns {{defdate|from 17th c.}} * For obsolete senses, two parameters may be given, automatically printing an [[en dash]]. *: ''e.g.'', {{temp|defdate|17th|19th c.}} returns {{defdate|17th|19th c.}} * References can be added using the {{para|ref}} parameter. If there are multiple references, {{para|ref2}} and {{para|ref3}} should be used. * References can then be named using the {{para|refn}} parameter. If there are multiple references, {{para|ref2n}} and {{para|ref3n}} should be used. ==Cleanup== * [[Special:WhatLinksHere/Wiktionary:Tracking/defdate/hyphen|Tracking list]] for entries using hyphens to be replaced with en dashes <includeonly> [[Category:Dating templates]] </includeonly> a1s6ne7q4scn9zhj8qmzjoqqdytps2r සැකිල්ල:defdate/styles.css 10 145758 238701 2026-04-15T09:13:21Z en>Surjection 0 Changed protection settings for "[[Template:defdate/styles.css]]": Highly visible template/module ([Edit=Allow only autopatrollers] (indefinite) [Move=Allow only autopatrollers] (indefinite)) 238701 sanitized-css text/css .defdate { font-size: smaller; } gxh8pbg6ylt5r5exiillg3l7rk4hhaf 238702 238701 2026-11-11T03:28:13Z Lee 19 [[:en:Template:defdate/styles.css]] වෙතින් එක් සංශෝධනයක් 238701 sanitized-css text/css .defdate { font-size: smaller; } gxh8pbg6ylt5r5exiillg3l7rk4hhaf සැකිල්ල:cite-meta/sandbox 10 145759 238707 2025-04-05T19:02:45Z en>SurjectionBot 0 (bot) rename [[Module:string]] to [[Module:string/templates]] 238707 wikitext text/x-wiki <includeonly>{{#if:{{{author|}}}{{{last|}}} | {{#if:{{{authorlink|}}} | [[w:{{{authorlink}}}|{{#if:{{{author|}}} | {{{author}}} | {{#if:{{{last|}}} | {{{last}}}{{#if:{{{first|}}}|, {{{first}}}}} }} }}]] | {{#if:{{{author|}}} | {{{author}}} | {{#if:{{{last|}}} | {{{last}}}{{#if:{{{first|}}}|, {{{first}}}}} }} }} }}{{#if:{{{author2|}}}{{{last2|}}} | {{#if:{{{authorlink2|}}} | &#59; [[w:{{{authorlink2}}}|{{#if:{{{author2|}}} | {{{author2}}} | {{#if:{{{last2|}}} | {{{last2}}}{{#if:{{{first2|}}}|, {{{first2}}}}} }} }}]] | &#59; {{#if:{{{author2|}}} | {{{author2}}} | {{#if:{{{last2|}}} | {{{last2}}}{{#if:{{{first2|}}}|, {{{first2}}}}} }} }} }} }}{{#if:{{{author3|}}}{{{last3|}}} | {{#if:{{{authorlink3|}}} | &#59; [[w:{{{authorlink3}}}|{{#if:{{{author3|}}} | {{{author3}}} | {{#if:{{{last3|}}} | {{{last3}}}{{#if:{{{first3|}}}|, {{{first3}}}}} }} }}]] | &#59; {{#if:{{{author3|}}} | {{{author3}}} | {{#if:{{{last3|}}} | {{{last3}}}{{#if:{{{first3|}}}|, {{{first3}}}}} }} }} }} }}{{#if:{{{author4|}}}{{{last4|}}} | {{#if:{{{authorlink4|}}} | &#59; [[w:{{{authorlink4}}}|{{#if:{{{author4|}}} | {{{author4}}} | {{#if:{{{last4|}}} | {{{last4}}}{{#if:{{{first4|}}}|, {{{first4}}}}} }} }}]] | &#59; {{#if:{{{author4|}}} | {{{author4}}} | {{#if:{{{last4|}}} | {{{last4}}}{{#if:{{{first4|}}}|, {{{first4}}}}} }} }} }} }}{{#if:{{{author5|}}}{{{last5|}}} | {{#if:{{{authorlink5|}}} | &#59; [[w:{{{authorlink5}}}|{{#if:{{{author5|}}} | {{{author5}}} | {{#if:{{{last5|}}} | {{{last5}}}{{#if:{{{first5|}}}|, {{{first5}}}}} }} }}]] | &#59; {{#if:{{{author5|}}} | {{{author5}}} | {{#if:{{{last5|}}} | {{{last5}}}{{#if:{{{first5|}}}|, {{{first5}}}}} }} }} }} }}{{#if:{{{coauthors|}}} | &#59; {{{coauthors}}} }}{{#if:{{{quotee|}}} | &#59; quoting {{{quotee|}}}&#32; }}{{#if:{{{translator|}}} | &#59; {{{translator|}}}, transl. }} | {{#if:{{{quotee|}}}<!--If quotee or translator stated without author, display it here.--> | quoting {{{quotee|}}} }}{{#if:{{{translator|}}} | {{#if:{{{quotee|}}}|&#59;&#32;}}{{{translator|}}}, transl. }} }}{{#if:{{{author|}}}{{{last|}}}{{{quotee|}}}{{{translator|}}}|,&#32;}}<!--Add a comma before chapter, entry or title if author, quotee or translator specified-->{{#if:{{{chapter|}}}{{{entry|}}} | {{#if:{{{entry|}}} | {{#invoke:italics|unitalicize_brackets|{{#if:{{{entryurl|}}} | “[{{{entryurl}}} {{{entry}}}] | “{{{entry}}} }}}}{{#if:{{{trans-chapter|}}} |&#32;&#91;{{#invoke:italics|unitalicize_brackets|{{{trans-chapter}}}}}&#93;” | ” }}{{#if:{{{notitle|}}}||, in&#32;}} | {{#if:{{{chapter|}}} | {{#if:{{num|{{{chapter}}}}}<!--Arabic chapter number?--> | &#32;chapter {{#if:{{{chapterurl|}}} | [{{{chapterurl}}} {{{chapter}}}] | {{{chapter}}} }} | {{#if:{{R2A|{{{chapter}}}|no_error=1}}<!--Roman chapter number?--> | &#32;chapter {{#if:{{{chapterurl|}}} | [{{{chapterurl}}} {{uc:{{{chapter}}}}}] | {{uc:{{{chapter}}}}} }} | &#32;“{{#invoke:italics|unitalicize_brackets|{{#if:{{{chapterurl|}}}<!--Must be a chapter name--> | [{{{chapterurl}}} {{{chapter}}}] | {{{chapter}}} }}}}{{#if:{{{trans-chapter|}}} | &#32;&#91;{{#invoke:italics|unitalicize_brackets|{{{trans-chapter}}}}}&#93; }}” }} }}{{#if:{{{notitle|}}}||, in&#32;}} }} }} }}{{#if:{{{mainauthor|}}} | {{{mainauthor}}},&#32; }}{{#if:{{{editor|}}}{{{editors|}}} | {{#if:{{{editor|}}} | {{{editor}}}, editor,&#32; | {{#if:{{{editors|}}} | {{{editors}}}, editors,&#32; }} }} }}{{#if:{{{title|}}} | <cite>{{#invoke:italics|unitalicize_brackets|{{{title}}}}}</cite> | {{#if:{{{notitle|}}} |<!--Do nothing.--> | {{maintenance line|please provide the title of the work}} }} }}{{#if:{{{trans-title|}}} | &#32;&#91;<cite>{{#invoke:italics|unitalicize_brackets|{{{trans-title}}}}}</cite>&#93; }}{{#if:{{{type|}}} | &#32;&#40;{{{type}}}&#41; }}{{#if:{{{series|}}} | &#32;({{{series}}}{{#if:{{{seriesvolume|}}}|&#59; {{{seriesvolume}}}}}) }}{{#if:{{{url|}}} | {{#if:{{{archiveurl|}}} | &lrm;<!--Left-to-right mark to manage right-to-left languages--><sup>[{{{archiveurl}}}]</sup> | &lrm;<sup>[{{{url}}}]</sup> }} }}{{#if:{{{format|}}}{{{genre|}}} | {{#if:{{{lang|}}}{{{worklang|}}} | &#32;({{#if:{{{format|}}} | {{{format}}} | {{#if:{{{genre|}}} | {{{genre}}} }} }}, in {{#invoke:languages/templates|getCanonicalName|{{{lang|{{{worklang|}}}}}}|return_if_invalid=1}}) | &#32;({{#if:{{{format|}}} | {{{format}}} | {{#if:{{{genre|}}} | {{{genre}}} }} }}) }} | {{#if:{{{lang|}}}{{{worklang|}}} | &#32;(in {{#invoke:languages/templates|getCanonicalName|{{{lang|{{{worklang|}}}}}}|return_if_invalid=1}}) }} }}{{#if:{{{version|}}} |, {{{version}}} }}{{#if:{{{volume|}}} |, volume {{{volume}}} }}{{#if:{{{issue|}}} |, issue {{{issue}}} }}{{#if:{{{others|}}} |, {{{others}}} }}{{#if:{{{edition|}}} |, {{{edition}}} edition }}{{#if:{{{publisher|}}} | {{#if:{{{location|}}} |, {{{location}}}&#58; |, }} {{{publisher}}} | {{#if:{{{location|}}} |, {{{location}}} }} }}{{#if:{{{nodate|}}}|<!--Do nothing-->|{{#if:{{{year|}}} | {{#if:{{{month|}}} |, {{{month}}} {{{year}}} |, {{#switch:{{padleft:|2|{{{year}}}}} | a. = ''[[Appendix:Glossary#a.|a.]]'' {{#invoke:string/templates|sub|{{{year}}}|4}} | c. = ''[[Appendix:Glossary#c.|c.]]'' {{#invoke:string/templates|sub|{{{year}}}|4}} | p. = ''[[Appendix:Glossary#p.|p.]]'' {{#invoke:string/templates|sub|{{{year}}}|4}} | {{{year}}} }} }} | {{#if:{{{date|}}} |, {{#formatdate:{{{date}}}}} | {{#if:{{{accessdate|}}} |, retrieved {{#formatdate:{{{accessdate|}}}}}<!--Use accessdate as a backstop if year or date not specified.--> |, {{rfdate|und<noinclude>|nocat=true</noinclude>}}<!--Using und is a hack but avoids the need to pass a lang to all {{cite}} templates--> }} }} }}{{#if:{{{year_published|}}} |, published {{{year_published}}} }}}}{{#if:{{{bibcode|}}} |, <small>[[w:Bibcode|Bibcode]]:&nbsp;[https://ui.adsabs.harvard.edu/abs/{{urlencode:{{{bibcode}}}}} {{{bibcode}}}]</small> }}{{#if:{{{doi|}}} |, <small>[[w:Digital object identifier|DOI]]:{{#if:{{{doi_brokendate|}}} | {{#tag:nowiki|{{{doi}}}}} (inactive [[{{{doi_brokendate}}}]]){{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:Pages with DOIs broken since {{#time:Y|{{{doi_brokendate}}}}}]]}} | <span class="neverexpand">[https://doi.org/{{urlencode:{{{doi}}}}} {{#tag:nowiki|{{{doi}}}}}]</span> }}</small> }}{{#if:{{{isbn|}}} |, <small>{{ISBN|{{{isbn}}}}}</small> }}{{#if:{{{issn|}}} |, <small>{{ISSN|{{{issn}}}}}</small> }}{{#if:{{{jstor|}}} |, <small>[[w:JSTOR|JSTOR]] [https://www.jstor.org/stable/{{urlencode:{{{jstor}}}}} {{{jstor}}}]</small> }}{{#if:{{{lccn|}}} |, <small>[[w:Library of Congress Control Number|LCCN]] [https://lccn.loc.gov/{{urlencode:{{{lccn}}}}} {{{lccn}}}]</small> }}{{#if:{{{oclc|}}} |, <small>[[w:OCLC|OCLC]] [https://worldcat.org/oclc/{{urlencode:{{{oclc}}}}} {{{oclc}}}]</small> }}{{#if:{{{ol|}}} |, <small>[[w:Open Library|OL]] [https://openlibrary.org/works/OL{{urlencode:{{{ol}}}}}/ {{{ol}}}]</small> }}{{#if:{{{pmid|}}} |, <small>[[w:PubMed Identifier|PMID]] [https://www.ncbi.nlm.nih.gov/pubmed/{{urlencode:{{{pmid}}}}} {{{pmid}}}]</small> }}{{#if:{{{ssrn|}}} |, <small>[[w:Social Science Research Network|SSRN]] [https://ssrn.com/abstract={{urlencode:{{{ssrn}}}}} {{{ssrn}}}]</small> }}{{#if:{{{id|}}} |, <small>{{{id}}}</small> }}{{#if:{{{archiveurl|}}} |, archived from [{{{url}}} the original] on {{#formatdate:{{{archivedate}}}}} }}{{#if:{{{accessdate|{{{access-date|}}}}}} | {{#if:{{{date|}}}{{{year|}}}<!--Only display accessdate if either date or year is specified, as accessdate is already used earlier in place of these parameters if they are missing.--> |, retrieved {{#formatdate:{{{accessdate|{{{access-date}}}}}}}} }} }}{{#if:{{{section|}}} |, {{#if:{{{sectionurl|}}} | [{{{sectionurl}}} {{{section}}}] | {{{section}}} }} }}{{#if:{{{line|}}} |, line {{{line}}} | {{#if:{{{lines|}}} |, lines {{{lines}}} }} }}{{#if:{{{pages|}}} | {{#if:{{{page|}}} |, {{#if:{{{pageurl|}}} | [{{{pageurl}}} page {{{page}}}] | page {{{page}}} }}&#32;of {{{pages}}} |, {{#if:{{{pageurl|}}} | [{{{pageurl}}} pages {{{pages}}}] | pages {{{pages}}} }} }} | {{#if:{{{page|}}} |, {{#if:{{{pageurl|}}} | [{{{pageurl}}} page {{{page}}}] | page {{{page}}} }} }} }}{{#if:{{{column|}}}{{{columns|}}} |, {{#if:{{{columnurl|}}} | [{{{columnurl}}} {{#if:{{{columns|}}} | columns {{{columns}}} | column {{{column}}} }}] | {{#if:{{{columns|}}} | columns {{{columns}}} | column {{{column}}} }} }} }}{{#if:{{{newversion|}}}{{{location2|}}}{{{2ndauthor|}}}{{{2ndlast|}}}{{{translator2|}}}{{{editor2|}}}{{{title2|}}}<!--Test for new version of work.--> |&#59; {{#if:{{{newversion|}}} | {{{newversion}}} | {{#if:{{{edition2|}}} |<!--Do nothing--> | {{#if:{{{2ndauthor|}}}{{{2ndlast|}}}{{{translator2|}}}{{{editor2|}}}{{{title2|}}} | republished as | republished }} }} }}&#32; }}{{#if:{{{2ndauthor|}}}{{{2ndlast|}}} | {{#if:{{{2ndauthorlink|}}} | &#32;[[w:{{{2ndauthorlink}}}|{{#if:{{{2ndauthor|}}} | {{{2ndauthor}}},&#32; | {{#if:{{{2ndlast|}}} | {{{2ndlast}}}{{#if:{{{2ndfirst|}}}|, {{{2ndfirst}}}}},&#32; }} }}]] | {{#if:{{{2ndauthor|}}} | &#32;{{{2ndauthor}}},&#32; | {{#if:{{{2ndlast|}}} | &#32;{{{2ndlast}}}{{#if:{{{2ndfirst|}}}|, {{{2ndfirst}}}}},&#32; }} }} }} }}{{#if:{{{translator2|}}} | &#59; {{{translator2|}}}, transl.,&#32; }}{{#if:{{{chapter2|}}}{{{entry2|}}} | {{#if:{{{entry2|}}} | {{#invoke:italics|unitalicize_brackets|{{#if:{{{entryurl2|}}} | “[{{{entryurl2}}} {{{entry2}}}] | “{{{entry2}}} }}}}{{#if:{{{trans-chapter2|}}} | &#32;&#91;{{#invoke:italics|unitalicize_brackets|{{{trans-chapter2}}}}}&#93;” | ” }}{{#if:{{{notitle2|}}}||, in&#32;}} | {{#if:{{{chapter2|}}} | {{#if:{{num|{{{chapter2}}}}}<!--Arabic chapter number?--> | &#32;chapter {{#if:{{{chapterurl2|}}} | [{{{chapterurl2}}} {{{chapter2}}}] | {{{chapter2}}} }} | {{#if:{{R2A|{{{chapter2}}}|no_error=1}}<!--Roman chapter number?--> | &#32;chapter {{#if:{{{chapterurl2|}}} | [{{{chapterurl2}}} {{uc:{{{chapter2}}}}}] | {{uc:{{{chapter2}}}}} }} | &#32;“{{#invoke:italics|unitalicize_brackets|{{#if:{{{chapterurl2|}}}<!--Must be a chapter name--> | [{{{chapterurl2}}} {{{chapter2}}}] | {{{chapter2}}} }}}}{{#if:{{{trans-chapter2|}}} | &#32;&#91;{{#invoke:italics|unitalicize_brackets|{{{trans-chapter2}}}}}&#93; }}” }} }}{{#if:{{{notitle2|}}}||, in&#32;}} }} }} }}{{#if:{{{mainauthor2|}}} | {{{mainauthor2}}}{{#if:{{{editor2|}}}{{{editors2|}}}|&#59;&#32;|,}} }}{{#if:{{{editor2|}}}{{{editors2|}}} | {{#if:{{{editor2|}}} | {{{editor2}}}, editor, | {{#if:{{{editors2|}}} | {{{editors2}}}, editors, }} }} }}{{#if:{{{title2|}}} | &#32;<cite>{{#invoke:italics|unitalicize_brackets|{{{title2}}}}}</cite> }}{{#if:{{{trans-title2|}}} | &#32;&#91;<cite>{{#invoke:italics|unitalicize_brackets|{{{trans-title2}}}}}</cite>&#93; }}{{#if:{{{type2|}}} | &#32;&#40;{{{type2}}}&#41; }}{{#if:{{{series2|}}} | &#32;({{{series2}}}{{#if:{{{seriesvolume2|}}}|&#59; {{{seriesvolume2}}}}}) }}{{#if:{{{url2|}}} | {{#if:{{{archiveurl2|}}} | &lrm;<sup>[{{{archiveurl2}}}]</sup> | &lrm;<sup>[{{{url2}}}]</sup> }} }}{{#if:{{{format2|}}}{{{genre2|}}} | {{#if:{{{lang2|}}}{{{worklang2|}}} | &#32;({{#if:{{{format2|}}} | {{{format2}}} | {{#if:{{{genre2|}}} | {{{genre2}}} }} }}, in {{#invoke:languages/templates|getCanonicalName|{{{lang2|{{{worklang2|}}}}}}|return_if_invalid=1}}) | &#32;({{#if:{{{format2|}}} | {{{format2}}} | {{#if:{{{genre2|}}} | {{{genre2}}} }} }}) }} | {{#if:{{{lang2|}}}{{{worklang2|}}} | &#32;(in {{#invoke:languages/templates|getCanonicalName|{{{lang2|{{{worklang2|}}}}}}|return_if_invalid=1}}) }} }}{{#if:{{{version2|}}} |, {{{version2}}} }}{{#if:{{{volume2|}}} |, volume {{{volume2}}} | {{#if:{{{volume_plain2|}}} |, {{{volume_plain2}}} }} }}{{#if:{{{issue2|}}} |, number {{{issue2}}} }}{{#if:{{{edition2|}}} | {{#if:{{{title2|}}}|,&#32;}}{{{edition2}}} edition }}{{#if:{{{others2|}}} |, {{{others2}}} }}{{#if:{{{publisher2|}}} | {{#if:{{{location2|}}} | {{#if:{{{edition2|}}}{{{title2|}}}|,&#32;}}{{{location2}}}&#58; |, }} {{{publisher2}}} | {{#if:{{{location2|}}} | {{#if:{{{edition2|}}}{{{title2|}}}|,&#32;}}{{{location2}}} }} }}{{#if:{{{newversion|}}}{{{2ndauthor|}}}{{{2ndlast|}}}{{{translator2|}}}{{{editor2|}}}{{{title2|}}}{{{location2|}}}<!--Test for new version of work--> | {{#if:{{{date2|}}} |, {{{date2}}} | {{#if:{{{year2|}}} |, {{{year2}}} |, {{maintenance line|please provide a date or year}} }} }} }}{{#if:{{{bibcode2|}}} |, <small>[[w:Bibcode|Bibcode]]:&nbsp;[https://ui.adsabs.harvard.edu/abs/{{urlencode:{{{bibcode2}}}}} {{{bibcode2}}}]</small> }}{{#if:{{{doi2|}}} |, <small>[[w:Digital object identifier|DOI]]:{{#if:{{{doi_brokendate2|}}} | {{#tag:nowiki|{{{doi2}}}}} (inactive [[{{{doi_brokendate2}}}]]){{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:Pages with DOIs broken since {{#time:Y|{{{doi_brokendate2}}}}}]]}} | <span class="neverexpand">[https://doi.org/{{urlencode:{{{doi2}}}}} {{#tag:nowiki|{{{doi2}}}}}]</span> }}</small> }}{{#if:{{{isbn2|}}} |, <small>{{ISBN|{{{isbn2}}}}}</small> }}{{#if:{{{issn2|}}} |, <small>{{ISSN|{{{issn2}}}}}</small> }}{{#if:{{{jstor2|}}} |, <small>[[w:JSTOR|JSTOR]] [https://www.jstor.org/stable/{{urlencode:{{{jstor2}}}}} {{{jstor2}}}]</small> }}{{#if:{{{lccn2|}}} |, <small>[[w:Library of Congress Control Number|LCCN]] [https://lccn.loc.gov/{{urlencode:{{{lccn2}}}}} {{{lccn2}}}]</small> }}{{#if:{{{oclc2|}}} |, <small>[[w:OCLC|OCLC]] [https://worldcat.org/oclc/{{urlencode:{{{oclc2}}}}} {{{oclc2}}}]</small> }}{{#if:{{{ol2|}}} |, <small>[[w:Open Library|OL]] [https://openlibrary.org/works/OL{{urlencode:{{{ol2}}}}}/ {{{ol2}}}]</small> }}{{#if:{{{pmid2|}}} |, <small>[[w:PubMed Identifier|PMID]] [https://www.ncbi.nlm.nih.gov/pubmed/{{urlencode:{{{pmid2}}}}} {{{pmid2}}}]</small> }}{{#if:{{{ssrn2|}}} |, <small>[[w:Social Science Research Network|SSRN]] [https://ssrn.com/abstract={{urlencode:{{{ssrn2}}}}} {{{ssrn2}}}]</small> }}{{#if:{{{id2|}}} |, <small>{{{id2}}}</small> }}{{#if:{{{archiveurl2|}}} |, archived from [{{{url2}}} the original] on {{#if:{{{archivedate2|}}} | {{#formatdate:{{{archivedate2}}}}} | {{maintenance line|please provide the date}} }} }}{{#if:{{{accessdate2|}}} |, retrieved {{#formatdate:{{{accessdate2|}}}}} }}{{#if:{{{section2|}}} | {{#if:{{{sectionurl2|}}} |, [{{{sectionurl2}}} {{{section2}}}] |, {{{section2}}} }} }}{{#if:{{{line2|}}} |, line {{{line2}}} | {{#if:{{{lines2|}}} |, lines {{{lines2}}} }} }}{{#if:{{{pages2|}}} | {{#if:{{{page2|}}} |, {{#if:{{{pageurl2|}}} | [{{{pageurl2}}} page {{{page2}}}] | page {{{page2}}} }}&#32;of {{{pages2}}} |, {{#if:{{{pageurl2|}}} | [{{{pageurl2}}} pages {{{pages2}}}] | pages {{{pages2}}} }} }} | {{#if:{{{page2|}}} |, {{#if:{{{pageurl2|}}} | [{{{pageurl2}}} page {{{page2}}}] | page {{{page2}}} }} }} }}{{#if:{{{column2|}}}{{{columns2|}}} |, {{#if:{{{columnurl2|}}} | [{{{columnurl2}}} {{#if:{{{columns2|}}} | columns {{{columns2}}} | column {{{column2}}} }}] | {{#if:{{{columns2|}}} | columns {{{columns2}}} | column {{{column2}}} }} }} }}{{#if:{{{passage_block|}}} | {{#ifeq:{{{passage_block|}}}|no | {{#if:{{{passage|}}} |&#58; “{{{passage}}}{{#if:{{{translation|}}} |&#32;[{{{translation}}}] }}” }} |&#58;<dl><dd>{{{passage_block}}}{{#if:{{{translation|}}} |<dl><dd>{{{translation}}}</dd></dl> }}</dd></dl> }} | {{#if:{{{passage|}}} | {{#ifexpr:{{#invoke:string/templates|len|{{{passage}}}}}>300 |&#58;<dl><dd>{{{passage}}}{{#if:{{{translation|}}} |<dl><dd>{{{translation}}}</dd></dl> }}</dd></dl> |&#58; “{{{passage}}}{{#if:{{{translation|}}} |&#32;[{{{translation}}}] }}” }} }} }}{{#if:{{{archiveurl|}}} | {{#if:{{{archivedate|}}} |<!--Do nothing--> | [[Category:Quotations using archiveurl without archivedate]] }} }}{{#if:{{{usenodot|}}}|{{#if:{{{nodot|}}}||.}}}}</includeonly><noinclude>{{documentation}}</noinclude> shpv5vybioz61b1670jwmtj6tdc58ui 238708 238707 2026-11-11T03:33:38Z Lee 19 [[:en:Template:cite-meta/sandbox]] වෙතින් එක් සංශෝධනයක් 238707 wikitext text/x-wiki <includeonly>{{#if:{{{author|}}}{{{last|}}} | {{#if:{{{authorlink|}}} | [[w:{{{authorlink}}}|{{#if:{{{author|}}} | {{{author}}} | {{#if:{{{last|}}} | {{{last}}}{{#if:{{{first|}}}|, {{{first}}}}} }} }}]] | {{#if:{{{author|}}} | {{{author}}} | {{#if:{{{last|}}} | {{{last}}}{{#if:{{{first|}}}|, {{{first}}}}} }} }} }}{{#if:{{{author2|}}}{{{last2|}}} | {{#if:{{{authorlink2|}}} | &#59; [[w:{{{authorlink2}}}|{{#if:{{{author2|}}} | {{{author2}}} | {{#if:{{{last2|}}} | {{{last2}}}{{#if:{{{first2|}}}|, {{{first2}}}}} }} }}]] | &#59; {{#if:{{{author2|}}} | {{{author2}}} | {{#if:{{{last2|}}} | {{{last2}}}{{#if:{{{first2|}}}|, {{{first2}}}}} }} }} }} }}{{#if:{{{author3|}}}{{{last3|}}} | {{#if:{{{authorlink3|}}} | &#59; [[w:{{{authorlink3}}}|{{#if:{{{author3|}}} | {{{author3}}} | {{#if:{{{last3|}}} | {{{last3}}}{{#if:{{{first3|}}}|, {{{first3}}}}} }} }}]] | &#59; {{#if:{{{author3|}}} | {{{author3}}} | {{#if:{{{last3|}}} | {{{last3}}}{{#if:{{{first3|}}}|, {{{first3}}}}} }} }} }} }}{{#if:{{{author4|}}}{{{last4|}}} | {{#if:{{{authorlink4|}}} | &#59; [[w:{{{authorlink4}}}|{{#if:{{{author4|}}} | {{{author4}}} | {{#if:{{{last4|}}} | {{{last4}}}{{#if:{{{first4|}}}|, {{{first4}}}}} }} }}]] | &#59; {{#if:{{{author4|}}} | {{{author4}}} | {{#if:{{{last4|}}} | {{{last4}}}{{#if:{{{first4|}}}|, {{{first4}}}}} }} }} }} }}{{#if:{{{author5|}}}{{{last5|}}} | {{#if:{{{authorlink5|}}} | &#59; [[w:{{{authorlink5}}}|{{#if:{{{author5|}}} | {{{author5}}} | {{#if:{{{last5|}}} | {{{last5}}}{{#if:{{{first5|}}}|, {{{first5}}}}} }} }}]] | &#59; {{#if:{{{author5|}}} | {{{author5}}} | {{#if:{{{last5|}}} | {{{last5}}}{{#if:{{{first5|}}}|, {{{first5}}}}} }} }} }} }}{{#if:{{{coauthors|}}} | &#59; {{{coauthors}}} }}{{#if:{{{quotee|}}} | &#59; quoting {{{quotee|}}}&#32; }}{{#if:{{{translator|}}} | &#59; {{{translator|}}}, transl. }} | {{#if:{{{quotee|}}}<!--If quotee or translator stated without author, display it here.--> | quoting {{{quotee|}}} }}{{#if:{{{translator|}}} | {{#if:{{{quotee|}}}|&#59;&#32;}}{{{translator|}}}, transl. }} }}{{#if:{{{author|}}}{{{last|}}}{{{quotee|}}}{{{translator|}}}|,&#32;}}<!--Add a comma before chapter, entry or title if author, quotee or translator specified-->{{#if:{{{chapter|}}}{{{entry|}}} | {{#if:{{{entry|}}} | {{#invoke:italics|unitalicize_brackets|{{#if:{{{entryurl|}}} | “[{{{entryurl}}} {{{entry}}}] | “{{{entry}}} }}}}{{#if:{{{trans-chapter|}}} |&#32;&#91;{{#invoke:italics|unitalicize_brackets|{{{trans-chapter}}}}}&#93;” | ” }}{{#if:{{{notitle|}}}||, in&#32;}} | {{#if:{{{chapter|}}} | {{#if:{{num|{{{chapter}}}}}<!--Arabic chapter number?--> | &#32;chapter {{#if:{{{chapterurl|}}} | [{{{chapterurl}}} {{{chapter}}}] | {{{chapter}}} }} | {{#if:{{R2A|{{{chapter}}}|no_error=1}}<!--Roman chapter number?--> | &#32;chapter {{#if:{{{chapterurl|}}} | [{{{chapterurl}}} {{uc:{{{chapter}}}}}] | {{uc:{{{chapter}}}}} }} | &#32;“{{#invoke:italics|unitalicize_brackets|{{#if:{{{chapterurl|}}}<!--Must be a chapter name--> | [{{{chapterurl}}} {{{chapter}}}] | {{{chapter}}} }}}}{{#if:{{{trans-chapter|}}} | &#32;&#91;{{#invoke:italics|unitalicize_brackets|{{{trans-chapter}}}}}&#93; }}” }} }}{{#if:{{{notitle|}}}||, in&#32;}} }} }} }}{{#if:{{{mainauthor|}}} | {{{mainauthor}}},&#32; }}{{#if:{{{editor|}}}{{{editors|}}} | {{#if:{{{editor|}}} | {{{editor}}}, editor,&#32; | {{#if:{{{editors|}}} | {{{editors}}}, editors,&#32; }} }} }}{{#if:{{{title|}}} | <cite>{{#invoke:italics|unitalicize_brackets|{{{title}}}}}</cite> | {{#if:{{{notitle|}}} |<!--Do nothing.--> | {{maintenance line|please provide the title of the work}} }} }}{{#if:{{{trans-title|}}} | &#32;&#91;<cite>{{#invoke:italics|unitalicize_brackets|{{{trans-title}}}}}</cite>&#93; }}{{#if:{{{type|}}} | &#32;&#40;{{{type}}}&#41; }}{{#if:{{{series|}}} | &#32;({{{series}}}{{#if:{{{seriesvolume|}}}|&#59; {{{seriesvolume}}}}}) }}{{#if:{{{url|}}} | {{#if:{{{archiveurl|}}} | &lrm;<!--Left-to-right mark to manage right-to-left languages--><sup>[{{{archiveurl}}}]</sup> | &lrm;<sup>[{{{url}}}]</sup> }} }}{{#if:{{{format|}}}{{{genre|}}} | {{#if:{{{lang|}}}{{{worklang|}}} | &#32;({{#if:{{{format|}}} | {{{format}}} | {{#if:{{{genre|}}} | {{{genre}}} }} }}, in {{#invoke:languages/templates|getCanonicalName|{{{lang|{{{worklang|}}}}}}|return_if_invalid=1}}) | &#32;({{#if:{{{format|}}} | {{{format}}} | {{#if:{{{genre|}}} | {{{genre}}} }} }}) }} | {{#if:{{{lang|}}}{{{worklang|}}} | &#32;(in {{#invoke:languages/templates|getCanonicalName|{{{lang|{{{worklang|}}}}}}|return_if_invalid=1}}) }} }}{{#if:{{{version|}}} |, {{{version}}} }}{{#if:{{{volume|}}} |, volume {{{volume}}} }}{{#if:{{{issue|}}} |, issue {{{issue}}} }}{{#if:{{{others|}}} |, {{{others}}} }}{{#if:{{{edition|}}} |, {{{edition}}} edition }}{{#if:{{{publisher|}}} | {{#if:{{{location|}}} |, {{{location}}}&#58; |, }} {{{publisher}}} | {{#if:{{{location|}}} |, {{{location}}} }} }}{{#if:{{{nodate|}}}|<!--Do nothing-->|{{#if:{{{year|}}} | {{#if:{{{month|}}} |, {{{month}}} {{{year}}} |, {{#switch:{{padleft:|2|{{{year}}}}} | a. = ''[[Appendix:Glossary#a.|a.]]'' {{#invoke:string/templates|sub|{{{year}}}|4}} | c. = ''[[Appendix:Glossary#c.|c.]]'' {{#invoke:string/templates|sub|{{{year}}}|4}} | p. = ''[[Appendix:Glossary#p.|p.]]'' {{#invoke:string/templates|sub|{{{year}}}|4}} | {{{year}}} }} }} | {{#if:{{{date|}}} |, {{#formatdate:{{{date}}}}} | {{#if:{{{accessdate|}}} |, retrieved {{#formatdate:{{{accessdate|}}}}}<!--Use accessdate as a backstop if year or date not specified.--> |, {{rfdate|und<noinclude>|nocat=true</noinclude>}}<!--Using und is a hack but avoids the need to pass a lang to all {{cite}} templates--> }} }} }}{{#if:{{{year_published|}}} |, published {{{year_published}}} }}}}{{#if:{{{bibcode|}}} |, <small>[[w:Bibcode|Bibcode]]:&nbsp;[https://ui.adsabs.harvard.edu/abs/{{urlencode:{{{bibcode}}}}} {{{bibcode}}}]</small> }}{{#if:{{{doi|}}} |, <small>[[w:Digital object identifier|DOI]]:{{#if:{{{doi_brokendate|}}} | {{#tag:nowiki|{{{doi}}}}} (inactive [[{{{doi_brokendate}}}]]){{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:Pages with DOIs broken since {{#time:Y|{{{doi_brokendate}}}}}]]}} | <span class="neverexpand">[https://doi.org/{{urlencode:{{{doi}}}}} {{#tag:nowiki|{{{doi}}}}}]</span> }}</small> }}{{#if:{{{isbn|}}} |, <small>{{ISBN|{{{isbn}}}}}</small> }}{{#if:{{{issn|}}} |, <small>{{ISSN|{{{issn}}}}}</small> }}{{#if:{{{jstor|}}} |, <small>[[w:JSTOR|JSTOR]] [https://www.jstor.org/stable/{{urlencode:{{{jstor}}}}} {{{jstor}}}]</small> }}{{#if:{{{lccn|}}} |, <small>[[w:Library of Congress Control Number|LCCN]] [https://lccn.loc.gov/{{urlencode:{{{lccn}}}}} {{{lccn}}}]</small> }}{{#if:{{{oclc|}}} |, <small>[[w:OCLC|OCLC]] [https://worldcat.org/oclc/{{urlencode:{{{oclc}}}}} {{{oclc}}}]</small> }}{{#if:{{{ol|}}} |, <small>[[w:Open Library|OL]] [https://openlibrary.org/works/OL{{urlencode:{{{ol}}}}}/ {{{ol}}}]</small> }}{{#if:{{{pmid|}}} |, <small>[[w:PubMed Identifier|PMID]] [https://www.ncbi.nlm.nih.gov/pubmed/{{urlencode:{{{pmid}}}}} {{{pmid}}}]</small> }}{{#if:{{{ssrn|}}} |, <small>[[w:Social Science Research Network|SSRN]] [https://ssrn.com/abstract={{urlencode:{{{ssrn}}}}} {{{ssrn}}}]</small> }}{{#if:{{{id|}}} |, <small>{{{id}}}</small> }}{{#if:{{{archiveurl|}}} |, archived from [{{{url}}} the original] on {{#formatdate:{{{archivedate}}}}} }}{{#if:{{{accessdate|{{{access-date|}}}}}} | {{#if:{{{date|}}}{{{year|}}}<!--Only display accessdate if either date or year is specified, as accessdate is already used earlier in place of these parameters if they are missing.--> |, retrieved {{#formatdate:{{{accessdate|{{{access-date}}}}}}}} }} }}{{#if:{{{section|}}} |, {{#if:{{{sectionurl|}}} | [{{{sectionurl}}} {{{section}}}] | {{{section}}} }} }}{{#if:{{{line|}}} |, line {{{line}}} | {{#if:{{{lines|}}} |, lines {{{lines}}} }} }}{{#if:{{{pages|}}} | {{#if:{{{page|}}} |, {{#if:{{{pageurl|}}} | [{{{pageurl}}} page {{{page}}}] | page {{{page}}} }}&#32;of {{{pages}}} |, {{#if:{{{pageurl|}}} | [{{{pageurl}}} pages {{{pages}}}] | pages {{{pages}}} }} }} | {{#if:{{{page|}}} |, {{#if:{{{pageurl|}}} | [{{{pageurl}}} page {{{page}}}] | page {{{page}}} }} }} }}{{#if:{{{column|}}}{{{columns|}}} |, {{#if:{{{columnurl|}}} | [{{{columnurl}}} {{#if:{{{columns|}}} | columns {{{columns}}} | column {{{column}}} }}] | {{#if:{{{columns|}}} | columns {{{columns}}} | column {{{column}}} }} }} }}{{#if:{{{newversion|}}}{{{location2|}}}{{{2ndauthor|}}}{{{2ndlast|}}}{{{translator2|}}}{{{editor2|}}}{{{title2|}}}<!--Test for new version of work.--> |&#59; {{#if:{{{newversion|}}} | {{{newversion}}} | {{#if:{{{edition2|}}} |<!--Do nothing--> | {{#if:{{{2ndauthor|}}}{{{2ndlast|}}}{{{translator2|}}}{{{editor2|}}}{{{title2|}}} | republished as | republished }} }} }}&#32; }}{{#if:{{{2ndauthor|}}}{{{2ndlast|}}} | {{#if:{{{2ndauthorlink|}}} | &#32;[[w:{{{2ndauthorlink}}}|{{#if:{{{2ndauthor|}}} | {{{2ndauthor}}},&#32; | {{#if:{{{2ndlast|}}} | {{{2ndlast}}}{{#if:{{{2ndfirst|}}}|, {{{2ndfirst}}}}},&#32; }} }}]] | {{#if:{{{2ndauthor|}}} | &#32;{{{2ndauthor}}},&#32; | {{#if:{{{2ndlast|}}} | &#32;{{{2ndlast}}}{{#if:{{{2ndfirst|}}}|, {{{2ndfirst}}}}},&#32; }} }} }} }}{{#if:{{{translator2|}}} | &#59; {{{translator2|}}}, transl.,&#32; }}{{#if:{{{chapter2|}}}{{{entry2|}}} | {{#if:{{{entry2|}}} | {{#invoke:italics|unitalicize_brackets|{{#if:{{{entryurl2|}}} | “[{{{entryurl2}}} {{{entry2}}}] | “{{{entry2}}} }}}}{{#if:{{{trans-chapter2|}}} | &#32;&#91;{{#invoke:italics|unitalicize_brackets|{{{trans-chapter2}}}}}&#93;” | ” }}{{#if:{{{notitle2|}}}||, in&#32;}} | {{#if:{{{chapter2|}}} | {{#if:{{num|{{{chapter2}}}}}<!--Arabic chapter number?--> | &#32;chapter {{#if:{{{chapterurl2|}}} | [{{{chapterurl2}}} {{{chapter2}}}] | {{{chapter2}}} }} | {{#if:{{R2A|{{{chapter2}}}|no_error=1}}<!--Roman chapter number?--> | &#32;chapter {{#if:{{{chapterurl2|}}} | [{{{chapterurl2}}} {{uc:{{{chapter2}}}}}] | {{uc:{{{chapter2}}}}} }} | &#32;“{{#invoke:italics|unitalicize_brackets|{{#if:{{{chapterurl2|}}}<!--Must be a chapter name--> | [{{{chapterurl2}}} {{{chapter2}}}] | {{{chapter2}}} }}}}{{#if:{{{trans-chapter2|}}} | &#32;&#91;{{#invoke:italics|unitalicize_brackets|{{{trans-chapter2}}}}}&#93; }}” }} }}{{#if:{{{notitle2|}}}||, in&#32;}} }} }} }}{{#if:{{{mainauthor2|}}} | {{{mainauthor2}}}{{#if:{{{editor2|}}}{{{editors2|}}}|&#59;&#32;|,}} }}{{#if:{{{editor2|}}}{{{editors2|}}} | {{#if:{{{editor2|}}} | {{{editor2}}}, editor, | {{#if:{{{editors2|}}} | {{{editors2}}}, editors, }} }} }}{{#if:{{{title2|}}} | &#32;<cite>{{#invoke:italics|unitalicize_brackets|{{{title2}}}}}</cite> }}{{#if:{{{trans-title2|}}} | &#32;&#91;<cite>{{#invoke:italics|unitalicize_brackets|{{{trans-title2}}}}}</cite>&#93; }}{{#if:{{{type2|}}} | &#32;&#40;{{{type2}}}&#41; }}{{#if:{{{series2|}}} | &#32;({{{series2}}}{{#if:{{{seriesvolume2|}}}|&#59; {{{seriesvolume2}}}}}) }}{{#if:{{{url2|}}} | {{#if:{{{archiveurl2|}}} | &lrm;<sup>[{{{archiveurl2}}}]</sup> | &lrm;<sup>[{{{url2}}}]</sup> }} }}{{#if:{{{format2|}}}{{{genre2|}}} | {{#if:{{{lang2|}}}{{{worklang2|}}} | &#32;({{#if:{{{format2|}}} | {{{format2}}} | {{#if:{{{genre2|}}} | {{{genre2}}} }} }}, in {{#invoke:languages/templates|getCanonicalName|{{{lang2|{{{worklang2|}}}}}}|return_if_invalid=1}}) | &#32;({{#if:{{{format2|}}} | {{{format2}}} | {{#if:{{{genre2|}}} | {{{genre2}}} }} }}) }} | {{#if:{{{lang2|}}}{{{worklang2|}}} | &#32;(in {{#invoke:languages/templates|getCanonicalName|{{{lang2|{{{worklang2|}}}}}}|return_if_invalid=1}}) }} }}{{#if:{{{version2|}}} |, {{{version2}}} }}{{#if:{{{volume2|}}} |, volume {{{volume2}}} | {{#if:{{{volume_plain2|}}} |, {{{volume_plain2}}} }} }}{{#if:{{{issue2|}}} |, number {{{issue2}}} }}{{#if:{{{edition2|}}} | {{#if:{{{title2|}}}|,&#32;}}{{{edition2}}} edition }}{{#if:{{{others2|}}} |, {{{others2}}} }}{{#if:{{{publisher2|}}} | {{#if:{{{location2|}}} | {{#if:{{{edition2|}}}{{{title2|}}}|,&#32;}}{{{location2}}}&#58; |, }} {{{publisher2}}} | {{#if:{{{location2|}}} | {{#if:{{{edition2|}}}{{{title2|}}}|,&#32;}}{{{location2}}} }} }}{{#if:{{{newversion|}}}{{{2ndauthor|}}}{{{2ndlast|}}}{{{translator2|}}}{{{editor2|}}}{{{title2|}}}{{{location2|}}}<!--Test for new version of work--> | {{#if:{{{date2|}}} |, {{{date2}}} | {{#if:{{{year2|}}} |, {{{year2}}} |, {{maintenance line|please provide a date or year}} }} }} }}{{#if:{{{bibcode2|}}} |, <small>[[w:Bibcode|Bibcode]]:&nbsp;[https://ui.adsabs.harvard.edu/abs/{{urlencode:{{{bibcode2}}}}} {{{bibcode2}}}]</small> }}{{#if:{{{doi2|}}} |, <small>[[w:Digital object identifier|DOI]]:{{#if:{{{doi_brokendate2|}}} | {{#tag:nowiki|{{{doi2}}}}} (inactive [[{{{doi_brokendate2}}}]]){{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:Pages with DOIs broken since {{#time:Y|{{{doi_brokendate2}}}}}]]}} | <span class="neverexpand">[https://doi.org/{{urlencode:{{{doi2}}}}} {{#tag:nowiki|{{{doi2}}}}}]</span> }}</small> }}{{#if:{{{isbn2|}}} |, <small>{{ISBN|{{{isbn2}}}}}</small> }}{{#if:{{{issn2|}}} |, <small>{{ISSN|{{{issn2}}}}}</small> }}{{#if:{{{jstor2|}}} |, <small>[[w:JSTOR|JSTOR]] [https://www.jstor.org/stable/{{urlencode:{{{jstor2}}}}} {{{jstor2}}}]</small> }}{{#if:{{{lccn2|}}} |, <small>[[w:Library of Congress Control Number|LCCN]] [https://lccn.loc.gov/{{urlencode:{{{lccn2}}}}} {{{lccn2}}}]</small> }}{{#if:{{{oclc2|}}} |, <small>[[w:OCLC|OCLC]] [https://worldcat.org/oclc/{{urlencode:{{{oclc2}}}}} {{{oclc2}}}]</small> }}{{#if:{{{ol2|}}} |, <small>[[w:Open Library|OL]] [https://openlibrary.org/works/OL{{urlencode:{{{ol2}}}}}/ {{{ol2}}}]</small> }}{{#if:{{{pmid2|}}} |, <small>[[w:PubMed Identifier|PMID]] [https://www.ncbi.nlm.nih.gov/pubmed/{{urlencode:{{{pmid2}}}}} {{{pmid2}}}]</small> }}{{#if:{{{ssrn2|}}} |, <small>[[w:Social Science Research Network|SSRN]] [https://ssrn.com/abstract={{urlencode:{{{ssrn2}}}}} {{{ssrn2}}}]</small> }}{{#if:{{{id2|}}} |, <small>{{{id2}}}</small> }}{{#if:{{{archiveurl2|}}} |, archived from [{{{url2}}} the original] on {{#if:{{{archivedate2|}}} | {{#formatdate:{{{archivedate2}}}}} | {{maintenance line|please provide the date}} }} }}{{#if:{{{accessdate2|}}} |, retrieved {{#formatdate:{{{accessdate2|}}}}} }}{{#if:{{{section2|}}} | {{#if:{{{sectionurl2|}}} |, [{{{sectionurl2}}} {{{section2}}}] |, {{{section2}}} }} }}{{#if:{{{line2|}}} |, line {{{line2}}} | {{#if:{{{lines2|}}} |, lines {{{lines2}}} }} }}{{#if:{{{pages2|}}} | {{#if:{{{page2|}}} |, {{#if:{{{pageurl2|}}} | [{{{pageurl2}}} page {{{page2}}}] | page {{{page2}}} }}&#32;of {{{pages2}}} |, {{#if:{{{pageurl2|}}} | [{{{pageurl2}}} pages {{{pages2}}}] | pages {{{pages2}}} }} }} | {{#if:{{{page2|}}} |, {{#if:{{{pageurl2|}}} | [{{{pageurl2}}} page {{{page2}}}] | page {{{page2}}} }} }} }}{{#if:{{{column2|}}}{{{columns2|}}} |, {{#if:{{{columnurl2|}}} | [{{{columnurl2}}} {{#if:{{{columns2|}}} | columns {{{columns2}}} | column {{{column2}}} }}] | {{#if:{{{columns2|}}} | columns {{{columns2}}} | column {{{column2}}} }} }} }}{{#if:{{{passage_block|}}} | {{#ifeq:{{{passage_block|}}}|no | {{#if:{{{passage|}}} |&#58; “{{{passage}}}{{#if:{{{translation|}}} |&#32;[{{{translation}}}] }}” }} |&#58;<dl><dd>{{{passage_block}}}{{#if:{{{translation|}}} |<dl><dd>{{{translation}}}</dd></dl> }}</dd></dl> }} | {{#if:{{{passage|}}} | {{#ifexpr:{{#invoke:string/templates|len|{{{passage}}}}}>300 |&#58;<dl><dd>{{{passage}}}{{#if:{{{translation|}}} |<dl><dd>{{{translation}}}</dd></dl> }}</dd></dl> |&#58; “{{{passage}}}{{#if:{{{translation|}}} |&#32;[{{{translation}}}] }}” }} }} }}{{#if:{{{archiveurl|}}} | {{#if:{{{archivedate|}}} |<!--Do nothing--> | [[Category:Quotations using archiveurl without archivedate]] }} }}{{#if:{{{usenodot|}}}|{{#if:{{{nodot|}}}||.}}}}</includeonly><noinclude>{{documentation}}</noinclude> shpv5vybioz61b1670jwmtj6tdc58ui සැකිල්ල:cite-meta/sandbox/documentation 10 145760 238709 2016-03-06T19:35:43Z en>Sgconlaw 0 Created documentation page 238709 wikitext text/x-wiki {{documentation subpage}} {{mbox|text=This is a sandbox for {{temp|cite-meta}}. To test the draft template here, use {{temp|cite-meta/testcases}}.}} iayz4trumsp1hf7tyedvejkzlw6qlj2 238710 238709 2026-11-11T03:33:47Z Lee 19 [[:en:Template:cite-meta/sandbox/documentation]] වෙතින් එක් සංශෝධනයක් 238709 wikitext text/x-wiki {{documentation subpage}} {{mbox|text=This is a sandbox for {{temp|cite-meta}}. To test the draft template here, use {{temp|cite-meta/testcases}}.}} iayz4trumsp1hf7tyedvejkzlw6qlj2 සැකිල්ල:cite-meta/testcases 10 145761 238711 2026-10-23T22:45:14Z en>Saighneánach 0 238711 wikitext text/x-wiki {{mbox|text=Use this page to test the templates {{temp|cite-meta}} and {{temp|cite-meta/sandbox}}.}} ==cite-meta/sandbox== ===General=== * {{cite-meta/sandbox|author=Jane Doe|author2=Richard Roe|chapter=The Fundamentals|title=The Testing Handbook|location=London|publisher=Testing Associates|year=2021|page=1|pageurl=https://www.google.com|oclc=1091922614|passage=Testing one, two, three.}} * '''With translator and editor; foreign language''' ** {{cite-meta/sandbox|last=Doe|first=Jane|last2=Doe|first2=John|translator=Roe, Richard|chapter=The Fundamentals|editor=Sarah Bluepencil|title=Le manuel de test|trans-title=The Testing Manual|lang=fr|location=London|publisher=Testing Associates|year=2021|pages=1–2|section=§1}} * '''With translator and editor; foreign language; no chapter''' ** {{cite-meta/sandbox|last=Doe|first=Jane|last2=Doe|first2=John|translator=Roe, Richard|editor=Sarah Bluepencil|title=Le manuel de test|trans-title=The Testing Manual|lang=fr|location=London|publisher=Testing Associates|year=2021|pages=1–2|section=§1}} * '''No author but quotee and editor only; using <nowiki>{{{entryurl}}} and {{{url}}}</nowiki>''' ** {{cite-meta/sandbox|quotee=Jane Doe|entry=test|entryurl=https://books.google.com|editor=Richard Roe|title=Dictionary of Testing Standards|url=https://www.google.com|location=London|publisher=Testing Associates|year=2021|volume=I|page=1|pageurl=https://www.google.com|passage=Testing one, two, three.}} * '''<nowiki>{{{archiveurl}}} and {{{archivedate}}}; no date but {{{accessdate}}} only</nowiki>''' ** {{cite-meta/sandbox|author=Jane Doe|title=The Testing Handbook|url=https://www.google.com|archiveurl=https://archive.org|archivedate=1 January 2021|accessdate=1 April 2021|passage=Testing one, two, three.}} * '''With an additional version of a work''' ** {{cite-meta/sandbox|author=Jane Doe|author2=Richard Roe|chapter=The Fundamentals|title=The Testing Handbook|location=London|publisher=Testing Associates|year=2001|page=1|pageurl=https://www.google.com|oclc=1091922614|location2=New York, N.Y.|publisher2=Testing Classics|year2=2021|passage=Testing one, two, three.}} ** {{cite-meta/sandbox|author=Jane Doe|author2=Richard Roe|chapter=The Fundamentals|title=The Testing Handbook|location=London|publisher=Testing Associates|year=2001|page=1|pageurl=https://www.google.com|oclc=1091922614|edition2=new|location2=New York, N.Y.|publisher2=Testing Classics|year2=2021|passage=Testing one, two, three.}} ** {{cite-meta/sandbox|author=Jane Doe|author2=Richard Roe|chapter=The Fundamentals|title=The Testing Handbook|location=London|publisher=Testing Associates|year=2001|page=1|pageurl=https://www.google.com|oclc=1091922614|newversion=reprinted in|2ndauthor=Jane Doe|chapter2=The Fundamentals|editor2=John Doe|title2=Testing Redux|location2=New York, N.Y.|publisher2=Testing Classics|year2=2021|passage=Testing one, two, three.}} ===Automatic placement of cited text in a block=== * {{cite-meta/sandbox|author=Michiel de Vann|authorlink=Michiel de Vaan|entry=-fendō|title=Etymological Dictionary of Latin and the other Italic Languages|series=Leiden Indo-European Etymological Dictionary Series|seriesvolume=7|location=Leiden; Boston, Mass.|publisher=Brill|year=2008|pages=210–211|passage_block=''This is a test of the use of the {{para|passage_block}} parameter on a short citation.''}} * {{cite-meta/sandbox|author=Michiel de Vann|authorlink=Michiel de Vaan|entry=-fendō|title=Etymological Dictionary of Latin and the other Italic Languages|series=Leiden Indo-European Etymological Dictionary Series|seriesvolume=7|location=Leiden; Boston, Mass.|publisher=Brill|year=2008|pages=210–211|passage=''This is a test of a short citation.''}} * {{cite-meta/sandbox|author=Michiel de Vann|authorlink=Michiel de Vaan|entry=-fendō|title=Etymological Dictionary of Latin and the other Italic Languages|series=Leiden Indo-European Etymological Dictionary Series|seriesvolume=7|location=Leiden; Boston, Mass.|publisher=Brill|year=2008|pages=210–211|passage=''This is a test of a long citation'': ''-fendō'' was derived either by suffixation of PIE *-d<sup><small>(</small></sup>ʰ<sup><small>)</small></sup>-, or the whole paradigm was derived from an original pr.ipv. sg. ''*fende'' < ''*gʷʰn̥dʰi'' ‘strike!’ (thus LIV).}} * {{cite-meta/sandbox|author=Michiel de Vann|authorlink=Michiel de Vaan|entry=-fendō|title=Etymological Dictionary of Latin and the other Italic Languages|series=Leiden Indo-European Etymological Dictionary Series|seriesvolume=7|location=Leiden; Boston, Mass.|publisher=Brill|year=2008|pages=210–211|passage_block=no|passage=''This is a test of a long citation where {{para|passage_block|no}} has been used'': ''-fendō'' was derived either by suffixation of PIE *-d<sup><small>(</small></sup>ʰ<sup><small>)</small></sup>-, or the whole paradigm was derived from an original pr.ipv. sg. ''*fende'' < ''*gʷʰn̥dʰi'' ‘strike!’ (thus LIV).}} * {{cite-meta/sandbox|author=Michiel de Vann|authorlink=Michiel de Vaan|entry=-fendō|title=Etymological Dictionary of Latin and the other Italic Languages|series=Leiden Indo-European Etymological Dictionary Series|seriesvolume=7|location=Leiden; Boston, Mass.|publisher=Brill|year=2008|pages=210–211|passage_block=''This is a test to see if the template properly handles the situation when both {{para|passage}} and {{para|passage_block}} are accidentally used together.''|passage=''-fendō'' was derived either by suffixation of PIE *-d<sup><small>(</small></sup>ʰ<sup><small>)</small></sup>-, or the whole paradigm was derived from an original pr.ipv. sg. ''*fende'' < ''*gʷʰn̥dʰi'' ‘strike!’ (thus LIV).}}<noinclude>[[Category:Experimental templates]]</noinclude> d932mw4fb9urqmxlhezoz6wii07rdh5 238712 238711 2026-11-11T03:33:53Z Lee 19 [[:en:Template:cite-meta/testcases]] වෙතින් එක් සංශෝධනයක් 238711 wikitext text/x-wiki {{mbox|text=Use this page to test the templates {{temp|cite-meta}} and {{temp|cite-meta/sandbox}}.}} ==cite-meta/sandbox== ===General=== * {{cite-meta/sandbox|author=Jane Doe|author2=Richard Roe|chapter=The Fundamentals|title=The Testing Handbook|location=London|publisher=Testing Associates|year=2021|page=1|pageurl=https://www.google.com|oclc=1091922614|passage=Testing one, two, three.}} * '''With translator and editor; foreign language''' ** {{cite-meta/sandbox|last=Doe|first=Jane|last2=Doe|first2=John|translator=Roe, Richard|chapter=The Fundamentals|editor=Sarah Bluepencil|title=Le manuel de test|trans-title=The Testing Manual|lang=fr|location=London|publisher=Testing Associates|year=2021|pages=1–2|section=§1}} * '''With translator and editor; foreign language; no chapter''' ** {{cite-meta/sandbox|last=Doe|first=Jane|last2=Doe|first2=John|translator=Roe, Richard|editor=Sarah Bluepencil|title=Le manuel de test|trans-title=The Testing Manual|lang=fr|location=London|publisher=Testing Associates|year=2021|pages=1–2|section=§1}} * '''No author but quotee and editor only; using <nowiki>{{{entryurl}}} and {{{url}}}</nowiki>''' ** {{cite-meta/sandbox|quotee=Jane Doe|entry=test|entryurl=https://books.google.com|editor=Richard Roe|title=Dictionary of Testing Standards|url=https://www.google.com|location=London|publisher=Testing Associates|year=2021|volume=I|page=1|pageurl=https://www.google.com|passage=Testing one, two, three.}} * '''<nowiki>{{{archiveurl}}} and {{{archivedate}}}; no date but {{{accessdate}}} only</nowiki>''' ** {{cite-meta/sandbox|author=Jane Doe|title=The Testing Handbook|url=https://www.google.com|archiveurl=https://archive.org|archivedate=1 January 2021|accessdate=1 April 2021|passage=Testing one, two, three.}} * '''With an additional version of a work''' ** {{cite-meta/sandbox|author=Jane Doe|author2=Richard Roe|chapter=The Fundamentals|title=The Testing Handbook|location=London|publisher=Testing Associates|year=2001|page=1|pageurl=https://www.google.com|oclc=1091922614|location2=New York, N.Y.|publisher2=Testing Classics|year2=2021|passage=Testing one, two, three.}} ** {{cite-meta/sandbox|author=Jane Doe|author2=Richard Roe|chapter=The Fundamentals|title=The Testing Handbook|location=London|publisher=Testing Associates|year=2001|page=1|pageurl=https://www.google.com|oclc=1091922614|edition2=new|location2=New York, N.Y.|publisher2=Testing Classics|year2=2021|passage=Testing one, two, three.}} ** {{cite-meta/sandbox|author=Jane Doe|author2=Richard Roe|chapter=The Fundamentals|title=The Testing Handbook|location=London|publisher=Testing Associates|year=2001|page=1|pageurl=https://www.google.com|oclc=1091922614|newversion=reprinted in|2ndauthor=Jane Doe|chapter2=The Fundamentals|editor2=John Doe|title2=Testing Redux|location2=New York, N.Y.|publisher2=Testing Classics|year2=2021|passage=Testing one, two, three.}} ===Automatic placement of cited text in a block=== * {{cite-meta/sandbox|author=Michiel de Vann|authorlink=Michiel de Vaan|entry=-fendō|title=Etymological Dictionary of Latin and the other Italic Languages|series=Leiden Indo-European Etymological Dictionary Series|seriesvolume=7|location=Leiden; Boston, Mass.|publisher=Brill|year=2008|pages=210–211|passage_block=''This is a test of the use of the {{para|passage_block}} parameter on a short citation.''}} * {{cite-meta/sandbox|author=Michiel de Vann|authorlink=Michiel de Vaan|entry=-fendō|title=Etymological Dictionary of Latin and the other Italic Languages|series=Leiden Indo-European Etymological Dictionary Series|seriesvolume=7|location=Leiden; Boston, Mass.|publisher=Brill|year=2008|pages=210–211|passage=''This is a test of a short citation.''}} * {{cite-meta/sandbox|author=Michiel de Vann|authorlink=Michiel de Vaan|entry=-fendō|title=Etymological Dictionary of Latin and the other Italic Languages|series=Leiden Indo-European Etymological Dictionary Series|seriesvolume=7|location=Leiden; Boston, Mass.|publisher=Brill|year=2008|pages=210–211|passage=''This is a test of a long citation'': ''-fendō'' was derived either by suffixation of PIE *-d<sup><small>(</small></sup>ʰ<sup><small>)</small></sup>-, or the whole paradigm was derived from an original pr.ipv. sg. ''*fende'' < ''*gʷʰn̥dʰi'' ‘strike!’ (thus LIV).}} * {{cite-meta/sandbox|author=Michiel de Vann|authorlink=Michiel de Vaan|entry=-fendō|title=Etymological Dictionary of Latin and the other Italic Languages|series=Leiden Indo-European Etymological Dictionary Series|seriesvolume=7|location=Leiden; Boston, Mass.|publisher=Brill|year=2008|pages=210–211|passage_block=no|passage=''This is a test of a long citation where {{para|passage_block|no}} has been used'': ''-fendō'' was derived either by suffixation of PIE *-d<sup><small>(</small></sup>ʰ<sup><small>)</small></sup>-, or the whole paradigm was derived from an original pr.ipv. sg. ''*fende'' < ''*gʷʰn̥dʰi'' ‘strike!’ (thus LIV).}} * {{cite-meta/sandbox|author=Michiel de Vann|authorlink=Michiel de Vaan|entry=-fendō|title=Etymological Dictionary of Latin and the other Italic Languages|series=Leiden Indo-European Etymological Dictionary Series|seriesvolume=7|location=Leiden; Boston, Mass.|publisher=Brill|year=2008|pages=210–211|passage_block=''This is a test to see if the template properly handles the situation when both {{para|passage}} and {{para|passage_block}} are accidentally used together.''|passage=''-fendō'' was derived either by suffixation of PIE *-d<sup><small>(</small></sup>ʰ<sup><small>)</small></sup>-, or the whole paradigm was derived from an original pr.ipv. sg. ''*fende'' < ''*gʷʰn̥dʰi'' ‘strike!’ (thus LIV).}}<noinclude>[[Category:Experimental templates]]</noinclude> d932mw4fb9urqmxlhezoz6wii07rdh5 සැකිල්ල:cite-meta/wrap-passage 10 145762 238713 2021-12-22T04:28:58Z en>Benwing2 0 Created page with "<includeonly>{{#if:{{#invoke:languages/templates|exists|{{{lang|}}}}}|{{lang|{{{lang|}}}|{{{passage|}}}}}|{{{passage|}}}}}</includeonly><noinclude>{{documentation}}</noinclude>" 238713 wikitext text/x-wiki <includeonly>{{#if:{{#invoke:languages/templates|exists|{{{lang|}}}}}|{{lang|{{{lang|}}}|{{{passage|}}}}}|{{{passage|}}}}}</includeonly><noinclude>{{documentation}}</noinclude> ajn9l42rfyrhyfg0ik2vvsejsn049yh 238714 238713 2026-11-11T03:34:01Z Lee 19 [[:en:Template:cite-meta/wrap-passage]] වෙතින් එක් සංශෝධනයක් 238713 wikitext text/x-wiki <includeonly>{{#if:{{#invoke:languages/templates|exists|{{{lang|}}}}}|{{lang|{{{lang|}}}|{{{passage|}}}}}|{{{passage|}}}}}</includeonly><noinclude>{{documentation}}</noinclude> ajn9l42rfyrhyfg0ik2vvsejsn049yh