Merge main: German; the Moscow premium note in German

This commit is contained in:
Frederic Jung 2026-10-28 14:25:39 +01:00
commit c011022203
No known key found for this signature in database
19 changed files with 3110 additions and 11 deletions

View file

@ -68,6 +68,15 @@ Natural, friendly Italian, informal "tu". Keep networking terms that Italian eng
use in English (peering, transit, router, POP, PNI, LAG, dark fiber). Translate puns
into an Italian joke when one fits; otherwise keep the pun name and translate the rest.
## German style
Natural, friendly German, informal "du". Networking terms that German engineers say in English stay
English (Peering, Transit, Dark Fiber, Wave, Port, Router, POP, IX, Exchange, Backbone, Link, Traffic,
Route Server, Line System, LAG, PNI, Fabric, Scrubbing), but plain "fiber" is "Glasfaser",
"fiber pair" is "Faserpaar" and "eyeballs" are always "Privatkunden". "/mo" is "/Monat", "{n}d" is
"{n} T.", money keeps the game's `$100k` style, quotes are „…“. Translate puns into a German joke
when one fits; otherwise keep the pun name.
## Check
```bash

View file

@ -7,6 +7,7 @@ All notable changes to this project are documented here. The project follows
## [Unreleased]
- China Telecomet now sells its CN-Too premium crossing in Moscow too, at the same price as in Hong Kong (#195). Haul your European traffic to Moscow and it reaches China with about 3% loss; nothing else of theirs is on offer there.
- Series of Tubes now speaks German. The game follows your browser's language the first time, and you can switch to German under Settings or on the title screen. Networking terms like Peering and Transit stay in English, the way network engineers say them.
- Glowball Sakura Lager joins the map: a Tier 2 carrier in the big hubs of the US, Europe and Asia-Pacific that sells transit, takes PNIs and peers openly wherever it is. It is not a Tier 1, so it buys its own transit from three of them, while 13 smaller networks in its regions buy theirs from it, and one PNI with it reaches about 3% of all traffic. Far from home, in Asia and New Zealand, it charges more than the locals, and it sells no transit in Australia.
## [1.36.0] — 2026-10-28

View file

@ -45,7 +45,7 @@ npm run dev # http://localhost:8080
Progress is saved in your browser's local storage.
The game speaks English, Italian, Portuguese, French and Spanish. It follows your browser's language the first time
The game speaks English, Italian, Portuguese, French, Spanish and German. It follows your browser's language the first time
and remembers the one you pick under Settings or on the title screen.
## Development

View file

@ -56,7 +56,7 @@ Development runs on `npm run dev` (assembles on every request, reloads on save);
| Path | What it is |
| --- | --- |
| `src/i18n/en.js` | English: label → text, one entry per line, sorted; inlined into the page by `<!-- @include i18n -->` |
| `site/i18n/it.js`, `pt.js`, `fr.js`, `es.js` | Translations: label → text, the same layout; loaded only for that language |
| `site/i18n/it.js`, `pt.js`, `fr.js`, `es.js`, `de.js` | Translations: label → text, the same layout; loaded only for that language |
| `site/sw.js` | Service worker: network-first for pages, stale-while-revalidate for assets. Cache name is stamped with the version |
| `site/site.webmanifest`, icons, `404.html`, `CNAME`, `robots.txt`, `sitemap.xml`, `llms.txt` | PWA and GitHub Pages files, copied as they are |
| `scripts/lib/page.js` | Assembles the page from `src/` (also from a git ref with `--ref`, for performance baselines) |

3072
site/i18n/de.js Normal file

File diff suppressed because it is too large Load diff

View file

@ -2359,6 +2359,7 @@
"mergers.net_has_swallowed_old":"{net} se ha tragado a {old}.",
"mergers.now_part_of_net":"Ahora forma parte de {net}: haz peering con ellos.",
"modal_and_names.found_a_bug_or_have_an":"¿Has encontrado un fallo o tienes una idea?",
"modal_and_names.how_the_internet_works":"How the Internet Works",
"modal_and_names.join_the_noc_chat":"Únete al chat del NOC",
"modal_and_names.open":"Abrir →",
"modal_and_names.our_signal_group_screenshots_chat":"Nuestro grupo de Signal: intercambia capturas y discute sobre política de peering con otros jugadores. Menos retroexcavadoras que en la vida real.",

View file

@ -2359,6 +2359,7 @@
"mergers.net_has_swallowed_old":"{net} a avalé {old}.",
"mergers.now_part_of_net":"Fait désormais partie de {net} : fais du peering avec eux à la place.",
"modal_and_names.found_a_bug_or_have_an":"Un bug ou une idée ?",
"modal_and_names.how_the_internet_works":"How the Internet Works",
"modal_and_names.join_the_noc_chat":"Rejoins le chat du NOC",
"modal_and_names.open":"Ouvrir →",
"modal_and_names.our_signal_group_screenshots_chat":"Notre groupe Signal : échange des captures d’écran et dispute-toi sur les politiques de peering avec d’autres joueurs. Moins de pelleteuses qu’en vrai.",

View file

@ -2359,6 +2359,7 @@
"mergers.net_has_swallowed_old":"{net} si è mangiata {old}.",
"mergers.now_part_of_net":"Ora fa parte di {net}: fai peering con loro.",
"modal_and_names.found_a_bug_or_have_an":"Hai trovato un bug o hai un'idea?",
"modal_and_names.how_the_internet_works":"How the Internet Works",
"modal_and_names.join_the_noc_chat":"Entra nella chat del NOC",
"modal_and_names.open":"Apri →",
"modal_and_names.our_signal_group_screenshots_chat":"Il nostro gruppo Signal: scambia screenshot e litiga sulle politiche di peering con altri giocatori. Meno ruspe che nella realtà.",

View file

@ -2359,6 +2359,7 @@
"mergers.net_has_swallowed_old":"{net} engoliu {old}.",
"mergers.now_part_of_net":"Agora faz parte de {net}: faça peering com eles.",
"modal_and_names.found_a_bug_or_have_an":"Achou um bug ou teve uma ideia?",
"modal_and_names.how_the_internet_works":"How the Internet Works",
"modal_and_names.join_the_noc_chat":"Entre no chat do NOC",
"modal_and_names.open":"Abrir →",
"modal_and_names.our_signal_group_screenshots_chat":"Nosso grupo no Signal: troque capturas de tela e discuta política de peering com outros jogadores. Menos retroescavadeiras que na vida real.",

View file

@ -2,7 +2,7 @@
The page always comes from the network when there is one, so a new release shows up on the
next visit; everything else is served from the cache and refreshed in the background. */
const CACHE = 'sot-__VERSION__';
const CORE = ['/', '/index.html', '/site.webmanifest', '/favicon.svg', '/icon-192.png', '/icon-512.png', '/apple-touch-icon.png', '/i18n/it.js?v=__VERSION__', '/i18n/pt.js?v=__VERSION__', '/i18n/fr.js?v=__VERSION__', '/i18n/es.js?v=__VERSION__'];
const CORE = ['/', '/index.html', '/site.webmanifest', '/favicon.svg', '/icon-192.png', '/icon-512.png', '/apple-touch-icon.png', '/i18n/it.js?v=__VERSION__', '/i18n/pt.js?v=__VERSION__', '/i18n/fr.js?v=__VERSION__', '/i18n/es.js?v=__VERSION__', '/i18n/de.js?v=__VERSION__'];
self.addEventListener('install', (e) => {
e.waitUntil(caches.open(CACHE).then((c) => c.addAll(CORE)).then(() => self.skipWaiting()));

View file

@ -24,4 +24,4 @@ const chatHtml=()=>`<a class="plug chat" href="${SIGNAL}" target="_blank" rel="n
// Bugs and ideas go to GitHub, where they get tracked; the chat is for chatting. Its forms sort them by kind.
const ISSUES='https://github.com/fjaeckel/seriesoftubes/issues/new/choose';
const issueHtml=()=>`<a class="plug" href="${ISSUES}" target="_blank" rel="noopener"><span class="pi" aria-hidden="true">🐛</span><span><b>${tr('modal_and_names.found_a_bug_or_have_an')}</b><span class="meta">${tr('modal_and_names.tell_us_on_github_a_short')}</span></span><span class="go">${tr('modal_and_names.open')}</span></a>`;
const plugHtml=(big)=>`<a class="plug" href="${HTIW}" target="_blank" rel="noopener"><span class="pi" aria-hidden="true">🌍</span><span><b>How the Internet Works</b><span class="meta">${big?tr('modal_and_names.the_real_thing_by_thomas_kj'):tr('modal_and_names.the_real_thing_follow_a_packet')}</span></span><span class="go">${tr('common.explore')}</span></a>`;
const plugHtml=(big)=>`<a class="plug" href="${HTIW}" target="_blank" rel="noopener"><span class="pi" aria-hidden="true">🌍</span><span><b>${tr('modal_and_names.how_the_internet_works')}</b><span class="meta">${big?tr('modal_and_names.the_real_thing_by_thomas_kj'):tr('modal_and_names.the_real_thing_follow_a_packet')}</span></span><span class="go">${tr('common.explore')}</span></a>`;

