tane/apps/app_seeds/test/screenshots/README.md
vjrj 8dce6f7027 feat(web): tane.comunes.org landing + localized app screenshots
- Hugo site (site/): EN/ES intro + legal (generated from docs/legal), an
  ES/EN About page from docs/{que-es-tane,what-is-tane}.md, seed-green theme,
  responsive header, store-badge placeholders, multi-stage Hugo->nginx image.
- Golden screenshot harness (test/screenshots/): en,es,fr,de,pt,ja + RTL demo,
  real fonts via DejaVu Sans + FontManifest; skip-by-default tag so CI stays
  green. collect_screenshots.sh feeds site/ and fastlane phoneScreenshots.
- Drop editorial notes from the public explainer.
2026-07-15 02:21:42 +02:00

43 lines
2.1 KiB
Markdown

# Localized app screenshots
Golden-based harness that renders key screens as PNGs in several languages, for
the landing site (`tane.comunes.org`) and the app-store listings. No emulator —
it runs under `flutter test`, so it's deterministic and CI-friendly.
## Regenerate
```sh
cd apps/app_seeds
flutter test --update-goldens --run-skipped --tags screenshots test/screenshots/screenshots_test.dart
tool/collect_screenshots.sh # copy PNGs into site/ and fastlane/
```
Drop `--update-goldens` to *verify* the committed PNGs still match. The
`screenshots` tag is **skipped by default** (`dart_test.yaml`) — so it never
runs in the normal suite or CI's `flutter test --coverage`, where golden pixel
differences across OS/font versions would cause false failures. `--run-skipped`
opts it back in.
## What it produces
`goldens/<locale>/<screen>.png` for **en, es, fr, de, pt, ja**, screens
**home · inventory · market · calendar · detail**, plus `goldens/rtl/inventory.png`.
The market is rendered populated via a seeded `OffersCubit` with a no-op transport
(no network); home/calendar/detail/inventory render from the repository alone.
- Fonts: real glyphs come from `loadScreenshotFonts()` — every family in
`FontManifest.json` (MaterialIcons + bundled Noto/seedks) plus the bundled
**DejaVu Sans** as the Latin text face. No Roboto needed.
- `rtl/` is a **layout demo**, not a locale: English strings forced
right-to-left to prove the design is RTL-safe. The app ships no Arabic
translation yet, so there is deliberately no `ar/` with Arabic copy.
- Partial locales (e.g. `ja`) fall back to English for untranslated strings —
that's the app's real runtime behavior, shown honestly.
- These are raw device-canvas frames (no marketing captions or device bezels).
Add those downstream only if a store rejects plain screenshots.
## Adding a screen or locale
Edit `screenshotLocales` / the `screens` map in `screenshots_test.dart`. Screens
must render from the repository + cubits alone (no live Nostr/network stack), so
inventory/detail/calendar are the safe, self-contained set.