本文へ移動

Taisen Brackets対戦

対戦の一覧から、トーナメント表をSVGで描きます。

対戦(たいせん)は、二者が向かい合って勝負することです。 名前について(英語)

目次

リファレンス · 各対戦の位置を計算

Locale型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

A language: its words, the names of the rounds (by their English names), and the tag Intl formats numbers and dates for.

インポート

import type { Locale } from "@johnmorrisdotca/taisen-brackets/layout";

ほかのエクスポート元: @johnmorrisdotca/taisen-brackets

定義

interface Locale {
    code: string;
    tag: string;
    words: Words;
    rounds: Readonly<Record<string, string>>;
}

メンバー

名前型説明
codestring

The code (fr) and the tag (fr-CA, ja-JP) used for numbers, dates and capitals.

tagstring
wordsWords
roundsReadonly<Record<string, string>>

Round names by their English name: { "Round of 16": "Huitièmes de finale" }. A round with no entry keeps its name (or roundOf).

例

import { localeOf, type Locale } from "@johnmorrisdotca/taisen-brackets";

const french: Locale = localeOf("fr");
console.log(french.code, french.tag, french.words.champion);
fr fr Champion

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/taisen-brackets 0.20.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。