From b5021c918d28d1334beada54ee77ad2f4f1f695c Mon Sep 17 00:00:00 2001 From: Yannick Mauray Date: Wed, 3 Jul 2024 13:06:46 +0200 Subject: [PATCH] chore: localizations --- assets/i18n/en.po | 3 +++ assets/i18n/fr.po | 3 +++ assets/i18n/quickgui.pot | 3 +++ lib/src/pages/manager.dart | 31 ++++++++++++++++++++----------- 4 files changed, 29 insertions(+), 11 deletions(-) diff --git a/assets/i18n/en.po b/assets/i18n/en.po index bb6aeb2..a51ad4c 100644 --- a/assets/i18n/en.po +++ b/assets/i18n/en.po @@ -184,3 +184,6 @@ msgstr "SSH username" # Connect to the VM via SSH msgid "Connect" msgstr "Connect" + +msgid "Loading available downloads" +msgstr "Loading available downloads" diff --git a/assets/i18n/fr.po b/assets/i18n/fr.po index 52dcd8f..3739ec8 100644 --- a/assets/i18n/fr.po +++ b/assets/i18n/fr.po @@ -184,3 +184,6 @@ msgstr "Nom d'utilisateur SSH" # Connect to the VM via SSH msgid "Connect" msgstr "Connecter" + +msgid "Loading available downloads" +msgstr "Chargement des téléchargements disponibles" diff --git a/assets/i18n/quickgui.pot b/assets/i18n/quickgui.pot index 37a154b..3f9ab5e 100644 --- a/assets/i18n/quickgui.pot +++ b/assets/i18n/quickgui.pot @@ -186,3 +186,6 @@ msgstr "" # Connect to the VM via SSH msgid "Connect" msgstr "" + +msgid "Loading available downloads" +msgstr "" diff --git a/lib/src/pages/manager.dart b/lib/src/pages/manager.dart index c368014..23f28f4 100644 --- a/lib/src/pages/manager.dart +++ b/lib/src/pages/manager.dart @@ -13,8 +13,8 @@ import 'package:version/version.dart'; import '../globals.dart'; import '../mixins/preferences_mixin.dart'; -import '../model/vminfo.dart'; import '../model/osicons.dart'; +import '../model/vminfo.dart'; /// VM manager page. /// Displays a list of available VMs, running state and connection info, @@ -83,8 +83,7 @@ class _ManagerState extends State with PreferencesMixin { // Find out which terminal emulator we have set as the default. String result = whichSync('x-terminal-emulator') ?? ''; if (result.isNotEmpty) { - String terminalEmulator = - await File(result).resolveSymbolicLinks(); + String terminalEmulator = await File(result).resolveSymbolicLinks(); terminalEmulator = path.basenameWithoutExtension(terminalEmulator); if (_supportedTerminalEmulators.contains(terminalEmulator)) { setState(() { @@ -109,7 +108,7 @@ class _ManagerState extends State with PreferencesMixin { void _detectSpice() async { var result = whichSync('spicy') ?? ''; setState(() { - _spicy = result.isNotEmpty ; + _spicy = result.isNotEmpty; }); } @@ -273,7 +272,7 @@ class _ManagerState extends State with PreferencesMixin { } String vmStem = currentVm; SvgPicture? osIcon; - while(vmStem.contains('-')) { + while (vmStem.contains('-')) { vmStem = vmStem.substring(0, vmStem.lastIndexOf('-')); if (osIcons.containsKey(vmStem)) { osIcon = SvgPicture.asset( @@ -301,7 +300,11 @@ class _ManagerState extends State with PreferencesMixin { ? null : () async { Map activeVms = _activeVms; - List command = ['quickemu', '--vm', '$currentVm.conf']; + List command = [ + 'quickemu', + '--vm', + '$currentVm.conf' + ]; if (_spicy) { command.addAll(['--display', 'spice']); } @@ -327,7 +330,7 @@ class _ManagerState extends State with PreferencesMixin { builder: (BuildContext context) => AlertDialog( title: Text(context.t('Stop The Virtual Machine?')), content: Text(context.t( - 'You are about to terminate the virtual machine', + 'You are about to terminate the virtual machine {0}', args: [currentVm])), actions: [ TextButton( @@ -346,9 +349,15 @@ class _ManagerState extends State with PreferencesMixin { var shell = Shell(); // If Quickemu is newer than 4.9.6, use the new --kill option // which is macOS compatible. - var quickemuVersion = Version.parse(await fetchQuickemuVersion()); + var quickemuVersion = + Version.parse(await fetchQuickemuVersion()); if (quickemuVersion >= Version(4, 9, 6)) { - shell.run(['quickemu', '--vm', '$currentVm.conf', '--kill'].join(' ')); + shell.run([ + 'quickemu', + '--vm', + '$currentVm.conf', + '--kill' + ].join(' ')); } else { shell.run(['killall', currentVm].join(' ')); } @@ -432,8 +441,8 @@ class _ManagerState extends State with PreferencesMixin { IconButton( icon: SvgPicture.asset('assets/images/console.svg', semanticsLabel: 'Connect with SSH', - colorFilter: ColorFilter.mode(sshy ? buttonColor : Colors.grey, BlendMode.srcIn) - ), + colorFilter: ColorFilter.mode( + sshy ? buttonColor : Colors.grey, BlendMode.srcIn)), tooltip: sshy ? context.t('Connect with SSH') : context.t('SSH server not detected on guest'),