${stadium.name}
${stadium.city}
${t('stadiums.capacity')}: ${numberFmt.format(stadium.capacity)} ${matchCount} ${matchWord}
// stadiums.js — stadium cards: image, name, city, capacity, matches held. // "View matches" jumps to the schedule pre-filtered by stadium. import { getData, navigateTo } from './app.js'; import { t, getLocale } from './i18n.js'; import { setStadiumFilter } from './schedule.js'; export function initStadiums() { render(); document.addEventListener('langchange', render); } function render() { const { stadiums, matches } = getData(); const root = document.getElementById('stadiums-root'); const matchCounts = new Map(); for (const match of matches) { matchCounts.set(match.stadium, (matchCounts.get(match.stadium) ?? 0) + 1); } const numberFmt = new Intl.NumberFormat(getLocale()); root.innerHTML = `
${stadium.city}
${t('stadiums.capacity')}: ${numberFmt.format(stadium.capacity)} ${matchCount} ${matchWord}