Internationalization
This commit is contained in:
parent
cf4e0fefb3
commit
d1ccc710ce
|
@ -31,3 +31,4 @@ list.csv
|
|||
*.xz
|
||||
*.iso
|
||||
*.conf
|
||||
*.mo
|
||||
|
|
|
@ -1,21 +1,119 @@
|
|||
# Philipp Kiemle <philipp.kiemle@gmail.com>, 2021.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Project-Id-Version: quickgui\n"
|
||||
"POT-Creation-Date: 2021-09-29 09:59+0200\n"
|
||||
"PO-Revision-Date: 2021-11-11 09:09+0100\n"
|
||||
"Last-Translator: Philipp Kiemle <philipp.kiemle@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"PO-Revision-Date: 2021-11-11 16:44+0100\n"
|
||||
"Last-Translator: Yannick Mauray\n"
|
||||
"Language-Team: Philipp Kiemle\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Lokalize 21.08.2\n"
|
||||
"X-Generator: Poedit 3.0\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"Language: de\n"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Main menu"
|
||||
msgstr "Hauptmenü"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Use dark mode"
|
||||
msgstr "Den dunklen Modus verwenden"
|
||||
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
msgid "Click to use SPICE display"
|
||||
msgstr ""
|
||||
|
||||
msgid "Create new machines"
|
||||
msgstr ""
|
||||
|
||||
msgid "Dismiss"
|
||||
msgstr ""
|
||||
|
||||
msgid "Done !"
|
||||
msgstr ""
|
||||
|
||||
msgid "Download"
|
||||
msgstr ""
|
||||
|
||||
msgid "Download finished."
|
||||
msgstr ""
|
||||
|
||||
msgid "Downloader"
|
||||
msgstr ""
|
||||
|
||||
msgid "Downloading (no progress available)..."
|
||||
msgstr ""
|
||||
|
||||
msgid "Downloading..."
|
||||
msgstr ""
|
||||
|
||||
msgid "Manage existing machines"
|
||||
msgstr ""
|
||||
|
||||
msgid "Manager"
|
||||
msgstr ""
|
||||
|
||||
msgid "Mbs downloaded"
|
||||
msgstr ""
|
||||
|
||||
msgid "Now run"
|
||||
msgstr ""
|
||||
|
||||
msgid "OK"
|
||||
msgstr ""
|
||||
|
||||
msgid "Operating system"
|
||||
msgstr ""
|
||||
|
||||
msgid "Search operating system"
|
||||
msgstr ""
|
||||
|
||||
msgid "Search option"
|
||||
msgstr ""
|
||||
|
||||
msgid "Select operating system"
|
||||
msgstr ""
|
||||
|
||||
msgid "Select option"
|
||||
msgstr ""
|
||||
|
||||
msgid "Select version for"
|
||||
msgstr ""
|
||||
|
||||
msgid "Select..."
|
||||
msgstr ""
|
||||
|
||||
msgid "SPICE port"
|
||||
msgstr ""
|
||||
|
||||
msgid "SSH port"
|
||||
msgstr ""
|
||||
|
||||
msgid "Stop The Virtual Machine?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Target folder"
|
||||
msgstr ""
|
||||
|
||||
msgid "to start the VM"
|
||||
msgstr ""
|
||||
|
||||
msgid "Use SPICE display"
|
||||
msgstr ""
|
||||
|
||||
msgid "Using SPICE display"
|
||||
msgstr ""
|
||||
|
||||
msgid "Version"
|
||||
msgstr ""
|
||||
|
||||
msgid "Waiting for download to start"
|
||||
msgstr ""
|
||||
|
||||
msgid "You are about to terminate the virtual machine"
|
||||
msgstr ""
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Project-Id-Version: quickgui\n"
|
||||
"POT-Creation-Date: 2021-09-29 09:59+0200\n"
|
||||
"PO-Revision-Date: 2021-09-29 10:58+0200\n"
|
||||
"Last-Translator: \n"
|
||||
"PO-Revision-Date: 2021-11-11 16:42+0100\n"
|
||||
"Last-Translator: Yannick Mauray\n"
|
||||
"Language-Team: \n"
|
||||
"Language: en\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
@ -13,8 +13,138 @@ msgstr ""
|
|||
"X-Poedit-Basepath: .\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Main menu"
|
||||
msgstr "Main menu"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Use dark mode"
|
||||
msgstr "Use dark mode"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Cancel"
|
||||
msgstr "Cancel"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Click to use SPICE display"
|
||||
msgstr "Click to use SPICE display"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Create new machines"
|
||||
msgstr "Create new machines"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Dismiss"
|
||||
msgstr "Dismiss"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Done !"
|
||||
msgstr "Done !"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Download"
|
||||
msgstr "Download"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Download finished."
|
||||
msgstr "Download finished."
|
||||
|
||||
#, fuzzy
|
||||
msgid "Downloader"
|
||||
msgstr "Downloader"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Downloading (no progress available)..."
|
||||
msgstr "Downloading (no progress available)..."
|
||||
|
||||
#, fuzzy
|
||||
msgid "Downloading..."
|
||||
msgstr "Downloading..."
|
||||
|
||||
#, fuzzy
|
||||
msgid "Manage existing machines"
|
||||
msgstr "Manage existing machines"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Manager"
|
||||
msgstr "Manager"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Mbs downloaded"
|
||||
msgstr "Mbs downloaded"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Now run"
|
||||
msgstr "Now run"
|
||||
|
||||
#, fuzzy
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Operating system"
|
||||
msgstr "Operating system"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Search operating system"
|
||||
msgstr "Search operating system"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Search option"
|
||||
msgstr "Search option"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Select operating system"
|
||||
msgstr "Select operating system"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Select option"
|
||||
msgstr "Select option"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Select version for"
|
||||
msgstr "Select version for"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Select..."
|
||||
msgstr "Select..."
|
||||
|
||||
#, fuzzy
|
||||
msgid "SPICE port"
|
||||
msgstr "SPICE port"
|
||||
|
||||
#, fuzzy
|
||||
msgid "SSH port"
|
||||
msgstr "SSH port"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Stop The Virtual Machine?"
|
||||
msgstr "Stop The Virtual Machine?"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Target folder"
|
||||
msgstr "Target folder"
|
||||
|
||||
#, fuzzy
|
||||
msgid "to start the VM"
|
||||
msgstr "to start the VM"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Use SPICE display"
|
||||
msgstr "Use SPICE display"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Using SPICE display"
|
||||
msgstr "Using SPICE display"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Version"
|
||||
msgstr "Version"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Waiting for download to start"
|
||||
msgstr "Waiting for download to start"
|
||||
|
||||
#, fuzzy
|
||||
msgid "You are about to terminate the virtual machine"
|
||||
msgstr "You are about to terminate the virtual machine"
|
||||
|
|
|
@ -1,20 +1,150 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Project-Id-Version: quickgui\n"
|
||||
"POT-Creation-Date: 2021-09-29 09:59+0200\n"
|
||||
"PO-Revision-Date: 2021-09-29 10:58+0200\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"PO-Revision-Date: 2021-11-11 16:44+0100\n"
|
||||
"Last-Translator: Yannick Mauray\n"
|
||||
"Language-Team: Yannick Mauray\n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 3.0\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Main menu"
|
||||
msgstr "Menu principal"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Use dark mode"
|
||||
msgstr "Utiliser le mode sombre"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Cancel"
|
||||
msgstr "Annuler"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Click to use SPICE display"
|
||||
msgstr "Cliquez pour utiliser l'affichage SPICE"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Create new machines"
|
||||
msgstr "Créer de nouvelles machines"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Dismiss"
|
||||
msgstr "Fermer"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Done !"
|
||||
msgstr "Fini!"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Download"
|
||||
msgstr "Télécharger"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Download finished."
|
||||
msgstr "Téléchargement terminé."
|
||||
|
||||
#, fuzzy
|
||||
msgid "Downloader"
|
||||
msgstr "Gestionnaire de téléchargements"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Downloading (no progress available)..."
|
||||
msgstr "Téléchargement (pas de barre de progression)..."
|
||||
|
||||
#, fuzzy
|
||||
msgid "Downloading..."
|
||||
msgstr "Téléchargement..."
|
||||
|
||||
#, fuzzy
|
||||
msgid "Manage existing machines"
|
||||
msgstr "Gérer les machines existantes"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Manager"
|
||||
msgstr "Gestionnaire"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Mbs downloaded"
|
||||
msgstr "Mbs téléchargés"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Now run"
|
||||
msgstr "Lancer"
|
||||
|
||||
#, fuzzy
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Operating system"
|
||||
msgstr "Système d'exploitation"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Search operating system"
|
||||
msgstr "Chercher un système d'exploitation"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Search option"
|
||||
msgstr "Chercher une option"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Select operating system"
|
||||
msgstr "Sélectionner un système d'exploitation"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Select option"
|
||||
msgstr "Sélectionner une option"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Select version for"
|
||||
msgstr "Sélectionner une version pour"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Select..."
|
||||
msgstr "Sélectionner..."
|
||||
|
||||
#, fuzzy
|
||||
msgid "SPICE port"
|
||||
msgstr "Port SPICE"
|
||||
|
||||
#, fuzzy
|
||||
msgid "SSH port"
|
||||
msgstr "Port SSH"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Stop The Virtual Machine?"
|
||||
msgstr "Arrêtez la machine virtuelle ?"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Target folder"
|
||||
msgstr "Dossier cible"
|
||||
|
||||
#, fuzzy
|
||||
msgid "to start the VM"
|
||||
msgstr "pour démarrer la machine virtuelle"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Use SPICE display"
|
||||
msgstr "Utiliser l'affichage SPICE"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Using SPICE display"
|
||||
msgstr "Utilisation de l'affichage SPICE"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Version"
|
||||
msgstr "Version"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Waiting for download to start"
|
||||
msgstr "En attente du début du téléchargement"
|
||||
|
||||
#, fuzzy
|
||||
msgid "You are about to terminate the virtual machine"
|
||||
msgstr "Vous êtes sur le point d'arrêter la machine virtuelle"
|
||||
|
|
|
@ -18,3 +18,99 @@ msgstr ""
|
|||
|
||||
msgid "Use dark mode"
|
||||
msgstr ""
|
||||
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
msgid "Click to use SPICE display"
|
||||
msgstr ""
|
||||
|
||||
msgid "Create new machines"
|
||||
msgstr ""
|
||||
|
||||
msgid "Dismiss"
|
||||
msgstr ""
|
||||
|
||||
msgid "Done !"
|
||||
msgstr ""
|
||||
|
||||
msgid "Download"
|
||||
msgstr ""
|
||||
|
||||
msgid "Download finished."
|
||||
msgstr ""
|
||||
|
||||
msgid "Downloader"
|
||||
msgstr ""
|
||||
|
||||
msgid "Downloading (no progress available)..."
|
||||
msgstr ""
|
||||
|
||||
msgid "Downloading..."
|
||||
msgstr ""
|
||||
|
||||
msgid "Manage existing machines"
|
||||
msgstr ""
|
||||
|
||||
msgid "Manager"
|
||||
msgstr ""
|
||||
|
||||
msgid "Mbs downloaded"
|
||||
msgstr ""
|
||||
|
||||
msgid "Now run"
|
||||
msgstr ""
|
||||
|
||||
msgid "OK"
|
||||
msgstr ""
|
||||
|
||||
msgid "Operating system"
|
||||
msgstr ""
|
||||
|
||||
msgid "Search operating system"
|
||||
msgstr ""
|
||||
|
||||
msgid "Search option"
|
||||
msgstr ""
|
||||
|
||||
msgid "Select operating system"
|
||||
msgstr ""
|
||||
|
||||
msgid "Select option"
|
||||
msgstr ""
|
||||
|
||||
msgid "Select version for"
|
||||
msgstr ""
|
||||
|
||||
msgid "Select..."
|
||||
msgstr ""
|
||||
|
||||
msgid "SPICE port"
|
||||
msgstr ""
|
||||
|
||||
msgid "SSH port"
|
||||
msgstr ""
|
||||
|
||||
msgid "Stop The Virtual Machine?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Target folder"
|
||||
msgstr ""
|
||||
|
||||
msgid "to start the VM"
|
||||
msgstr ""
|
||||
|
||||
msgid "Use SPICE display"
|
||||
msgstr ""
|
||||
|
||||
msgid "Using SPICE display"
|
||||
msgstr ""
|
||||
|
||||
msgid "Version"
|
||||
msgstr ""
|
||||
|
||||
msgid "Waiting for download to start"
|
||||
msgstr ""
|
||||
|
||||
msgid "You are about to terminate the virtual machine"
|
||||
msgstr ""
|
||||
|
|
|
@ -9,6 +9,7 @@ import 'package:quickgui/src/model/version.dart';
|
|||
import 'package:quickgui/src/widgets/downloader/cancel_dismiss_button.dart';
|
||||
import 'package:quickgui/src/widgets/downloader/download_label.dart';
|
||||
import 'package:quickgui/src/widgets/downloader/download_progress_bar.dart';
|
||||
import 'package:quickgui/src/i18n/i18n_ext.dart';
|
||||
|
||||
class Downloader extends StatefulWidget {
|
||||
const Downloader({
|
||||
|
@ -120,7 +121,7 @@ class _DownloaderState extends State<Downloader> {
|
|||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 32),
|
||||
child: Text("Target folder : ${Directory.current}"),
|
||||
child: Text('${context.t('Target folder')} : ${Directory.current}'),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:quickgui/src/widgets/home_page/downloader_menu.dart';
|
||||
import 'package:quickgui/src/widgets/home_page/logo.dart';
|
||||
import 'package:quickgui/src/i18n/i18n_ext.dart';
|
||||
|
||||
class DownloaderPage extends StatelessWidget {
|
||||
const DownloaderPage({Key? key}) : super(key: key);
|
||||
|
@ -9,7 +10,7 @@ class DownloaderPage extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Downloader'),
|
||||
title: Text(context.t('Downloader')),
|
||||
),
|
||||
body: Column(
|
||||
children: const [
|
||||
|
|
|
@ -7,6 +7,7 @@ import 'dart:io';
|
|||
import 'package:quickgui/src/globals.dart';
|
||||
import 'package:quickgui/src/model/vminfo.dart';
|
||||
import 'package:quickgui/src/mixins/preferences_mixin.dart';
|
||||
import 'package:quickgui/src/i18n/i18n_ext.dart';
|
||||
|
||||
/// VM manager page.
|
||||
/// Displays a list of available VMs, running state and connection info,
|
||||
|
@ -155,10 +156,10 @@ class _ManagerState extends State<Manager> with PreferencesMixin {
|
|||
if (active) {
|
||||
VmInfo vmInfo = _activeVms[currentVm]!;
|
||||
if (vmInfo.sshPort != null) {
|
||||
connectInfo += 'SSH port: ' + vmInfo.sshPort! + ' ';
|
||||
connectInfo += context.t('SSH port') + ': ' + vmInfo.sshPort! + ' ';
|
||||
}
|
||||
if (vmInfo.spicePort != null) {
|
||||
connectInfo += 'SPICE port: ' + vmInfo.spicePort! + ' ';
|
||||
connectInfo += context.t('SPICE port') + ': ' + vmInfo.spicePort! + ' ';
|
||||
}
|
||||
}
|
||||
return <Widget>[
|
||||
|
@ -168,8 +169,9 @@ class _ManagerState extends State<Manager> with PreferencesMixin {
|
|||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
IconButton(
|
||||
icon: Icon(Icons.monitor, color: spicy ? Colors.red : null, semanticLabel: spicy ? 'Using SPICE display' : 'Click to use SPICE display'),
|
||||
tooltip: spicy ? 'Using SPICE display' : 'Use SPICE display',
|
||||
icon: Icon(Icons.monitor,
|
||||
color: spicy ? Colors.red : null, semanticLabel: spicy ? context.t('Using SPICE display') : context.t('Click to use SPICE display')),
|
||||
tooltip: spicy ? context.t('Using SPICE display') : context.t('Use SPICE display'),
|
||||
onPressed: () {
|
||||
if (spicy) {
|
||||
setState(() {
|
||||
|
@ -213,16 +215,16 @@ class _ManagerState extends State<Manager> with PreferencesMixin {
|
|||
showDialog<bool>(
|
||||
context: context,
|
||||
builder: (BuildContext context) => AlertDialog(
|
||||
title: const Text('Stop The Virtual Machine?'),
|
||||
content: Text('You are about to terminate the virtual machine $currentVm'),
|
||||
title: Text(context.t('Stop The Virtual Machine?')),
|
||||
content: Text('${context.t('You are about to terminate the virtual machine')} $currentVm'),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context, false),
|
||||
child: const Text('Cancel'),
|
||||
child: Text(context.t('Cancel')),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context, true),
|
||||
child: const Text('OK'),
|
||||
child: Text(context.t('OK')),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -252,7 +254,7 @@ class _ManagerState extends State<Manager> with PreferencesMixin {
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Manager'),
|
||||
title: Text(context.t('Manager')),
|
||||
),
|
||||
body: _buildVmList(),
|
||||
);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:quickgui/src/model/operating_system.dart';
|
||||
import 'package:quickgui/src/i18n/i18n_ext.dart';
|
||||
|
||||
class OperatingSystemSelection extends StatefulWidget {
|
||||
const OperatingSystemSelection({Key? key}) : super(key: key);
|
||||
|
@ -23,7 +24,7 @@ class _OperatingSystemSelectionState extends State<OperatingSystemSelection> {
|
|||
var list = gOperatingSystems.where((os) => os.name.toLowerCase().contains(term.toLowerCase())).toList();
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Select operating system'),
|
||||
title: Text(context.t('Select operating system')),
|
||||
bottom: PreferredSize(
|
||||
preferredSize: const Size.fromHeight(kToolbarHeight),
|
||||
child: Padding(
|
||||
|
@ -42,7 +43,7 @@ class _OperatingSystemSelectionState extends State<OperatingSystemSelection> {
|
|||
Expanded(
|
||||
child: TextField(
|
||||
focusNode: focusNode,
|
||||
decoration: const InputDecoration.collapsed(hintText: 'Search operating system'),
|
||||
decoration: InputDecoration.collapsed(hintText: context.t('Search operating system')),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
term = value;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:quickgui/src/model/version.dart';
|
||||
import 'package:quickgui/src/i18n/i18n_ext.dart';
|
||||
|
||||
class OptionSelection extends StatefulWidget {
|
||||
const OptionSelection(this.version, {Key? key}) : super(key: key);
|
||||
|
@ -26,7 +27,7 @@ class _OptionSelectionState extends State<OptionSelection> {
|
|||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Select option'),
|
||||
title: Text(context.t('Select option')),
|
||||
bottom: widget.version.options.length <= 6
|
||||
? null
|
||||
: PreferredSize(
|
||||
|
@ -47,7 +48,7 @@ class _OptionSelectionState extends State<OptionSelection> {
|
|||
Expanded(
|
||||
child: TextField(
|
||||
focusNode: focusNode,
|
||||
decoration: const InputDecoration.collapsed(hintText: 'Search option'),
|
||||
decoration: InputDecoration.collapsed(hintText: context.t('Search option')),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
term = value;
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:quickgui/src/model/option.dart';
|
|||
import 'package:quickgui/src/model/version.dart';
|
||||
import 'package:quickgui/src/pages/option_selection.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
import 'package:quickgui/src/i18n/i18n_ext.dart';
|
||||
|
||||
class VersionSelection extends StatefulWidget {
|
||||
const VersionSelection({Key? key, required this.operatingSystem}) : super(key: key);
|
||||
|
@ -19,7 +20,7 @@ class _VersionSelectionState extends State<VersionSelection> {
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Select version for ${widget.operatingSystem.name}'),
|
||||
title: Text('${context.t('Select version for')} ${widget.operatingSystem.name}'),
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:quickgui/src/i18n/i18n_ext.dart';
|
||||
|
||||
class CancelDismissButton extends StatelessWidget {
|
||||
const CancelDismissButton({
|
||||
|
@ -26,7 +27,7 @@ class CancelDismissButton extends StatelessWidget {
|
|||
: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: downloadFinished ? const Text('Dimiss') : const Text('Cancel'),
|
||||
child: downloadFinished ? Text(context.t('Dismiss')) : Text(context.t('Cancel')),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:quickgui/src/i18n/i18n_ext.dart';
|
||||
|
||||
class DownloadLabel extends StatelessWidget {
|
||||
const DownloadLabel({Key? key, required this.downloadFinished, required this.data, required this.downloader}) : super(key: key);
|
||||
|
@ -12,14 +13,14 @@ class DownloadLabel extends StatelessWidget {
|
|||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: downloadFinished
|
||||
? const Text('Download finished.')
|
||||
? Text(context.t('Download finished.'))
|
||||
: data != null
|
||||
? downloader != 'zsync'
|
||||
? downloader == 'wget'
|
||||
? Text('Downloading...${(data! * 100).toInt()}%')
|
||||
: Text('$data Mbs downloaded')
|
||||
: const Text("Downloading (no progress available)...")
|
||||
: const Text('Waiting for download to start'),
|
||||
? Text('${context.t('Downloading...')}${(data! * 100).toInt()}%')
|
||||
: Text('$data ${context.t('Mbs downloaded')}')
|
||||
: Text(context.t("Downloading (no progress available)..."))
|
||||
: Text(context.t('Waiting for download to start')),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import 'package:quickgui/src/pages/operating_system_selection.dart';
|
|||
import 'package:quickgui/src/pages/version_selection.dart';
|
||||
import 'package:quickgui/src/widgets/home_page/home_page_button.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
import 'package:quickgui/src/i18n/i18n_ext.dart';
|
||||
|
||||
class HomePageButtonGroup extends StatefulWidget {
|
||||
const HomePageButtonGroup({Key? key}) : super(key: key);
|
||||
|
@ -25,15 +26,15 @@ class _HomePageButtonGroupState extends State<HomePageButtonGroup> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var _versionButtonLabel = _selectedVersion?.version ?? 'Select...';
|
||||
var _versionButtonLabel = _selectedVersion?.version ?? context.t('Select...');
|
||||
if (_selectedOption?.option.isNotEmpty ?? false) {
|
||||
_versionButtonLabel = "$_versionButtonLabel (${_selectedOption!.option})";
|
||||
}
|
||||
return Row(
|
||||
children: [
|
||||
HomePageButton(
|
||||
label: "Operating system",
|
||||
text: _selectedOperatingSystem?.name ?? 'Select...',
|
||||
label: context.t("Operating system"),
|
||||
text: _selectedOperatingSystem?.name ?? context.t('Select...'),
|
||||
onPressed: () {
|
||||
Navigator.of(context)
|
||||
.push<OperatingSystem>(MaterialPageRoute(fullscreenDialog: true, builder: (context) => const OperatingSystemSelection()))
|
||||
|
@ -49,7 +50,7 @@ class _HomePageButtonGroupState extends State<HomePageButtonGroup> {
|
|||
},
|
||||
),
|
||||
HomePageButton(
|
||||
label: "Version",
|
||||
label: context.t('Version'),
|
||||
text: _versionButtonLabel, //_selectedVersion?.version ?? 'Select...',
|
||||
onPressed: (_selectedOperatingSystem != null)
|
||||
? () {
|
||||
|
@ -70,8 +71,8 @@ class _HomePageButtonGroupState extends State<HomePageButtonGroup> {
|
|||
: null,
|
||||
),
|
||||
HomePageButton(
|
||||
label: 'Download',
|
||||
text: 'Download',
|
||||
label: context.t('Download'),
|
||||
text: context.t('Download'),
|
||||
onPressed: (_selectedVersion == null)
|
||||
? null
|
||||
: () {
|
||||
|
@ -108,7 +109,7 @@ class _HomePageButtonGroupState extends State<HomePageButtonGroup> {
|
|||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 32),
|
||||
child: Text('Downloading...', style: Theme.of(context).textTheme.bodyText1?.copyWith(color: Colors.white)),
|
||||
child: Text(context.t('Downloading...'), style: Theme.of(context).textTheme.bodyText1?.copyWith(color: Colors.white)),
|
||||
),
|
||||
const CircularProgressIndicator(),
|
||||
Padding(
|
||||
|
@ -148,9 +149,9 @@ class _HomePageButtonGroupState extends State<HomePageButtonGroup> {
|
|||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 32),
|
||||
child: Text('Done !', style: Theme.of(context).textTheme.bodyText1?.copyWith(color: Colors.white)),
|
||||
child: Text(context.t('Done !'), style: Theme.of(context).textTheme.bodyText1?.copyWith(color: Colors.white)),
|
||||
),
|
||||
Text('Now run "quickemu --vm $operatingSystem-$version" to start the VM',
|
||||
Text('${context.t('Now run')} "quickemu --vm $operatingSystem-$version" ${context.t('to start the VM')}',
|
||||
style: Theme.of(context).textTheme.bodyText1?.copyWith(color: Colors.white)),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 32),
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:quickgui/src/pages/downloader_page.dart';
|
||||
import 'package:quickgui/src/pages/manager.dart';
|
||||
import 'package:quickgui/src/widgets/home_page/home_page_button.dart';
|
||||
import 'package:quickgui/src/i18n/i18n_ext.dart';
|
||||
|
||||
class MainMenu extends StatelessWidget {
|
||||
const MainMenu({Key? key}) : super(key: key);
|
||||
|
@ -26,7 +27,7 @@ class MainMenu extends StatelessWidget {
|
|||
),
|
||||
);
|
||||
},
|
||||
text: 'Manage existing machines',
|
||||
text: context.t('Manage existing machines'),
|
||||
),
|
||||
HomePageButton(
|
||||
onPressed: () {
|
||||
|
@ -39,7 +40,7 @@ class MainMenu extends StatelessWidget {
|
|||
),
|
||||
);
|
||||
},
|
||||
text: 'Create new machines',
|
||||
text: context.t('Create new machines'),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue