# i18n QA Matrix (PT-BR, EN, ES, RU)

## Scope

- ACP routing and templates.
- ACP authentication and admin vote-balance screen.
- votesystem pages (`index`, `vote`, `totals`, `ranking`).
- Language persistence (URL + cookie/session).

## Test matrix

| Area | PT-BR | EN | ES | RU | Expected result |
|---|---|---|---|---|---|
| `/` redirects to `/{defaultLang}` | [ ] | [ ] | [ ] | [ ] | Redirect uses configured default language |
| Language switch in login page | [ ] | [ ] | [ ] | [ ] | URL changes and labels switch language |
| Cookie/session persistence after refresh | [ ] | [ ] | [ ] | [ ] | Selected language remains active |
| `html lang` attribute in rendered HTML | [ ] | [ ] | [ ] | [ ] | Matches active locale (`pt-BR`, `en`, `es-ES`, `ru-RU`) |
| ACP top header labels (`Login`, `Game`) | [ ] | [ ] | [ ] | [ ] | Localized by selected language |
| Admin vote-balance currency + DataTables language | [ ] | [ ] | [ ] | [ ] | Currency prefix and table locale follow selected language |
| votesystem login + dashboard texts | [ ] | [ ] | [ ] | [ ] | Keys resolved in all languages |
| votesystem vote countdown placeholders | [ ] | [ ] | [ ] | [ ] | `:hh/:mm/:ss` values render correctly |
| votesystem totals and ranking labels | [ ] | [ ] | [ ] | [ ] | No raw key visible in UI |
| Missing key fallback chain | [ ] | [ ] | [ ] | [ ] | Active language -> EN -> key literal |

## Automated checks

- Run lints for modified files in the IDE.
- Run key coverage scanner:

```bash
php tools/i18n-audit.php
```

Expected:
- Exit code `0` when all keys are present in all catalogs.
- Exit code `2` when missing keys are found (report printed by locale).

## Acceptance criteria

- No language-regression in routing or login flow.
- No hardcoded currency/locale behavior in `admin/vote-balance`.
- No raw i18n keys visible in targeted critical pages.
- PT-BR, EN, ES and RU are selectable and persisted for the same user session.