View file

@ -2360,6 +2360,7 @@
"mergers.net_has_swallowed_old":"{net} has swallowed {old}.",
"mergers.now_part_of_net":"Now part of {net}: peer with them instead.",
"modal_and_names.found_a_bug_or_have_an":"Found a bug or have an idea?",
"modal_and_names.how_the_internet_works":"How the Internet Works",
"modal_and_names.join_the_noc_chat":"Join the NOC chat",
"modal_and_names.open":"Open →",
"modal_and_names.our_signal_group_screenshots_chat":"Our Signal group: swap screenshots and argue about peering policy with other players. Fewer backhoes than the real thing.",

View file

@ -154,7 +154,7 @@
<script>
// Language: the player's saved choice, else the browser's, else English. Non-English dictionaries load before the game.
(function(){const langs=window.SOT_LANGS={en:'English',it:'Italiano',pt:'Português',fr:'Français',es:'Español'};let l=null;try{l=localStorage.getItem('sot-lang');}catch(e){}
(function(){const langs=window.SOT_LANGS={en:'English',it:'Italiano',pt:'Português',fr:'Français',es:'Español',de:'Deutsch'};let l=null;try{l=localStorage.getItem('sot-lang');}catch(e){}
const b=(navigator.language||'').slice(0,2).toLowerCase();if(!Object.hasOwn(langs,l))l=Object.hasOwn(langs,b)?b:'en';
window.SOT_LANG=l;document.documentElement.lang=l;if(l!=='en')document.write('<script src="i18n/'+l+'.js?v=__VERSION__"><\/script>');})();
</script>

View file

@ -46,7 +46,7 @@ test('a home that cannot work is refused, and the game falls back to Frankfurt',
});
test('the sixth tile works on a phone and in every language', () => {
for (const lang of ['en', 'it', 'pt', 'fr', 'es']) {
for (const lang of ['en', 'it', 'pt', 'fr', 'es', 'de']) {
const { ev, errors } = load(lang === 'en' ? {} : { lang });
ev('window.innerWidth=360;showTitle()');
assert.equal(ev("document.querySelector('label.start.own b').textContent"), ev("tr('title.anywhere_else')"), lang);

View file

@ -63,6 +63,8 @@ test('the game starts in English unless the player or the browser asks for anoth
assert.equal(load({ navigatorLanguage: 'pt-BR' }).ev('SOT_LANG'), 'pt', 'a Brazilian browser asks for Portuguese');
assert.equal(load({ navigatorLanguage: 'fr-FR' }).ev('SOT_LANG'), 'fr', 'a French browser asks for French');
assert.equal(load({ navigatorLanguage: 'es-ES' }).ev('SOT_LANG'), 'es', 'a Spanish browser asks for Spanish');
assert.equal(load({ navigatorLanguage: 'de-DE' }).ev('SOT_LANG'), 'de', 'a German browser asks for German');
assert.equal(load({ navigatorLanguage: 'de-CH' }).ev('SOT_LANG'), 'de', 'so does a Swiss German one');
const it = load({ lang: 'it' });
assert.equal(it.ev('LANG'), 'it');
assert.equal(it.ev('document.documentElement.lang'), 'it');
@ -134,7 +136,7 @@ test('a scenario started in English shows its Italian name after switching', ()
assert.ok(ev("document.getElementById('hAsn').textContent").includes(name));
});
for (const lang of ['en', 'it', 'pt', 'fr', 'es']) {
for (const lang of ['en', 'it', 'pt', 'fr', 'es', 'de']) {
test(`${lang}: every screen, failure and event renders without errors or unfilled placeholders`, () => {
const { ev, errors } = load(lang === 'en' ? {} : { lang });
seed(ev, 3);
@ -151,6 +153,16 @@ for (const lang of ['en', 'it', 'pt', 'fr', 'es']) {
assert.match(ev("document.getElementById('modalCard').textContent"), /Cómo jugar/);
assert.equal(ev("document.querySelector('#hud [data-act=bank] .lbl').textContent"), 'Caja · Banco');
}
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\?/);
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');
assert.equal(ev("tr('common.dark_fiber')"), 'Dark Fiber');
assert.equal(ev("tr('common.terrestrial_fiber')"), 'Terrestrische Glasfaser');
}
const { thrown, leaks } = tour(ev);
assert.ok(ev('(S.stats.f||{}).anchor'), 'Baltic and Red Sea anchors count for the badge in every language');
assert.deepEqual(thrown, []);

View file

@ -6,7 +6,7 @@ const pick = (ev, id) => JSON.parse(ev(`(()=>{const s=document.getElementById('$
opts:[...s.options].map(o=>[o.value,o.textContent,o.lang]),label:(document.querySelector('label[for=${id}]')||{}).textContent});})()`));
test('language is one dropdown on the title screen and in Settings, in every language, with the current one selected', () => {
for (const lang of ['en', 'it', 'pt', 'fr', 'es']) {
for (const lang of ['en', 'it', 'pt', 'fr', 'es', 'de']) {
const { ev, errors } = load(lang === 'en' ? {} : { lang });
const langs = JSON.parse(ev('JSON.stringify(Object.entries(LANGS))'));
const title = pick(ev, 'langTitle');

View file

@ -390,7 +390,7 @@ test('DKNOG in Copenhagen is on the conference calendar', () => {
});
test('the Signal group is linked from the title screen, the menu and How to play, in every language', () => {
for (const lang of ['en', 'it', 'pt', 'fr', 'es']) {
for (const lang of ['en', 'it', 'pt', 'fr', 'es', 'de']) {
const { ev, errors } = load(lang === 'en' ? {} : { lang });
const links = (setup) => ev(`(()=>{${setup};return [...document.querySelectorAll('#modal a[href^="https://signal.group/#"]')].map(a=>a.target+'|'+a.rel+'|'+a.textContent.trim()).join('\\n');})()`);
const title = links('showTitle()');

View file

@ -43,7 +43,7 @@ test('Rackstar serves cacheable Crowdflare traffic locally and overflow uses tra
});
test('Rackstar boxes survive save migration and appear on phone peering panels in every language', () => {
for (const lang of ['en', 'it', 'pt', 'fr', 'es']) {
for (const lang of ['en', 'it', 'pt', 'fr', 'es', 'de']) {
const { dom, ev, errors } = load(lang === 'en' ? {} : { lang });
setup(ev);
ev('window.matchMedia=()=>({matches:true})');

View file

@ -5,7 +5,7 @@ const { load } = require('./harness');
const ISSUES = 'https://github.com/fjaeckel/seriesoftubes/issues/new/choose';
test('bugs and ideas point to GitHub from the menu and How to play, and the chat no longer asks for bug reports', () => {
for (const lang of ['en', 'it', 'pt', 'fr', 'es']) {
for (const lang of ['en', 'it', 'pt', 'fr', 'es', 'de']) {
const { ev, errors } = load(lang === 'en' ? {} : { lang });
ev('ACT.start({})');
for (const [where, setup] of [['menu', 'ACT.menu()'], ['help', 'showHelp()']]) {