Add English to the UI and a profile menu for language and theme
Every UI string now exists in lang/fi and lang/en; a unit test checks that both languages have the same keys and placeholders. A user's language is stored on the account (users.locale) and applied by the SetLocale web middleware, falling back to the session's choice on signed-out pages and then APP_LOCALE. Emails use the user's language through HasLocalePreference, and the login page keeps the language after logout. The header's name, theme toggle and logout button become one profile menu (a disclosure) with the language buttons, light/dark/system theme radios kept on the device, and logging out. Signed-out pages get a Suomi/English switch next to the theme toggle. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -60,22 +60,14 @@
|
||||
@endforeach
|
||||
</nav>
|
||||
|
||||
<div class="flex flex-wrap items-center gap-3">
|
||||
<span class="text-sm text-zinc-300">{{ __('layout.signed_in_as', ['name' => auth()->user()->name]) }}</span>
|
||||
|
||||
@include('partials.theme-toggle')
|
||||
|
||||
<form method="POST" action="{{ route('logout') }}">
|
||||
@csrf
|
||||
<x-button submit subtle color="black" sm icon="arrow-right-start-on-rectangle" :text="__('layout.logout')" />
|
||||
</form>
|
||||
</div>
|
||||
<x-profile-menu />
|
||||
</div>
|
||||
</header>
|
||||
@else
|
||||
<div class="flex justify-end px-4 pt-3 sm:px-6">
|
||||
<header class="flex items-center justify-end gap-3 px-4 pt-3 sm:px-6">
|
||||
@include('partials.locale-switch')
|
||||
@include('partials.theme-toggle')
|
||||
</div>
|
||||
</header>
|
||||
@endauth
|
||||
|
||||
<main id="main-content" tabindex="-1" class="focus:outline-none">
|
||||
|
||||
Reference in New Issue
Block a user