seriesoftubes/scripts
Frederic Jung e817beed1a
Translations keyed by labels instead of English text
tr('pnis.delivery_2_to_6_weeks') instead of tr('Delivery: 2 to 6 weeks'): the
English lives once, in src/i18n/en.js (inlined into the page at build, so no
extra request), and it/pt/fr map the same labels. Changing English wording no
longer renames a key in every dictionary.

- 2,899 labels, made from where each text is used and its first words; short
  shared words are common.*
- plurals are one label with {one, other}: trn('label', n)
- static markup: data-i18n="label", data-i18n-aria-label, data-i18n-title
- saves from 1.33 and older stored English text in a few places; tr() still
  resolves it
- i18n-check: undefined/unused labels, markup drift, plural shape; i18n-add.js
  works on labels and --rename updates src/ too
- the old-branch port tool gives old English-keyed code and dictionaries the
  same labels
2026-10-27 11:05:09 +01:00
..
legacy Translations keyed by labels instead of English text 2026-10-27 11:05:09 +01:00
lib Translations keyed by labels instead of English text 2026-10-27 11:05:09 +01:00
build.js Split the game page into partials under src/, assembled into one index.html at build 2026-10-27 10:05:56 +01:00
dev.js Split the game page into partials under src/, assembled into one index.html at build 2026-10-27 10:05:56 +01:00
i18n-add.js Translations keyed by labels instead of English text 2026-10-27 11:05:09 +01:00
i18n-check.js Translations keyed by labels instead of English text 2026-10-27 11:05:09 +01:00
perf-bench.js Split the game page into partials under src/, assembled into one index.html at build 2026-10-27 10:05:56 +01:00
perf-browser.js Benchmark in real Chromium too, and only call a row slower when the samples say so 2026-10-26 12:04:57 +01:00
perf-fixture.js Performance benchmark on a big network, posted on every PR 2026-10-26 06:39:23 +01:00
perf-stats.js Benchmark in real Chromium too, and only call a row slower when the samples say so 2026-10-26 12:04:57 +01:00
release-notes.js Persist games across reloads and announce new releases 2026-10-23 11:42:28 +02:00
test.js Split the game page into partials under src/, assembled into one index.html at build 2026-10-27 10:05:56 +01:00