chore(i18n): migrate start stop keys to fl_lib (#1057)
This commit is contained in:
@@ -24,11 +24,11 @@ extension _AI on _AppSettingsPageState {
|
||||
final display = val.isEmpty ? libL10n.empty : val;
|
||||
return ListTile(
|
||||
leading: const Icon(Icons.view_module),
|
||||
title: Text(l10n.askAiModel),
|
||||
title: Text(libL10n.askAiModel),
|
||||
subtitle: Text(display, style: UIs.textGrey),
|
||||
onTap: () => _showAskAiFieldDialog(
|
||||
prop: _setting.askAiModel,
|
||||
title: l10n.askAiModel,
|
||||
title: libL10n.askAiModel,
|
||||
hint: 'gpt-4o-mini',
|
||||
),
|
||||
);
|
||||
|
||||
@@ -346,7 +346,7 @@ extension _App on _AppSettingsPageState {
|
||||
|
||||
Widget _buildCupertinoRoute() {
|
||||
return ListTile(
|
||||
title: Text('Cupertino ${l10n.route}'),
|
||||
title: Text('Cupertino ${libL10n.route}'),
|
||||
trailing: StoreSwitch(prop: _setting.cupertinoRoute),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -35,14 +35,14 @@ extension _Editor on _AppSettingsPageState {
|
||||
Widget _buildEditorTheme() {
|
||||
return ListTile(
|
||||
leading: const Icon(MingCute.sun_fill),
|
||||
title: Text('${libL10n.bright} ${l10n.theme.toLowerCase()}'),
|
||||
title: Text('${libL10n.bright} ${libL10n.theme.toLowerCase()}'),
|
||||
trailing: ValBuilder(
|
||||
listenable: _setting.editorTheme.listenable(),
|
||||
builder: (val) => Text(val, style: UIs.text15),
|
||||
),
|
||||
onTap: () async {
|
||||
final selected = await context.showPickSingleDialog(
|
||||
title: l10n.theme,
|
||||
title: libL10n.theme,
|
||||
items: themeMap.keys.toList(),
|
||||
display: (p0) => p0,
|
||||
initial: _setting.editorTheme.fetch(),
|
||||
@@ -57,14 +57,14 @@ extension _Editor on _AppSettingsPageState {
|
||||
Widget _buildEditorDarkTheme() {
|
||||
return ListTile(
|
||||
leading: const Icon(MingCute.moon_stars_fill),
|
||||
title: Text('${libL10n.dark} ${l10n.theme.toLowerCase()}'),
|
||||
title: Text('${libL10n.dark} ${libL10n.theme.toLowerCase()}'),
|
||||
trailing: ValBuilder(
|
||||
listenable: _setting.editorDarkTheme.listenable(),
|
||||
builder: (val) => Text(val, style: UIs.text15),
|
||||
),
|
||||
onTap: () async {
|
||||
final selected = await context.showPickSingleDialog(
|
||||
title: l10n.theme,
|
||||
title: libL10n.theme,
|
||||
items: themeMap.keys.toList(),
|
||||
display: (p0) => p0,
|
||||
initial: _setting.editorDarkTheme.fetch(),
|
||||
|
||||
@@ -130,16 +130,16 @@ extension _Server on _AppSettingsPageState {
|
||||
|
||||
Widget _buildServerFuncBtnsSwitch() {
|
||||
return ListTile(
|
||||
// title: Text(l10n.location),
|
||||
// title: Text(libL10n.location),
|
||||
// subtitle: Text(l10n.moveOutServerFuncBtnsHelp, style: UIs.text13Grey),
|
||||
title: TipText(l10n.location, l10n.moveOutServerFuncBtnsHelp),
|
||||
title: TipText(libL10n.location, l10n.moveOutServerFuncBtnsHelp),
|
||||
trailing: StoreSwitch(prop: _setting.moveServerFuncs),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildServerFuncBtnsOrder() {
|
||||
return ListTile(
|
||||
title: Text(l10n.sequence),
|
||||
title: Text(libL10n.sequence),
|
||||
trailing: const Icon(Icons.keyboard_arrow_right),
|
||||
onTap: () => ServerFuncBtnsOrderPage.route.go(context),
|
||||
);
|
||||
|
||||
@@ -43,7 +43,7 @@ extension _SFTP on _AppSettingsPageState {
|
||||
return ListTile(
|
||||
leading: const Icon(MingCute.edit_fill),
|
||||
title: TipText(libL10n.editor, l10n.sftpEditorTip),
|
||||
trailing: Text(val.isEmpty ? l10n.inner : val, style: UIs.text15),
|
||||
trailing: Text(val.isEmpty ? libL10n.inner : val, style: UIs.text15),
|
||||
onTap: () {
|
||||
withTextFieldController((ctrl) async {
|
||||
void onSave() {
|
||||
|
||||
@@ -114,7 +114,7 @@ extension _SSH on _AppSettingsPageState {
|
||||
return _setting.desktopTerminal.listenable().listenVal((val) {
|
||||
return ListTile(
|
||||
leading: const Icon(Icons.terminal),
|
||||
title: TipText(l10n.terminal, l10n.desktopTerminalTip),
|
||||
title: TipText(libL10n.terminal, l10n.desktopTerminalTip),
|
||||
trailing: Text(val, style: UIs.text15, maxLines: 1, overflow: TextOverflow.ellipsis),
|
||||
onTap: () {
|
||||
withTextFieldController((ctrl) async {
|
||||
@@ -129,7 +129,7 @@ extension _SSH on _AppSettingsPageState {
|
||||
child: Input(
|
||||
controller: ctrl,
|
||||
autoFocus: true,
|
||||
label: l10n.terminal,
|
||||
label: libL10n.terminal,
|
||||
hint: 'x-terminal-emulator / gnome-terminal',
|
||||
icon: Icons.edit,
|
||||
suggestion: false,
|
||||
@@ -159,14 +159,14 @@ extension _SSH on _AppSettingsPageState {
|
||||
|
||||
return ListTile(
|
||||
leading: const Icon(MingCute.moon_stars_fill, size: _kIconSize),
|
||||
title: Text(l10n.theme),
|
||||
title: Text(libL10n.theme),
|
||||
trailing: ValBuilder(
|
||||
listenable: _setting.termTheme.listenable(),
|
||||
builder: (val) => Text(index2Str(val), style: UIs.text15),
|
||||
),
|
||||
onTap: () async {
|
||||
final selected = await context.showPickSingleDialog(
|
||||
title: l10n.theme,
|
||||
title: libL10n.theme,
|
||||
items: List.generate(3, (index) => index),
|
||||
display: (p0) => index2Str(p0),
|
||||
initial: _setting.termTheme.fetch(),
|
||||
|
||||
@@ -71,9 +71,9 @@ class _SettingsPageState extends ConsumerState<SettingsPage> with SingleTickerPr
|
||||
),
|
||||
actions: [
|
||||
Btn.text(
|
||||
text: context.l10n.logs,
|
||||
text: context.libL10n.logs,
|
||||
onTap: () =>
|
||||
DebugPage.route.go(context, args: DebugPageArgs(title: '${context.l10n.logs}(${BuildData.build})')),
|
||||
DebugPage.route.go(context, args: DebugPageArgs(title: '${context.libL10n.logs}(${BuildData.build})')),
|
||||
),
|
||||
Btn.icon(
|
||||
icon: const Icon(Icons.delete),
|
||||
@@ -122,9 +122,9 @@ final class _AppSettingsPageState extends ConsumerState<AppSettingsPage> {
|
||||
return MultiList(
|
||||
children: [
|
||||
[const CenterGreyTitle('App'), _buildApp(), const CenterGreyTitle('AI'), _buildAskAiConfig()],
|
||||
[CenterGreyTitle(l10n.server), _buildServer()],
|
||||
[CenterGreyTitle(libL10n.server), _buildServer()],
|
||||
[const CenterGreyTitle('SSH'), _buildSSH(), const CenterGreyTitle('SFTP'), _buildSFTP()],
|
||||
[CenterGreyTitle(l10n.container), _buildContainer(), CenterGreyTitle(libL10n.editor), _buildEditor()],
|
||||
[CenterGreyTitle(libL10n.container), _buildContainer(), CenterGreyTitle(libL10n.editor), _buildEditor()],
|
||||
|
||||
/// Fullscreen Mode is designed for old mobile phone which can be
|
||||
/// used as a status screen.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'package:fl_lib/fl_lib.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:server_box/core/extension/context/locale.dart';
|
||||
import 'package:server_box/data/model/app/menu/server_func.dart';
|
||||
import 'package:server_box/data/res/store.dart';
|
||||
|
||||
@@ -19,7 +18,7 @@ class _ServerDetailOrderPageState extends State<ServerFuncBtnsOrderPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(title: Text(l10n.sequence)),
|
||||
appBar: CustomAppBar(title: Text(libL10n.sequence)),
|
||||
body: _buildBody(),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user