Module:languages៖ ភាពខុសគ្នារវាងកំណែនានា
ខ្លឹមសារដែលបានលុបចោល ខ្លឹមសារដែលបានសរសេរបន្ថែម
No edit summary |
No edit summary |
||
បន្ទាត់ទី១០៖
function Language:getCanonicalName()
return self._rawData.
end
-- Commented out; I don't think anything uses this, the presence/absence of script errors should confirm
--function Language:getAllNames()
end▼
--end
function Language:getOtherNames()
return self._rawData.otherNames or {}
for i, val in ipairs(self._rawData.names) do▼
end▼
▲ end
end▼
end
Line ៥១ ⟶ ៤២:
return self._wikimediaLanguageObjects
▲end
function Language:getWikipediaArticle()
return self._rawData.wikipedia_article or self:getCategoryName()
end
Line ១០២ ⟶ ៩៨:
return self._ancestorChain
end
function Language:hasAncestor(otherlang)
local ancestors = self:getAncestorChain()
if ancestor:getCode() == otherlang:getCode() then
return true
▲ end
return false
end
function Language:getCategoryName()
local name = self._rawData.
-- If the name already has "language" in it, don't add it.
Line ១១៩ ⟶ ១២៨:
function Language:makeEntryName(text)
text = mw.ustring.gsub(text, "^[¿¡]", "")
text = mw.ustring.gsub(text, "(.)[؟?!;՛՜ ՞ ՟?!।॥။၊་།]$", "%1")
if self._rawData.entry_name then
Line ១៣៨ ⟶ ១៤៧:
name = mw.ustring.gsub(name, "^[-־ـ*]+(.)",
"%1")
-- Remove
name = mw.ustring.gsub(name, "(.)
name = mw.ustring.gsub(name, "
-- If there are language-specific rules to generate the key, use those
|