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:
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'title' => 'Public holidays',
|
||||
'intro' => 'Finnish public holidays are calculated automatically for every year. The task calendar shows them like weekends, but tasks can still be scheduled on them. A holiday can be taken out of use, and the company\'s own days off can be added.',
|
||||
'year_heading' => 'Year :year',
|
||||
'previous_year' => 'Previous year',
|
||||
'next_year' => 'Next year',
|
||||
'showing_year' => 'Showing the public holidays of :year.',
|
||||
'columns' => [
|
||||
'date' => 'Date',
|
||||
'name' => 'Name',
|
||||
'kind' => 'Type',
|
||||
'state' => 'Status',
|
||||
'actions' => 'Actions',
|
||||
],
|
||||
'kinds' => [
|
||||
'public' => 'Public holiday',
|
||||
'company' => 'Company day off',
|
||||
],
|
||||
'in_use' => 'In use',
|
||||
'not_in_use' => 'Not in use',
|
||||
'disable' => 'Take out of use',
|
||||
'enable' => 'Take into use',
|
||||
'remove' => 'Remove',
|
||||
'disable_named' => 'Take out of use: :name, :day',
|
||||
'enable_named' => 'Take into use: :name, :day',
|
||||
'remove_named' => 'Remove: :name, :day',
|
||||
'disabled' => ':name (:day) taken out of use.',
|
||||
'enabled' => ':name (:day) taken into use.',
|
||||
'removed' => ':name (:day) removed.',
|
||||
'added' => ':name (:day) added.',
|
||||
'not_changed' => 'The day could not be changed. Reload the page.',
|
||||
'add_heading' => 'Add a company day off',
|
||||
'add' => 'Add',
|
||||
'fields' => [
|
||||
'date' => 'Date',
|
||||
'name' => 'Name',
|
||||
'name_hint' => 'For example "Company recreation day".',
|
||||
],
|
||||
'errors' => [
|
||||
'date' => 'Enter a date as dd.mm.yyyy between the years 2000 and 2100.',
|
||||
'name' => 'Enter a name (at most 100 characters).',
|
||||
'exists' => 'The day is already a public holiday or a day off.',
|
||||
],
|
||||
'names' => [
|
||||
'new_years_day' => 'New Year\'s Day',
|
||||
'epiphany' => 'Epiphany',
|
||||
'good_friday' => 'Good Friday',
|
||||
'easter_monday' => 'Easter Monday',
|
||||
'may_day' => 'May Day',
|
||||
'ascension_day' => 'Ascension Day',
|
||||
'midsummer_eve' => 'Midsummer Eve',
|
||||
'independence_day' => 'Independence Day',
|
||||
'christmas_eve' => 'Christmas Eve',
|
||||
'christmas_day' => 'Christmas Day',
|
||||
'st_stephens_day' => 'Boxing Day',
|
||||
],
|
||||
'weekdays' => [
|
||||
1 => 'Mon',
|
||||
2 => 'Tue',
|
||||
3 => 'Wed',
|
||||
4 => 'Thu',
|
||||
5 => 'Fri',
|
||||
6 => 'Sat',
|
||||
7 => 'Sun',
|
||||
],
|
||||
];
|
||||
Reference in New Issue
Block a user