Module:IntroSentence/Team

From Leaguepedia | League of Legends Esports Wiki
Jump to: navigation, search

Documentation for this module may be created at Module:IntroSentence/Team/doc

local util_args = require('Module:ArgsUtil')
local util_sentence = require("Module:SentenceUtil")
local util_table = require('Module:TableUtil')
local util_text = require("Module:TextUtil")
local util_vars = require("Module:VarsUtil")
local i18n = require('Module:i18nUtil')

local PlayerPronunciations = require('Module:PlayerPronunciations')
local DisambigList = require('Module:IntroSentence/DisambigList').main

local h = {}

local p = {}
function p.main(data)
	i18n.init('IntroSentence/Team')
	return h.makeOutput(data)
end

function h.makeOutput(data)
	local tbl = {
		h.getSentence(data) .. ' $REPLACEHERE$',
		DisambigList(data.name or '', 'Team'),
	}
	return util_table.concat(tbl, '\n\n')
end

function h.getSentence(data)
	local replacements = {
		TEAM = data.name,
		REGION = data.region:get('adjective')
	}
	return util_sentence.makeReplacements(i18n.print('introSentence'), replacements)
end

return p