Skip to content

Commit

Permalink
fix: more unlocalizable messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ymauray authored and flexiondotorg committed Jun 28, 2024
1 parent 404579a commit 0ac635a
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 14 deletions.
34 changes: 34 additions & 0 deletions assets/i18n/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,37 @@ msgstr "See"

msgid "for more information"
msgstr "for more information"

msgid "Delete {0}"
msgstr "Delete {0}"

msgid "You are about to delete {0}. This cannot be undone. Would you like to delete the disk image but keep the configuration, or delete the whole VM?"
msgstr "You are about to delete {0}. This cannot be undone. Would you like to delete the disk image but keep the configuration, or delete the whole VM?"

msgid "Delete disk image"
msgstr "Delete disk image"

msgid "Delete whole VM"
msgstr "Delete whole VM"

msgid "Connect display with SPICE"
msgstr "Connect display with SPICE"

msgid "SPICE client not found"
msgstr "SPICE client not found"

msgid "Connect with SSH"
msgstr "Connect with SSH"

msgid "SSH server not detected on guest"
msgstr "SSH server not detected on guest"

msgid "Launch SSH connection to {0}"
msgstr "Launch SSH connection to {0}"

msgid "SSH username"
msgstr "SSH username"

# Connect to the VM via SSH
msgid "Connect"
msgstr "Connect"
34 changes: 34 additions & 0 deletions assets/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,37 @@ msgstr "Voir"

msgid "for more information"
msgstr "pour plus d'informations"

msgid "Delete {0}"
msgstr "Supprimer {0}"

msgid "You are about to delete {0}. This cannot be undone. Would you like to delete the disk image but keep the configuration, or delete the whole VM?"
msgstr "Vous êtes sur le point de supprimer {0}. Cette action est irréversible. Voulez-vous supprimer l'image disque mais conserver la configuration, ou supprimer la machine virtuelle entière ?"

msgid "Delete disk image"
msgstr "Supprimer l'image disque"

msgid "Delete whole VM"
msgstr "Supprimer la machine virtuelle entière"

msgid "Connect display with SPICE"
msgstr "Connecter l'affichage avec SPICE"

msgid "SPICE client not found"
msgstr "Client SPICE non trouvé"

msgid "Connect with SSH"
msgstr "Se connecter avec SSH"

msgid "SSH server not detected on guest"
msgstr "Serveur SSH non détecté sur l'invité"

msgid "Launch SSH connection to {0}"
msgstr "Lancer la connexion SSH vers {0}"

msgid "SSH username"
msgstr "Nom d'utilisateur SSH"

# Connect to the VM via SSH
msgid "Connect"
msgstr "Connecter"
35 changes: 35 additions & 0 deletions assets/i18n/quickgui.pot
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,38 @@ msgstr ""
# The complete sentence is "See github.com/quickemu-project/quickemu for more information"
msgid "for more information"
msgstr ""

msgid "Delete {0}"
msgstr ""

msgid "You are about to delete {0}. This cannot be undone. Would you like to delete the disk image but keep the configuration, or delete the whole VM?"
msgstr ""

msgid "Delete disk image"
msgstr ""

msgid "Delete whole VM"
msgstr ""

msgid "Connect display with SPICE"
msgstr ""

msgid "SPICE client not found"
msgstr ""

msgid "Connect with SSH"
msgstr ""

msgid "SSH server not detected on guest"
msgstr ""

msgid "Launch SSH connection to {0}"
msgstr ""

msgid "SSH username"
msgstr ""

# Connect to the VM via SSH
msgid "Connect"
msgstr ""

38 changes: 24 additions & 14 deletions lib/src/pages/manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -359,20 +359,25 @@ class _ManagerState extends State<Manager> with PreferencesMixin {
showDialog<String?>(
context: context,
builder: (BuildContext context) => AlertDialog(
title: Text('Delete $currentVm'),
content: Text('You are about to delete $currentVm. This cannot be undone. Would you like to delete the disk image but keep the configuration, or delete the whole VM?'),
title: Text(
context.t('Delete {0}', args: [currentVm])),
content: Text(
context.t(
'You are about to delete {0}. This cannot be undone. Would you like to delete the disk image but keep the configuration, or delete the whole VM?',
args: [currentVm]),
),
actions: [
TextButton(
child: const Text('Cancel'),
child: Text(context.t('Cancel')),
onPressed: () =>
Navigator.pop(context, 'cancel'),
),
TextButton(
child: const Text('Delete disk image'),
child: Text(context.t('Delete disk image')),
onPressed: () => Navigator.pop(context, 'disk'),
),
TextButton(
child: const Text('Delete whole VM'),
child: Text(context.t('Delete whole VM')),
onPressed: () => Navigator.pop(context, 'vm'),
) // set up the AlertDialog
],
Expand Down Expand Up @@ -405,8 +410,8 @@ class _ManagerState extends State<Manager> with PreferencesMixin {
semanticLabel: 'Connect display with SPICE',
),
tooltip: _spicy
? 'Connect display with SPICE'
: 'SPICE client not found',
? context.t('Connect display with SPICE')
: context.t('SPICE client not found'),
onPressed: !_spicy
? null
: () {
Expand All @@ -420,8 +425,8 @@ class _ManagerState extends State<Manager> with PreferencesMixin {
colorFilter: ColorFilter.mode(sshy ? buttonColor : Colors.grey, BlendMode.srcIn)
),
tooltip: sshy
? 'Connect with SSH'
: 'SSH server not detected on guest',
? context.t('Connect with SSH')
: context.t('SSH server not detected on guest'),
onPressed: !sshy
? null
: () {
Expand All @@ -430,20 +435,25 @@ class _ManagerState extends State<Manager> with PreferencesMixin {
showDialog<bool>(
context: context,
builder: (BuildContext context) => AlertDialog(
title: Text('Launch SSH connection to $currentVm'),
title: Text(
context.t(
'Launch SSH connection to {0}',
args: [currentVm],
),
),
content: TextField(
controller: usernameController,
decoration: const InputDecoration(
hintText: "SSH username"),
decoration: InputDecoration(
hintText: context.t("SSH username")),
),
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('Connect'),
child: Text(context.t('Connect')),
),
],
),
Expand Down

0 comments on commit 0ac635a

Please sign in to comment.