feat: ship the interface in eight languages, with per-language plurals and mirroring
This commit is contained in:
parent
6de6672ae3
commit
a4a49f41d7
28 changed files with 1795 additions and 32 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import '../../l10n/strings.dart';
|
||||
import '../../l10n/locales.dart';
|
||||
import '../../mews/document.dart';
|
||||
import '../fonts.dart';
|
||||
import '../controllers/reader_settings_controller.dart'
|
||||
|
|
@ -33,6 +34,7 @@ Future<MewsPage> buildSettingsPage(
|
|||
return internalPage(
|
||||
url: url,
|
||||
title: title,
|
||||
strings: strings,
|
||||
body: [
|
||||
...chrome(title: title, current: url, strings: strings),
|
||||
HeadingBlock(2, [MewsText(strings.t('settings-font-heading'))]),
|
||||
|
|
@ -80,6 +82,22 @@ Future<MewsPage> buildSettingsPage(
|
|||
current: mode == settings.themeMode.value,
|
||||
),
|
||||
]),
|
||||
// The language a reader wants may not be the one they can currently
|
||||
// read, so each is named in its own words.
|
||||
HeadingBlock(2, [MewsText(strings.t('settings-language-heading'))]),
|
||||
choiceRow([
|
||||
(
|
||||
href: MewsUrls.action('set-language', {'value': systemLanguage}),
|
||||
label: strings.t('settings-language-system'),
|
||||
current: settings.language.value == systemLanguage,
|
||||
),
|
||||
for (final locale in appLocales)
|
||||
(
|
||||
href: MewsUrls.action('set-language', {'value': locale.tag}),
|
||||
label: strings.t(locale.labelId),
|
||||
current: locale.tag == settings.language.value,
|
||||
),
|
||||
]),
|
||||
HeadingBlock(2, [MewsText(strings.t('settings-variant-heading'))]),
|
||||
choiceRow([
|
||||
for (final variant in ReaderSettingsController.variants)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue