Title: a hidden label for the language picker; the How the Internet Works card is checked in How to play

This commit is contained in:
Frederic Jung 2026-10-29 18:01:27 +01:00
parent 2604a9c74c
commit be63e3df67
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View file

@ -12,7 +12,7 @@ const homeWhat=()=>START5.includes(UI.startCity)?esc(START_D()[UI.startCity]):`$
function showTitle(){
const list=slotIdx(true),top=slotTop(list),many=list.length>1||(list.length===1&&list[0]!==top);
if(UI.nm==null)UI.nm=randomNetworkName();
openModal(`<div class="tlang">${langPick('langTitle')}</div><div class="title-art"><svg width="74" height="74" viewBox="0 0 74 74" aria-hidden="true"><path d="M10 60V40c0-14 10-24 24-24h18" fill="none" stroke="#1E2640" stroke-width="16" stroke-linecap="round"/><path d="M10 60V40c0-14 10-24 24-24h18" fill="none" stroke="#FFD23F" stroke-width="9" stroke-linecap="round"/><circle cx="58" cy="16" r="11" fill="#FF4F9A" stroke="#1E2640" stroke-width="4"/><circle cx="21" cy="44" r="3" fill="#fff"/><circle cx="30" cy="27" r="3" fill="#fff"/></svg>
openModal(`<div class="tlang"><label class="sr-only" for="langTitle">${tr('common.language')}</label>${langPick('langTitle')}</div><div class="title-art"><svg width="74" height="74" viewBox="0 0 74 74" aria-hidden="true"><path d="M10 60V40c0-14 10-24 24-24h18" fill="none" stroke="#1E2640" stroke-width="16" stroke-linecap="round"/><path d="M10 60V40c0-14 10-24 24-24h18" fill="none" stroke="#FFD23F" stroke-width="9" stroke-linecap="round"/><circle cx="58" cy="16" r="11" fill="#FF4F9A" stroke="#1E2640" stroke-width="4"/><circle cx="21" cy="44" r="3" fill="#fff"/><circle cx="30" cy="27" r="3" fill="#fff"/></svg>
<h1>Series<br>of <span>Tubes</span></h1></div>
<p class="tagline">${tr('title.build_an_internet_lay_fiber_between')}</p>${isPhone()?installRow():''}
${top?`<div class="btns" style="margin-bottom:6px">${btn(tr('title.continue_name_date',{name:esc(top.name||tr('common.unnamed_network')),date:dateStr(top.day)}),'cont',{id:top.id},'pink big')}</div>`:''}

View file

@ -155,8 +155,9 @@ for (const lang of ['en', 'it', 'pt', 'fr', 'es', 'de']) {
}
if (lang === 'de') {
assert.match(ev("document.getElementById('modalCard').textContent"), /Spielanleitung/);
// the link card to the real "How the Internet Works" site used to be hard-coded English
assert.match(ev("document.getElementById('modalCard').textContent"), /Wie funktioniert das Internet\?/);
// the link card to the real "How the Internet Works" site used to be hard-coded English; it lives in How to play
assert.match(ev("(()=>{showHelp&&showHelp();return document.getElementById('modalCard').textContent})()"), /Wie funktioniert das Internet\?/);
ev("showTitle()");
assert.equal(ev("document.querySelector('#hud [data-act=bank] .lbl').textContent"), 'Kasse · Bank');
// networking jargon stays English in German (Peering, Dark Fiber); plain "fiber" is Glasfaser
assert.equal(ev("tr('common.peering')"), 'Peering');