Skip to content

Render the pages from a string catalog and add a Spanish edition #65

Description

@ChelseaKR

What

The three pages are English only, with every sentence inline in render.py, and the README conformance table records Internationalization as applies, not met. This moves every string the pages print on their own account into a declared, ordered English catalog, makes render.py take a catalog parameter, and adds site/es/ rendered from a Spanish catalog over the same artifacts: same numbers, same tenths, same table order, same markers, same three-state key. Quoted publisher text stays in the publisher's language and is labeled as a quotation. A catalog missing a key or a placeholder is refused at build time; the Spanish catalog is published only once reviewed by somebody who reads Spanish, and until then the build can produce it locally while the workflow withholds it.

Why it matters

This is civic data for California readers and the pages are the product. The sibling wildfire-service-territory-overlap did the extraction half under its ADR 0016 and proved a second edition cannot change a figure; perimeter should hold to the same rule, and the pages add what the sibling lacks: a rendered UI where layout, lang attributes, and reflow at 320 pixels must hold in both editions. Numbers keep a hard-coded decimal point deliberately, so one artifact writes every figure one way.

Scope

  • src/perimeter/catalog.py with the English catalog; render.py free of prose (a test parses the module and refuses a readable string).
  • site/es/index.html, perimeters.html, dins.html with lang="es", cross-links between editions, and the same WCAG, reflow, contrast, and prose-number gates over both.
  • docs/I18N.md declaration and an ADR; a test rendering both editions and asserting every figure and interval string identical.
  • A reviewer-attestation field in the Spanish catalog that must be set before pages.yml publishes it.

Out of scope

  • Localized number formatting.
  • Translating publisher quotations or docs/MARKERS.md.

Done when

  • Both editions build offline from fixtures, pass every page gate, and differ only in prose.
  • A Spanish catalog missing one key fails the build naming the key.
  • With the attestation unset, make pages builds site/es/ and the publish workflow skips it, stating why.

Pointers

  • src/perimeter/render.py, tests/test_pages_html.py (prose-number tracing), .github/workflows/pages.yml
  • wildfire-service-territory-overlap: src/wildfire_service_territory_overlap/catalog.py, docs/adr/0016-the-report-words-live-in-a-reviewed-catalog.md, its issue The audit said six fields publish recorded zeros and five do #55

Proposed with AI assistance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfeatureMajor new capability proposal

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions