Files
RenewCMS/features/spa_internationalization.feature
T

76 lines
3.2 KiB
Gherkin

Feature: English and French throughout the SPA
Background:
Given all existing SPA interface text supports English and French
And English preserves existing copy and French provides equivalent meaning
And user content, API data and transactional emails remain unchanged
And the language control follows features/language_switcher_conformance.feature
Scenario Outline: Resolve the language before rendering
Given the browser-local stored language is <stored>
When the SPA starts
Then the interface language and document lang are <locale>
And browser language does not override the choice
Examples:
| stored | locale |
| absent | en |
| en | en |
| fr | fr |
| unsupported | en |
| unreadable | en |
Scenario Outline: Offer the language choice in the account menu
Given the user opens the <menu>
Then a localized Language section offers English and Français as radio items
And the selected language is visibly and accessibly identified
Examples:
| menu |
| desktop UserMenu |
| mobile AccountMenuSheet |
Scenario: Switch language without losing work
Given the user is editing an unsaved display name on /profile
When they select Français
Then all SPA interface text immediately uses French
And the document lang is fr
And the route, session, theme and unsaved work remain unchanged
And no reload, navigation or API request is caused by switching
When they select English
Then the interface immediately restores English with the same preserved state
Scenario: Remember language on this browser
Given the user selected Français
When they navigate, reload, log out or return on this browser
Then French remains selected including on public authentication screens
And no language preference is sent to the server
Scenario: Storage failure does not prevent switching
Given preference storage cannot be written
When the user selects Français
Then French is used for the current session without an error
And a fresh load without a readable preference defaults to English
Scenario: Translate the entire interface
Given French is selected
When an existing SPA screen or shared component renders
Then navigation, forms, validation, notifications, dialogs and accessibility labels use French
And counts, human-readable dates and numbers use the selected locale
And Nuxt UI controls use the selected locale
And English and French catalogs have matching keys and interpolation parameters
And an unavailable French message falls back to English
And user content, account details, filenames, URLs, API data and emails remain unchanged
Scenario Outline: Operate the language choice accessibly
Given the <menu> is open
When the user navigates the language items with the keyboard and confirms a choice
Then the language changes and the menu stays open
When they press Escape or click outside
Then the menu closes without changing language
Examples:
| menu |
| desktop UserMenu |
| mobile AccountMenuSheet |