[gnome-boxes] Use Unicode in translatable strings
- From: Piotr Drąg <piotrdrag src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Use Unicode in translatable strings
- Date: Mon, 14 Nov 2016 10:33:33 +0000 (UTC)
commit 86c95153d3c8660cd7aea44aa8794b5b707e62fb
Author: Piotr Drąg <piotrdrag gmail com>
Date: Fri Nov 11 17:16:00 2016 +0100
Use Unicode in translatable strings
See https://developer.gnome.org/hig/stable/typography.html
https://bugzilla.gnome.org/show_bug.cgi?id=774280
src/actions-popover.vala | 2 +-
src/app.vala | 6 +++---
src/display-page.vala | 4 ++--
src/libvirt-machine-properties.vala | 18 +++++++++---------
src/libvirt-machine.vala | 2 +-
src/libvirt-system-importer.vala | 6 +++---
src/machine.vala | 10 +++++-----
src/properties.vala | 2 +-
src/selectionbar.vala | 2 +-
src/snapshot-list-row.vala | 2 +-
src/spice-display.vala | 4 ++--
src/util-app.vala | 8 ++++----
src/vm-creator.vala | 2 +-
src/vm-importer.vala | 2 +-
src/wizard.vala | 2 +-
15 files changed, 36 insertions(+), 36 deletions(-)
---
diff --git a/src/actions-popover.vala b/src/actions-popover.vala
index c1c460f..c47ba45 100644
--- a/src/actions-popover.vala
+++ b/src/actions-popover.vala
@@ -111,7 +111,7 @@ private class Boxes.ActionsPopover: Gtk.Popover {
try {
machine.save.end (result);
} catch (GLib.Error e) {
- window.notificationbar.display_error (_("Pausing '%s' failed").printf (machine.name));
+ window.notificationbar.display_error (_("Pausing “%s” failed").printf (machine.name));
}
});
}
diff --git a/src/app.vala b/src/app.vala
index 9726fb6..ee9e106 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -193,7 +193,7 @@ private class Boxes.App: Gtk.Application {
opt_uris = null;
opt_search = null;
- var parameter_string = _("- A simple application to access remote or virtual machines");
+ var parameter_string = _("— A simple application to access remote or virtual machines");
var opt_context = new OptionContext (parameter_string);
opt_context.add_main_entries (options, null);
opt_context.set_help_enabled (false);
@@ -440,7 +440,7 @@ private class Boxes.App: Gtk.Application {
return;
}
- var msg = _("Box '%s' installed and ready to use").printf (machine.name);
+ var msg = _("Box “%s” installed and ready to use").printf (machine.name);
var notification = new GLib.Notification (msg);
notification.add_button ("Launch", "app.launch-box::" + machine.name);
@@ -528,7 +528,7 @@ private class Boxes.App: Gtk.Application {
var msg = message;
if (msg == null)
- msg = (num_items == 1) ? _("Box '%s' has been deleted").printf (items.data.name) :
+ msg = (num_items == 1) ? _("Box “%s” has been deleted").printf (items.data.name) :
ngettext ("%u box has been deleted",
"%u boxes have been deleted",
num_items).printf (num_items);
diff --git a/src/display-page.vala b/src/display-page.vala
index 38a45a9..cfbb2e8 100644
--- a/src/display-page.vala
+++ b/src/display-page.vala
@@ -252,8 +252,8 @@ private class Boxes.DisplayPage: Gtk.Box {
width = allocation.width;
height = allocation.height;
- // Translators: Showing size of widget as WIDTHxHEIGHT here.
- size_label.label = _("%dx%d").printf (allocation.width, allocation.height);
+ // Translators: Showing size of widget as WIDTH×HEIGHT here.
+ size_label.label = _("%d×%d").printf (allocation.width, allocation.height);
Idle.add (() => {
// Reason to do this in Idle is that Gtk+ doesn't like us showing
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index 1bccd92..8b99121 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -217,9 +217,9 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
empty = false;
} catch (GLib.Error e) {
var path_basename = get_utf8_basename (path);
- // Translators: First '%s' is filename of ISO or CD/DVD device that user selected and
- // Second '%s' is name of the box.
- var msg = _("Insertion of '%s' as a CD/DVD into '%s' failed");
+ // Translators: First “%s” is filename of ISO or CD/DVD device that user selected and
+ // Second “%s” is name of the box.
+ var msg = _("Insertion of “%s” as a CD/DVD into “%s” failed");
machine.got_error (msg.printf (path_basename, machine.name));
debug ("Error inserting '%s' as CD into '%s': %s", path_basename, machine.name,
e.message);
}
@@ -232,8 +232,8 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
button_label.set_text_with_mnemonic (_("_Select"));
label.set_markup (Markup.printf_escaped ("<i>%s</i>", _("empty")));
} catch (GLib.Error e) {
- // Translators: '%s' here is name of the box.
- machine.got_error (_("Removal of CD/DVD from '%s' failed").printf (machine.name));
+ // Translators: “%s” here is name of the box.
+ machine.got_error (_("Removal of CD/DVD from “%s” failed").printf (machine.name));
debug ("Error ejecting CD from '%s': %s", machine.name, e.message);
}
}
@@ -619,11 +619,11 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
label.mnemonic_widget = toggle;
var name = machine.name;
- box.tooltip_text = toggle.active? _("'%s' will not be paused automatically.").printf (name) :
- _("'%s' will be paused automatically to save resources.").printf
(name);
+ box.tooltip_text = toggle.active? _("“%s” will not be paused automatically.").printf (name) :
+ _("“%s” will be paused automatically to save resources.").printf
(name);
toggle.notify["active"].connect ((tooltip) => {
- box.tooltip_text = toggle.active? _("'%s' will not be paused automatically.").printf (name) :
- _("'%s' will be paused automatically to save
resources.").printf (name);
+ box.tooltip_text = toggle.active? _("“%s” will not be paused automatically.").printf (name) :
+ _("“%s” will be paused automatically to save
resources.").printf (name);
});
add_property (ref list, null, box, null);
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index 28e708d..9fd8b05 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -668,7 +668,7 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
force_shutdown ();
};
- var message = _("Restart of '%s' is taking too long. Force it to shutdown?").printf (name);
+ var message = _("Restart of “%s” is taking too long. Force it to shutdown?").printf (name);
notification = window.notificationbar.display_for_action (message,
_("_Shutdown"),
(owned) really_force_shutdown,
diff --git a/src/libvirt-system-importer.vala b/src/libvirt-system-importer.vala
index 268ebe7..e4eeb7d 100644
--- a/src/libvirt-system-importer.vala
+++ b/src/libvirt-system-importer.vala
@@ -18,7 +18,7 @@ private class Boxes.LibvirtSystemImporter: GLib.Object {
var num_domains = domains.length ();
if (num_domains == 1)
- return _("_Import '%s' from system broker").printf (domains.data.get_name ());
+ return _("_Import “%s” from system broker").printf (domains.data.get_name ());
else
// Translators: %u here is the number of boxes available for import
return ngettext ("_Import %u box from system broker",
@@ -32,7 +32,7 @@ private class Boxes.LibvirtSystemImporter: GLib.Object {
var num_domains = domains.length ();
if (num_domains == 1)
- return _("Will import '%s' from system broker").printf (domains.data.get_name ());
+ return _("Will import “%s” from system broker").printf (domains.data.get_name ());
else
// Translators: %u here is the number of boxes available for import
return ngettext ("Will import %u box from system broker",
@@ -126,7 +126,7 @@ private class Boxes.LibvirtSystemImporter: GLib.Object {
if (disk_path == null)
throw new LibvirtSystemImporterError.NO_SUITABLE_DISK
- (_("Failed to find suitable disk to import for box '%s'"), config.name);
+ (_("Failed to find suitable disk to import for box “%s”"), config.name);
return disk_path;
}
diff --git a/src/machine.vala b/src/machine.vala
index d27523a..410b3bf 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -215,7 +215,7 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
window.set_state (Boxes.UIState.COLLECTION);
if (failed)
- window.notificationbar.display_error (_("Connection to '%s' failed").printf (name));
+ window.notificationbar.display_error (_("Connection to “%s” failed").printf (name));
}
load_screenshot ();
@@ -600,7 +600,7 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
try {
yield connect_display (flags);
} catch (Boxes.Error.RESTORE_FAILED e) {
- var message = _("'%s' could not be restored from disk\nTry without saved state?").printf (name);
+ var message = _("“%s” could not be restored from disk\nTry without saved state?").printf (name);
var notification = window.notificationbar.display_for_action (message, _("Restart"), () => {
try_connect_display.begin (flags | Machine.ConnectFlags.IGNORE_SAVED_STATE);
});
@@ -610,11 +610,11 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
} catch (Boxes.Error.START_FAILED e) {
warning ("Failed to start %s: %s", name, e.message);
window.set_state (UIState.COLLECTION);
- window.notificationbar.display_error (_("Failed to start '%s'").printf (name));
+ window.notificationbar.display_error (_("Failed to start “%s”").printf (name));
} catch (GLib.Error e) {
warning ("Failed to connect to %s: %s", name, e.message);
window.set_state (UIState.COLLECTION);
- window.notificationbar.display_error (_("Connection to '%s' failed").printf (name));
+ window.notificationbar.display_error (_("Connection to “%s” failed").printf (name));
}
}
@@ -643,7 +643,7 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
};
// Translators: %s => name of launched box
- var auth_string = _("'%s' requires authentication").printf (name);
+ var auth_string = _("“%s” requires authentication").printf (name);
auth_notification = window.notificationbar.display_for_auth (auth_string,
(owned) auth_func,
(owned) dismiss_func,
diff --git a/src/properties.vala b/src/properties.vala
index 0982884..e636a37 100644
--- a/src/properties.vala
+++ b/src/properties.vala
@@ -80,7 +80,7 @@ private class Boxes.Properties: Gtk.Notebook, Boxes.UI {
var machine = window.current_item as Machine;
if (reboot_required && (machine.is_on || machine.state == Machine.MachineState.SAVED)) {
- var message = _("Changes require restart of '%s'.").printf (machine.name);
+ var message = _("Changes require restart of “%s”.").printf (machine.name);
window.notificationbar.display_for_action (message, _("_Restart"), () => {
machine.restart ();
});
diff --git a/src/selectionbar.vala b/src/selectionbar.vala
index 845abce..963ab34 100644
--- a/src/selectionbar.vala
+++ b/src/selectionbar.vala
@@ -57,7 +57,7 @@ private class Boxes.Selectionbar: Gtk.Revealer {
try {
machine.save.end (result);
} catch (GLib.Error e) {
- window.notificationbar.display_error (_("Pausing '%s' failed").printf (machine.name));
+ window.notificationbar.display_error (_("Pausing “%s” failed").printf (machine.name));
}
});
}
diff --git a/src/snapshot-list-row.vala b/src/snapshot-list-row.vala
index 02cad0c..1e16725 100644
--- a/src/snapshot-list-row.vala
+++ b/src/snapshot-list-row.vala
@@ -169,7 +169,7 @@ private class Boxes.SnapshotListRow : Gtk.ListBoxRow {
snapshot.get_name (),
e.message);
}
- var message = _("Snapshot \"%s\" deleted.").printf (snapshot_identifier);
+ var message = _("Snapshot “%s” deleted.").printf (snapshot_identifier);
parent_container = (Gtk.Container) this.get_parent ();
var row = this;
parent_container.remove (this);
diff --git a/src/spice-display.vala b/src/spice-display.vala
index 0e52e7e..1cb9fb3 100644
--- a/src/spice-display.vala
+++ b/src/spice-display.vala
@@ -58,7 +58,7 @@ private class Boxes.SpiceDisplay: Boxes.Display {
manager.device_error.connect ( (dev, err) => {
var device_description = dev.get_description ("%1$s %2$s");
var box_name = get_box_name ();
- got_error (_("Redirection of USB device '%s' for '%s' failed").printf (device_description,
box_name));
+ got_error (_("Redirection of USB device “%s” for “%s” failed").printf (device_description,
box_name));
debug ("Error connecting %s to %s: %s", device_description, box_name, err.message);
});
} catch (GLib.Error error) {
@@ -382,7 +382,7 @@ private class Boxes.SpiceDisplay: Boxes.Display {
dev_toggle.active = false;
var device_desc = dev.get_description ("%1$s %2$s");
var box_name = get_box_name ();
- var msg = _("Redirection of USB device '%s' for '%s' failed");
+ var msg = _("Redirection of USB device “%s” for “%s” failed");
got_error (msg.printf (device_desc, box_name));
debug ("Error connecting %s to %s: %s",
device_desc,
diff --git a/src/util-app.vala b/src/util-app.vala
index 8445503..dd66ff4 100644
--- a/src/util-app.vala
+++ b/src/util-app.vala
@@ -325,20 +325,20 @@ namespace Boxes {
pool_path = extract_xpath (standard_output, "string(/pool[@type='dir']/target/path)");
} catch (GLib.Error error) {
debug (error.message);
- diagnosis = _("Could not get 'gnome-boxes' storage pool information from libvirt. Make sure
'virsh -c qemu:///session pool-dumpxml gnome-boxes' is working.");
+ diagnosis = _("Could not get “gnome-boxes” storage pool information from libvirt. Make sure
“virsh -c qemu:///session pool-dumpxml gnome-boxes” is working.");
return false;
}
if (!FileUtils.test (pool_path, FileTest.EXISTS)) {
- diagnosis = _("%s is known to libvirt as GNOME Boxes's storage pool but this directory does not
exist").printf (pool_path);
+ diagnosis = _("%s is known to libvirt as GNOME Boxes’s storage pool but this directory does not
exist").printf (pool_path);
return false;
}
if (!FileUtils.test (pool_path, FileTest.IS_DIR)) {
- diagnosis = _("%s is known to libvirt as GNOME Boxes's storage pool but is not a
directory").printf (pool_path);
+ diagnosis = _("%s is known to libvirt as GNOME Boxes’s storage pool but is not a
directory").printf (pool_path);
return false;
}
if (Posix.access (pool_path, Posix.R_OK | Posix.W_OK | Posix.X_OK) != 0) {
- diagnosis = _("%s is known to libvirt as GNOME Boxes's storage pool but is not
user-readable/writable").printf (pool_path);
+ diagnosis = _("%s is known to libvirt as GNOME Boxes’s storage pool but is not
user-readable/writable").printf (pool_path);
return false;
}
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index 7f1ffe8..20d69ef 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -172,7 +172,7 @@ private class Boxes.VMCreator {
set_post_install_config (machine);
};
- var msg = _("Live box '%s' has been deleted automatically.").printf (machine.name);
+ var msg = _("Live box “%s” has been deleted automatically.").printf (machine.name);
App.app.delete_machines_undoable ((owned) items, msg, (owned) undo_notify_callback);
} else
try {
diff --git a/src/vm-importer.vala b/src/vm-importer.vala
index 8d063a5..b51d3a5 100644
--- a/src/vm-importer.vala
+++ b/src/vm-importer.vala
@@ -47,7 +47,7 @@ private class Boxes.VMImporter : Boxes.VMCreator {
machine.name,
source_media.device_file,
error.message);
- var ui_message = _("Box import from file '%s' failed.").printf (source_media.device_file);
+ var ui_message = _("Box import from file “%s” failed.").printf (source_media.device_file);
App.app.main_window.notificationbar.display_error (ui_message);
machine.delete ();
diff --git a/src/wizard.vala b/src/wizard.vala
index 3fabf79..020a760 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -332,7 +332,7 @@ private class Boxes.Wizard: Gtk.Stack, Boxes.UI {
} else if (App.app.has_broker_for_source_type (uri.scheme)) {
source.source_type = uri.scheme;
} else
- throw new Boxes.Error.INVALID (_("Unsupported protocol '%s'").printf (uri.scheme));
+ throw new Boxes.Error.INVALID (_("Unsupported protocol “%s”").printf (uri.scheme));
}
private void prepare_for_installer (string path, ActivityProgress progress) throws GLib.Error {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]