Module:Sandbox/CXuesong/Translations: Difference between revisions

Content deleted Content added
CXuesong (talk | contribs)
No edit summary
CXuesong (talk | contribs)
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 6:
fr = "La Guerre des Clans",
hu = "Harcosok Törzse",
jpja = "ウォーリアーズ",
ko = "고양이 전사들",
lt = "Klanų Kariai",
Line 24:
fr = "chat",
hu = "macska",
jpja = "猫",
ko = "고양이",
lt = "katinas",
Line 42:
fr = "chef",
hu = "vezér",
jpja = "族長",
ko = "지도자",
lt = "vadas",
Line 60:
fr = "Feuille de Lune",
hu = nil,
jpja = "リーフプール",
ko = nil,
lt = nil,
Line 78:
fr = "Étoile Bleue",
hu = "Kékcsillag",
jpja = "ブルスター",
ko = nil,
lt = nil,
Line 145:
local p = { }
 
function p.getLanguageName(languageTagframe)
return languages(languageTagframe.args[1])
end
 
Line 152:
-- with the provided language tag,
-- or nil, if no such translation is found.
function p.translate(key, languageframe)
local term = frame.args[1]
local language = frame.args[2]
-- Bypass English.
if language == ENGLISH_TAG then return key end
Line 200 ⟶ 202:
-- Generates a table of translations of a specific English term.
-- Returns nil if no such term exists in the dictionary.
function p.translationTable(termframe)
local term = frame.args[1]
local trans = translations[term]
if trans == nil then return nil end
Line 206 ⟶ 209:
:attr("class", "wikitable")
local transKeys = orderedKeys(trans)
odybody:tag("tr")
:tag("th")
:wikitext(ENGLISH)
Line 222 ⟶ 225:
:done()
end
return tostring(body)
end
--print(p.glossary())