Skip to content

fix(#654, #655): i18n graceful fallback + staging E2E Playwright project#851

Merged
hman38705 merged 2 commits into
solutions-plug:mainfrom
oncleweynom:fix/654-655-i18n-fallback-staging-e2e
Jun 2, 2026
Merged

fix(#654, #655): i18n graceful fallback + staging E2E Playwright project#851
hman38705 merged 2 commits into
solutions-plug:mainfrom
oncleweynom:fix/654-655-i18n-fallback-staging-e2e

Conversation

@oncleweynom
Copy link
Copy Markdown
Contributor

@oncleweynom oncleweynom commented May 30, 2026

Summary

Closes #654 and
closes #655

#654 — i18n locale detection graceful fallback

  • frontend/src/lib/i18n.ts — locale resolution chain: exact match → language subtag (e.g. pt from pt-BR) → en. t() always returns a string; missing keys warn in dev, are silent in prod.
  • frontend/I18N_GUIDE.md — documents resolution order, usage, adding locales, and key naming conventions.
  • frontend/src/lib/__tests__/i18n.test.ts — 16 unit tests covering all fallback scenarios.
    closes i18n locale detection does not fall back gracefully for unsupported locales #654

#655 — Playwright E2E against real staging API

  • frontend/playwright.config.ts — added staging project; activated when STAGING_URL env var is set. Local projects and webServer are suppressed in staging mode.
  • .github/workflows/e2e-staging.yml — triggers on push to main only (not PRs), runs --project=staging, reads STAGING_URL from GitHub secrets, uploads HTML report as artifact.

Testing

oncleweynom and others added 2 commits May 30, 2026 18:43
… staging E2E Playwright project

- Add src/lib/i18n.ts with locale resolution chain (exact → subtag → en),
  missing-key warn in dev / silent in prod, and registerTranslations helper
- Add frontend/I18N_GUIDE.md documenting the i18n approach
- Add src/lib/__tests__/i18n.test.ts covering all fallback scenarios
- Add 'staging' Playwright project activated via STAGING_URL env var
- Add .github/workflows/e2e-staging.yml that runs on merge to main only
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 2, 2026

@oncleweynom Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@hman38705 hman38705 merged commit 3e022dd into solutions-plug:main Jun 2, 2026
0 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Playwright E2E tests do not run against a real API — all mocked i18n locale detection does not fall back gracefully for unsupported locales

2 participants