Skip to content

Commit ec696e9

Browse files
committed
i18n: Fix bug with Best of X matches
1 parent f41d0c5 commit ec696e9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/main.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,11 +512,7 @@ export class BracketsViewer {
512512
* @param match Results of the match.
513513
* @param label Label of the match.
514514
*/
515-
private renderMatchLabel(opponents: HTMLElement, match: Match, label?: string): void {
516-
const childCountLabel = `Bo${match.child_count}`;
517-
518-
label = label || '';
519-
515+
private renderMatchLabel(opponents: HTMLElement, match: Match, label = ''): void {
520516
if (this.config.separatedChildCountLabel) {
521517
opponents.append(dom.createMatchLabel(label, lang.getMatchStatus(match.status)));
522518

@@ -527,6 +523,7 @@ export class BracketsViewer {
527523
}
528524

529525
if (match.child_count > 0) {
526+
const childCountLabel = lang.t('common.best-of-x', { x: match.child_count });
530527
const joined = label ? `${label}, ${childCountLabel}` : childCountLabel;
531528
opponents.append(dom.createMatchLabel(joined, lang.getMatchStatus(match.status)));
532529
}

0 commit comments

Comments
 (0)