From 2d0bd2a12dce4aff153996dab84c46f2e39b87ad Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Tue, 24 Feb 2026 15:24:21 +0900 Subject: [PATCH 1/8] better no result message --- lua/wikis/commons/MatchTable.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lua/wikis/commons/MatchTable.lua b/lua/wikis/commons/MatchTable.lua index 41bb8983ec9..cfe327bb00f 100644 --- a/lua/wikis/commons/MatchTable.lua +++ b/lua/wikis/commons/MatchTable.lua @@ -568,8 +568,16 @@ 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 = String.interpolate( + '${pronoun} ${mode} ${verb} not played any matches ${explanation}yet.', + { + pronoun = isH2H and 'These' or 'This', + mode = self.config.mode == Opponent.solo and 'player' or 'team', + verb = isH2H and 'have' or 'has', + explanation = isH2H and 'against each other ' or '' + } + ) return display:tag('tr') :tag('td') From 5c614f60f6a893355082ede7dd35f03b31a4add1 Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Tue, 24 Feb 2026 15:29:20 +0900 Subject: [PATCH 2/8] use I18n --- lua/wikis/commons/I18n/Data.lua | 3 +++ lua/wikis/commons/MatchTable.lua | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lua/wikis/commons/I18n/Data.lua b/lua/wikis/commons/I18n/Data.lua index 69be2411a92..9bd01131406 100644 --- a/lua/wikis/commons/I18n/Data.lua +++ b/lua/wikis/commons/I18n/Data.lua @@ -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', diff --git a/lua/wikis/commons/MatchTable.lua b/lua/wikis/commons/MatchTable.lua index cfe327bb00f..81ba12cb539 100644 --- a/lua/wikis/commons/MatchTable.lua +++ b/lua/wikis/commons/MatchTable.lua @@ -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', {loadData = true}) local LeagueIcon = Lua.import('Module:LeagueIcon') local Logic = Lua.import('Module:Logic') @@ -569,8 +570,8 @@ function MatchTable:buildDisplay() if Table.isEmpty(self.matches) then local isH2H = Logic.isNotEmpty(self.config.vs) - local text = String.interpolate( - '${pronoun} ${mode} ${verb} not played any matches ${explanation}yet.', + local text = I18n.translate( + 'matchtable-no-match-results', { pronoun = isH2H and 'These' or 'This', mode = self.config.mode == Opponent.solo and 'player' or 'team', From 2a28c4f5eb78548b8f434ef480198a372b8a58fc Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Tue, 24 Feb 2026 15:55:33 +0900 Subject: [PATCH 3/8] update mode string Co-authored-by: hjpalpha <75081997+hjpalpha@users.noreply.github.com> --- lua/wikis/commons/MatchTable.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/wikis/commons/MatchTable.lua b/lua/wikis/commons/MatchTable.lua index 81ba12cb539..891909fcd9b 100644 --- a/lua/wikis/commons/MatchTable.lua +++ b/lua/wikis/commons/MatchTable.lua @@ -574,7 +574,9 @@ function MatchTable:buildDisplay() 'matchtable-no-match-results', { pronoun = isH2H and 'These' or 'This', - mode = self.config.mode == Opponent.solo and 'player' or 'team', + 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 '' } From eb949acb0368936e728b1ac2ff2c489767487456 Mon Sep 17 00:00:00 2001 From: hjpalpha <75081997+hjpalpha@users.noreply.github.com> Date: Tue, 24 Feb 2026 07:57:00 +0100 Subject: [PATCH 4/8] please the linter --- lua/wikis/commons/MatchTable.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/wikis/commons/MatchTable.lua b/lua/wikis/commons/MatchTable.lua index 891909fcd9b..08506a93ba4 100644 --- a/lua/wikis/commons/MatchTable.lua +++ b/lua/wikis/commons/MatchTable.lua @@ -576,7 +576,7 @@ function MatchTable:buildDisplay() pronoun = isH2H and 'These' or 'This', mode = self.config.mode == Opponent.solo and (isH2H and 'players' or 'player) - or (isH2H and'teams' or 'team), + or (isH2H and'teams' or 'team'), verb = isH2H and 'have' or 'has', explanation = isH2H and 'against each other ' or '' } From d13dba398ed8293a6d570c1cb0d2229f5939322b Mon Sep 17 00:00:00 2001 From: hjpalpha <75081997+hjpalpha@users.noreply.github.com> Date: Tue, 24 Feb 2026 07:57:24 +0100 Subject: [PATCH 5/8] linter again --- lua/wikis/commons/MatchTable.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/wikis/commons/MatchTable.lua b/lua/wikis/commons/MatchTable.lua index 08506a93ba4..cb1411a3ea5 100644 --- a/lua/wikis/commons/MatchTable.lua +++ b/lua/wikis/commons/MatchTable.lua @@ -575,7 +575,7 @@ function MatchTable:buildDisplay() { pronoun = isH2H and 'These' or 'This', mode = self.config.mode == Opponent.solo - and (isH2H and 'players' or 'player) + 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 '' From 9e76a2c4f0d95edf50a51a1fdaa702c39ae1276a Mon Sep 17 00:00:00 2001 From: hjpalpha <75081997+hjpalpha@users.noreply.github.com> Date: Tue, 24 Feb 2026 07:58:00 +0100 Subject: [PATCH 6/8] missing space --- lua/wikis/commons/MatchTable.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/wikis/commons/MatchTable.lua b/lua/wikis/commons/MatchTable.lua index cb1411a3ea5..255eaae4919 100644 --- a/lua/wikis/commons/MatchTable.lua +++ b/lua/wikis/commons/MatchTable.lua @@ -576,7 +576,7 @@ function MatchTable:buildDisplay() pronoun = isH2H and 'These' or 'This', mode = self.config.mode == Opponent.solo and (isH2H and 'players' or 'player') - or (isH2H and'teams' or 'team'), + or (isH2H and 'teams' or 'team'), verb = isH2H and 'have' or 'has', explanation = isH2H and 'against each other ' or '' } From d0087883c56879be6d4eb37ff988e8c5a7dbda08 Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Wed, 11 Mar 2026 16:36:46 +0900 Subject: [PATCH 7/8] better readability --- lua/wikis/commons/I18n/Data.lua | 3 ++- lua/wikis/commons/MatchTable.lua | 32 +++++++++++++++++++------------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/lua/wikis/commons/I18n/Data.lua b/lua/wikis/commons/I18n/Data.lua index 9bd01131406..1a85b9027a2 100644 --- a/lua/wikis/commons/I18n/Data.lua +++ b/lua/wikis/commons/I18n/Data.lua @@ -107,7 +107,8 @@ return { ['matchsummary-mapveto-start'] = 'Start Map Veto', -- MatchTable - ['matchtable-no-match-results'] = '${pronoun} ${mode} ${verb} not played any matches ${explanation}yet.', + ['matchtable-no-match-results'] = 'This ${mode} has not played any matches yet.', + ['matchtable-no-h2h-match-results'] = 'These ${mode} have not played any matches against each other yet.', -- MatchTicker ['matchticker-upcoming-matches'] = 'Upcoming Matches', diff --git a/lua/wikis/commons/MatchTable.lua b/lua/wikis/commons/MatchTable.lua index 255eaae4919..584f9a0dc18 100644 --- a/lua/wikis/commons/MatchTable.lua +++ b/lua/wikis/commons/MatchTable.lua @@ -569,24 +569,30 @@ function MatchTable:buildDisplay() :node(self:headerRow()) if Table.isEmpty(self.matches) then - 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 string + local function getNoResultText() + local isH2H = Logic.isNotEmpty(self.config.vs) + if isH2H then + I18n.translate( + 'matchtable-no-h2h-match-results', + { + mode = self.config.mode == Opponent.solo and 'players' or 'teams', + } + ) + end + return I18n.translate( + 'matchtable-no-match-results', + { + mode = self.config.mode == Opponent.solo and 'player' or 'team', + } + ) + end return display:tag('tr') :tag('td') :attr('colspan', '100') :css('font-style', 'italic') - :wikitext(text) + :wikitext(getNoResultText()) :allDone() end From e7b0d7872b5cf44405b1220a87854eccbac2a5b3 Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Wed, 11 Mar 2026 16:46:54 +0900 Subject: [PATCH 8/8] oops --- lua/wikis/commons/MatchTable.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/wikis/commons/MatchTable.lua b/lua/wikis/commons/MatchTable.lua index 584f9a0dc18..91ed9378b7e 100644 --- a/lua/wikis/commons/MatchTable.lua +++ b/lua/wikis/commons/MatchTable.lua @@ -573,7 +573,7 @@ function MatchTable:buildDisplay() local function getNoResultText() local isH2H = Logic.isNotEmpty(self.config.vs) if isH2H then - I18n.translate( + return I18n.translate( 'matchtable-no-h2h-match-results', { mode = self.config.mode == Opponent.solo and 'players' or 'teams',