A language picked on a signed-out page is now stored on the account when the user signs in (StoreLocaleChosenBeforeLogin), so the app does not switch back to the account default. EnsureAccountIsUsable keeps the user's language for the login page when it ends a disabled account's session. ChangePreferredLocale runs in a transaction like the other use cases, the language names come from layout.languages instead of the Locale enum, and the translation test also compares fi.json with en.json and rejects English files without a Finnish counterpart. Co-Authored-By: Claude Opus 5.5 <[email protected]>
17 lines
346 B
PHP
17 lines
346 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Modules\Users\Domain\Enums;
|
|
|
|
/**
|
|
* The languages of the user interface. A user's choice is kept on their
|
|
* account; signed-out pages keep it in the session. Their names are the
|
|
* translations layout.languages.<value>.
|
|
*/
|
|
enum Locale: string
|
|
{
|
|
case Finnish = 'fi';
|
|
case English = 'en';
|
|
}
|