refactor(website): keep page text when a script message is missing
A page that omits a message attribute (a translation that drops one, or a
page without the shared footer) must not show empty or "undefined" text:
- Copy buttons still copy without #copy-status or its messages, keep their
own label and leave the status empty.
- The star label is skipped when the header has no label for the count.
- The percent demo, dinosaur game and speed check leave the current text in
place for a missing message; an unknown {placeholder} stays literal.
scripts/test-website-scripts.mjs runs main.js, home.js and dino-demo.js
against a small document model with node:test. `website.py check` runs it,
so the website CI job and the publisher's preparation job now set up the
repository's Node.js version.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
3d34185171
commit
dabcd783d5
+6
-3
@@ -89,9 +89,12 @@ python3 scripts/website.py check
|
||||
This checks shared HTML without rewriting it, prepares generated assets, and
|
||||
checks page links, copied-text targets, repository documentation links, SEO
|
||||
metadata and the publishing configuration. It also runs the maintenance
|
||||
regressions. A stale shared region fails with the command needed to fix it.
|
||||
PR checks and the manual publisher run this same command. The checks work
|
||||
offline after the Python dependencies are installed.
|
||||
regressions and `scripts/test-website-scripts.mjs`, which runs the page scripts
|
||||
against a small document model with Node.js and checks that a missing message
|
||||
attribute leaves the existing text in place. A stale shared region fails with
|
||||
the command needed to fix it. PR checks and the manual publisher run this same
|
||||
command. The checks work offline after the Python dependencies are installed,
|
||||
using the repository's Node.js version.
|
||||
|
||||
For an optional external-link audit, with GitHub CLI available:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user