Handover i18n translation change
Done and committed:
- Sitemap script removed.
- Build page renamed to bench (
bench.ts,render-bench.mjs,/<lang>/bench/). - Browse files named for the page (
browse.ts,render-browse.mjs). - Engine moved to
shared/engine/i18n.mjs. shared/project.json,shared/languages.jsonandshared/engine/project.mjsadded.- the i18n migration commit.
Layout:
shared/i18n/common,site/i18n/ui,site/i18n/contentandapp/i18n/uieach holden.json,<lang>.jsonandtodo.<lang>.json.- Keys are
<scope>.<role>.<name>, and the key test enforces them. <lang>.jsonis hash-keyed, so an English edit drops its translation and a key rename is free.
Not verified:
- Whether
app/tsconfig.jsonneedslib≥ ES2021 forIntl.ListFormat. - Whether
app/i18n.test.mjsfinds thedata-actnames (needsrender-bench.mjslines 116-118 if it fails).
Audit recommendations still open
- 2. README for regenerating
shared/data,app/test-dataanddata/agent/bundle.json.gz, plus the Python pipeline. It also needs to say howapp/datais copied fromshared/data, which no script records. - 3. Settings page. The app has no page for language and theme, so they can't be changed there. Site and app should share both.
- 4. Duplication.
build.ts(nowbench.ts, 910 lines, about 670 insidestart()) is not split. The shared worker-client (db-clientandcollide-client) and the shared IndexedDB store base (ldraw-storeandcollide-store) are not extracted either. TheBASE = '/bench/ldraw'constant is also duplicated ingeometry.tsandldraw-hook.ts. - 7. Git history. Keep the 12 MB DB and the packs out of history with
git filter-repo, after the stable release. Tag first, and keep the commit-map to fix the hashes cited in the blog and audit. - 8. Type-checking.
checkJsforscripts/and every.mjsfile.collide-parity.tsandmake-agent-bundle.mjsare still unchecked and have no documented mention. - 9. Stale comments.
ldraw-store.tsnormalisesays "Matches ldraw_pack.py", but the script isldraw_bin_pack.py. The pack docstrings still say JSONL, and the code writes the indexed format. - 1. Unused exports. Re-check once the BrickNet and BrickAgent features land. Separately,
site/tables.mjsinkForandparseSpec, and the typesPickerHost,PartGeom,PackItemandPaging, have no importers. They are harmless but could be un-exported.
Partly done
- 5. 25 MiB file limit. The build now fails above 25 MiB and warns within 5%.
subject-1_bin.gzis about 23.96 MiB, so that warning should fire today, and there is about 1 MiB of headroom. The pack will need splitting if it grows. - 6. CSP. The app build adds
'wasm-unsafe-eval'. The audit also asked for checking in browsers other than yours, which only you can do.
Audit sections 3 to 5 still open
- Offline fallback page. A page that was never visited or precached still fails offline with the browser error.
- Python pipeline. It is not in the repo, and the hardcoded
/home/chinapal/...paths, shadowedREWRITE_INVENTORY_PARTSand duplicatenormalize_part_numbersare unfixed. The plan to port it to a TypeScripttools/data/pipeline, keeping Python only for fixtures, is not started. - Collision parity. 84 of 6,000 fixture cases are outside tolerance, deliberately left uninvestigated.
- Contributor download page and CI-generated templates for new language files.
site-build.mdstill describes the old layout (languages.jsonundersite/,translations/todo.json,inbox.json).
Open from this session
- Browse-to-bench links now use
data-folder, so they follow the current language. - Old
/en/build/URLs now 404. A_redirectsline is undecided. - Plurals. Strings like
{count} choicesneedIntl.PluralRuleslater. - Hardcoded English outside i18n: the root picker strings (
cfg.picker) andcfg.rootNotFoundinsite/config.mjs, and everything indev/config.mjs. - Still to do: contributor download page and CI-generated templates, split
bench.ts(910 lines), shared worker-client, README for data regeneration,checkJs, an offline 404 page, the settings page. - Not started: a Python → TS data pipeline, and a shared
head()for the app renderers. - Shared
head()helper for the app renderers, which still duplicate the head markup. The missing manifest link in them is unconfirmed as a bug. - Layouts workpack. Separate bench layouts for touch, keyboard, voice, API and command line, which you said follows the audit.
- Key test.
app/i18n.test.mjscovers the app only. Nothing checks that the site'suikeys used inrender.mjs,tables.mjsandconfig.mjsexist.