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:
2026-11-25 06:28:39 +02:00
co-authored by Claude Opus 5.5
parent c2265256c3
commit 8aead06972
40 changed files with 2197 additions and 44 deletions
+50
View File
@@ -0,0 +1,50 @@
<?php
return [
'skip_to_content' => 'Skip to main content',
'main_menu' => 'Main menu',
'home' => 'Home',
'jobs' => 'Customer jobs',
'quick_intake' => 'Quick intake',
'board' => 'Board',
'calendar' => 'Calendar',
'time' => 'Time entry',
'approvals' => 'Hour approval',
'expenses' => 'Expenses',
'quick_sale' => 'Quick sale',
'billing' => 'Billing',
'customers' => 'Customers',
'users' => 'Users',
'company' => 'Company details',
'holidays' => 'Public holidays',
'catalog' => 'Basic data',
'prices' => 'Price list',
'logout' => 'Sign out',
'theme_toggle' => 'Dark theme',
'cancel' => 'Cancel',
'group_work' => 'Work',
'group_own' => 'My entries',
'group_sales' => 'Customers and sales',
'group_admin' => 'Administration',
'group_maintenance' => 'Maintenance',
'new_job' => 'New job',
'sales_list' => 'Quick sales and cash days',
'workflow_templates' => 'Workflow templates',
'price_list_admin' => 'Price list maintenance',
'current_section' => '(current section)',
'profile' => [
'menu' => 'Profile: :name',
'language' => 'Language',
'theme' => 'Theme',
'theme_light' => 'Light',
'theme_dark' => 'Dark',
'theme_system' => 'System default',
'selected' => '(selected)',
],
'demo' => [
'title' => 'Toiminnanohjaus',
'intro' => 'Livewire and TallStackUI are working. This is a temporary test page.',
'add_click' => 'Add click',
'clicked' => 'Clicked :count times',
],
];