chore(i18n): migrate start stop keys to fl_lib (#1057)
This commit is contained in:
@@ -25,12 +25,12 @@ extension _Actions on _ServerEditPageState {
|
||||
if (_nameController.text.isEmpty) {
|
||||
_nameController.text = server.ip;
|
||||
}
|
||||
context.showSnackBar('${libL10n.found} 1 ${l10n.server}');
|
||||
context.showSnackBar('${libL10n.found} 1 ${libL10n.server}');
|
||||
} else {
|
||||
// Multiple servers - show import dialog
|
||||
final shouldImport = await context.showRoundDialog<bool>(
|
||||
title: libL10n.import,
|
||||
child: Text(libL10n.askContinue('${libL10n.found} ${discoveredServers.length} ${l10n.servers}')),
|
||||
child: Text(libL10n.askContinue('${libL10n.found} ${discoveredServers.length} ${libL10n.servers}')),
|
||||
actions: Btnx.cancelOk,
|
||||
);
|
||||
|
||||
@@ -46,7 +46,7 @@ extension _Actions on _ServerEditPageState {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text('${libL10n.found} ${discoveredServers.length} ${l10n.servers}.'),
|
||||
Text('${libL10n.found} ${discoveredServers.length} ${libL10n.servers}.'),
|
||||
const SizedBox(height: 8),
|
||||
Text(libL10n.setting),
|
||||
const SizedBox(height: 8),
|
||||
@@ -99,7 +99,7 @@ extension _Actions on _ServerEditPageState {
|
||||
dprint('Failed to import server ${server.name}: $e');
|
||||
}
|
||||
}
|
||||
context.showSnackBar('${libL10n.success}: $imported ${l10n.servers}');
|
||||
context.showSnackBar('${libL10n.success}: $imported ${libL10n.servers}');
|
||||
if (mounted) context.pop(true);
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ extension _Actions on _ServerEditPageState {
|
||||
|
||||
void _onSave() async {
|
||||
if (_ipController.text.isEmpty) {
|
||||
context.showSnackBar('${libL10n.empty} ${l10n.host}');
|
||||
context.showSnackBar('${libL10n.empty} ${libL10n.host}');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ extension _Utils on _ServerEditPageState {
|
||||
|
||||
Future<void> _showCmdTypesDialog(Set<ShellCmdType> allCmdTypes) {
|
||||
return context.showRoundDialog(
|
||||
title: '${libL10n.disabled} ${l10n.cmd}',
|
||||
title: '${libL10n.disabled} ${libL10n.cmd}',
|
||||
child: SizedBox(
|
||||
width: 270,
|
||||
child: _disabledCmdTypes.listenVal((disabled) {
|
||||
|
||||
@@ -160,7 +160,7 @@ class _ServerEditPageState extends ConsumerState<ServerEditPage> with AfterLayou
|
||||
type: TextInputType.url,
|
||||
onSubmitted: (_) => _focusScope.requestFocus(_portFocus),
|
||||
node: _ipFocus,
|
||||
label: l10n.host,
|
||||
label: libL10n.host,
|
||||
icon: BoxIcons.bx_server,
|
||||
hint: 'example.com',
|
||||
suggestion: false,
|
||||
@@ -170,7 +170,7 @@ class _ServerEditPageState extends ConsumerState<ServerEditPage> with AfterLayou
|
||||
type: TextInputType.number,
|
||||
node: _portFocus,
|
||||
onSubmitted: (_) => _focusScope.requestFocus(_usernameFocus),
|
||||
label: l10n.port,
|
||||
label: libL10n.port,
|
||||
icon: Bootstrap.number_123,
|
||||
hint: '22',
|
||||
suggestion: false,
|
||||
|
||||
@@ -157,7 +157,7 @@ extension _Widgets on _ServerEditPageState {
|
||||
return Input(
|
||||
controller: _scriptDirCtrl,
|
||||
type: TextInputType.text,
|
||||
label: '${l10n.remotePath} (Shell ${l10n.install})',
|
||||
label: '${l10n.remotePath} (Shell ${libL10n.install})',
|
||||
icon: Icons.folder,
|
||||
hint: '~/.config/server_box',
|
||||
suggestion: false,
|
||||
@@ -176,7 +176,7 @@ extension _Widgets on _ServerEditPageState {
|
||||
Input(
|
||||
controller: _preferTempDevCtrl,
|
||||
type: TextInputType.text,
|
||||
label: l10n.temperature,
|
||||
label: libL10n.temperature,
|
||||
icon: MingCute.low_temperature_line,
|
||||
hint: 'nvme-pci-0400',
|
||||
suggestion: false,
|
||||
@@ -184,7 +184,7 @@ extension _Widgets on _ServerEditPageState {
|
||||
Input(
|
||||
controller: _netDevCtrl,
|
||||
type: TextInputType.text,
|
||||
label: l10n.net,
|
||||
label: libL10n.net,
|
||||
icon: ZondIcons.network,
|
||||
hint: 'eth0',
|
||||
suggestion: false,
|
||||
@@ -278,7 +278,7 @@ extension _Widgets on _ServerEditPageState {
|
||||
leading: const Icon(MingCute.doc_line),
|
||||
title: Text(libL10n.doc),
|
||||
trailing: const Icon(Icons.open_in_new, size: 17),
|
||||
onTap: l10n.customCmdDocUrl.launchUrl,
|
||||
onTap: libL10n.customCmdDocUrl.launchUrl,
|
||||
).cardx,
|
||||
],
|
||||
);
|
||||
@@ -288,11 +288,11 @@ extension _Widgets on _ServerEditPageState {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
CenterGreyTitle('${libL10n.disabled} ${l10n.cmd}'),
|
||||
CenterGreyTitle('${libL10n.disabled} ${libL10n.cmd}'),
|
||||
_disabledCmdTypes.listenVal((disabled) {
|
||||
return ListTile(
|
||||
leading: const Icon(Icons.disabled_by_default),
|
||||
title: Text('${libL10n.disabled} ${l10n.cmd}'),
|
||||
title: Text('${libL10n.disabled} ${libL10n.cmd}'),
|
||||
subtitle: disabled.isEmpty
|
||||
? null
|
||||
: Text(disabled.join(', '), style: UIs.textGrey),
|
||||
@@ -458,7 +458,7 @@ extension _Widgets on _ServerEditPageState {
|
||||
title: libL10n.attention,
|
||||
child: Text(
|
||||
libL10n.askContinue(
|
||||
'${libL10n.delete} ${l10n.server}(${spi!.name})',
|
||||
'${libL10n.delete} ${libL10n.server}(${spi!.name})',
|
||||
),
|
||||
),
|
||||
actions: Btn.ok(
|
||||
|
||||
Reference in New Issue
Block a user