Brickheart

Site

  • Translation files restructured

    • Translation files are split into shared/i18n/common, site/i18n/ui and site/i18n/content. Each holds en.json, <lang>.json and todo.<lang>.json.
    • Keys are <scope>.<role>.<name>, and a key test enforces the format.
    • <lang>.json is keyed by hash. An English edit drops its translation, and renaming a key costs nothing.
    • The i18n engine moved to shared/engine/i18n.mjs.
    • Added shared/project.json, shared/languages.json and shared/engine/project.mjs.
  • Site build rules

    • Pages are .md with no front matter. The first # heading is the page title and the <h1>. The build fails on no h1, more than one h1, or a duplicate h1 between pages.
    • Headings are h1 to h4, with a warning on h5 and h6. CSS scopes headings by context, so there are no heading classes.
    • Semantic HTML: header, nav, main, sections labelled by their h2, article and footer. Raw HTML in Markdown is disabled, and code blocks are never turned into live HTML.
    • content/about.md builds to dist/en/about.html. Subfolders carry over. Page names stay English in every language, and each language has one index.html from content/index.md.
    • The site has no dates, tags, archive, tag pages or feeds. File names are not date-based.
    • Links are relative, so local file:// testing works. Only canonical URLs, the sitemap and hreflang are absolute.
    • dist/ is generated and gitignored. robots.txt, sitemap.xml and the 404 pages are generated.
    • npm run build is the only command needed.
    • shared/assets is copied into every dist. shared/engine holds build code and is never copied.
    • Translation is a local step and Cloudflare only runs templating. The build collects blocks (heading, paragraph, list item) with a key, the English text and a hash, plus a separate ui category for navigation labels and the machine-translation notice.
    • A block whose hash no longer matches the current English is rejected, not merged. Pages with complete, current translations are built per language. Anything else falls back to English with the correct lang and stays out of the hreflang sitemap. A reviewed flag per page controls the machine-translation notice.
    • Locally the build warns about stale translations, and on Cloudflare it never fails because of them.
  • Website construction

    • Language tags: full BCP 47 tags (en-GB, zh-Hans, sr-Cyrl-RS) go in lang and hreflang, and folders use the first part (/en/, /zh/). Each label is written in its own language, and ar gets dir="rtl".
    • CSS uses logical properties, so it works left to right and right to left. It has visible focus rings, 44px targets, dark mode, reduced motion, forced-colors support, a skip link and landmarks.
    • Language picker: first-time visitors see it, and the choice is saved in site cookie.
    • Strict CSP: no inline <style>, <script>, style="" or onclick="".
    • One 404 page per language plus a neutral root one. Cloudflare's 404-page setting serves the nearest.
    • hreflang lives in the generated sitemap only.
    • site/, dev/ and app/ have seperate Worker with its own wrangler.jsonc.
  • Project start

    • Brick Heart aims to make building LEGO models digitally accessible across languages and input modalities, so a model can be assembled without a mouse click or drag. It uses LDraw, the community-run open format for digital LEGO models.
    • Design principles: branching commands with adaptive input assistance, relative and local positioning instead of absolute coordinates, short and distinct part aliases, one interface with several inputs (voice, touch, keyboard), and a modular multilingual design with right-to-left support.
    • The website went live at brickheart.org as a simple semantic HTML page.
    • Email address set up: wave@brickheart.org, chosen because it is short and speakable.