Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lua/wikis/commons/I18n/Data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ return {
-- MatchSummary Map Veto
['matchsummary-mapveto-start'] = 'Start Map Veto',

-- MatchTable
['matchtable-no-match-results'] = '${pronoun} ${mode} ${verb} not played any matches ${explanation}yet.',

-- MatchTicker
['matchticker-upcoming-matches'] = 'Upcoming Matches',

Expand Down
15 changes: 13 additions & 2 deletions lua/wikis/commons/MatchTable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ local Class = Lua.import('Module:Class')
local Countdown = Lua.import('Module:Countdown')
local DateExt = Lua.import('Module:Date/Ext')
local Game = Lua.import('Module:Game')
local I18n = Lua.import('Module:I18n')
local Info = Lua.import('Module:Info')
local LeagueIcon = Lua.import('Module:LeagueIcon')
local Logic = Lua.import('Module:Logic')
Expand Down Expand Up @@ -568,8 +569,18 @@ function MatchTable:buildDisplay()
:node(self:headerRow())

if Table.isEmpty(self.matches) then
local text = 'This ' .. (self.config.mode == Opponent.solo and Opponent.solo or Opponent.team)
.. ' has not played any matches yet.'
local isH2H = Logic.isNotEmpty(self.config.vs)
local text = I18n.translate(
'matchtable-no-match-results',
{
pronoun = isH2H and 'These' or 'This',
mode = self.config.mode == Opponent.solo
and (isH2H and 'players' or 'player')
or (isH2H and 'teams' or 'team'),
verb = isH2H and 'have' or 'has',
explanation = isH2H and 'against each other ' or ''
}
)

return display:tag('tr')
:tag('td')
Expand Down
Loading