docs: task 15d attempt 2 needs the static Portuguese finished

Attempt 2 got the structure right and said plainly it had only done the
hero, stat and thesis regions in both locales. The remaining static prose
is the 102-entry `translations.pt` selector map in app.js, which is what
gives today's /full-guide/ its Portuguese.

Also records that the 55 `.en` reads in the selector detail panels are
correct and must not be changed: GuideSelector re-renders those per locale
on languagechange, so the server render only needs the initial locale.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Marcos Paulo
2026-09-05 21:25:55 +00:00
parent 98ab6db3de
commit f7985bfe2a
@@ -179,3 +179,48 @@ to scraping.
`"pt"`, per `.agents/context/content-i18n.md` `"pt"`, per `.agents/context/content-i18n.md`
- [ ] Zero imports of any file under `full-guide/`, and no `set:html` of legacy - [ ] Zero imports of any file under `full-guide/`, and no `set:html` of legacy
markup markup
## Attempt 2: structure accepted, bilingual work unfinished
Commit `677c511` is the right shape and is the base to build on — no legacy
import, no `set:html`, six blocks used (`FleetDiagram`, `HandoffTable`,
`PhasePanel`, `RouteTable`, `SkillPackage`, `WorktreeMap`), one file changed,
`verify.mjs` untouched, 42 assertions, gate green, JS 47,079 B against the
legacy 50,338 B. Its report was honest about what it did not finish. Finish it.
**What is already correct — do not "fix" it.** The page has 55 `.en` reads and
zero `.pt` reads in the selector detail panels. That is right.
`GuideSelector.astro` re-renders every panel with `[locale]` on
`ai-for-dummies:languagechange`, so the server-rendered panel only has to match
the initial locale. Leave those alone.
**What is missing: the static prose.** Legacy `app.js` holds `translations.pt`
a map of **102** CSS-selector → Portuguese-string entries, starting at
`.chapter-links a:nth-child(1)`. `applyLanguage('pt')` walks it and calls
`setText(selector, value)`; switching back replays the captured `originals`.
That map is the full-guide page's static Portuguese, and it is the authoritative
source for this work.
The page currently carries **3** `data-language-content` pairs (hero, stat,
thesis). The other ~99 strings have no Portuguese counterpart anywhere in the
Astro output, so `/full-guide/` renders English-only for everything the selector
islands do not own.
Render each of those 102 strings twice per `.agents/context/content-i18n.md`:
the English exactly as it appears in `full-guide/index.html` today, the
Portuguese exactly as it appears in `translations.pt`. Verbatim both ways — no
retranslation, no rephrasing, no fixing what looks like a typo.
A selector in the map that targets an element the blocks now render means the
pair belongs inside that block's slot content, not bolted on afterwards. If a
block gives you no way to pass both locales, say so in the report and name the
block — do not work around it by duplicating the block.
### Done when, for this pass
- [ ] All 102 `translations.pt` entries have a rendered Portuguese counterpart
- [ ] Every localized static string wrapped in `data-language-content="en"` /
`"pt"` pairs
- [ ] No `.pt` reads added to the nine selector detail panels
- [ ] Gate green, 42 assertions, `verify.mjs` untouched
- [ ] Report lists any `translations.pt` selector you could not place, and why