[gnome-boxes] Remove markup from translatable strings



commit d9171b8cb9e825e4c36a4e10ba593653b35ee7a7
Author: Srestha Srivastava <sresthasrivastava ss gmail com>
Date:   Wed Mar 20 12:23:10 2019 +0000

    Remove markup from translatable strings

 src/i-properties-provider.vala      | 6 ++++--
 src/libvirt-machine-properties.vala | 4 +++-
 src/spice-display.vala              | 4 +++-
 3 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/i-properties-provider.vala b/src/i-properties-provider.vala
index 65eab35d..2f134e6a 100644
--- a/src/i-properties-provider.vala
+++ b/src/i-properties-provider.vala
@@ -85,8 +85,10 @@ private static void set_size_value_label_msg (Gtk.Label       label,
         } else {
             var allocation_str = format_size (allocation, format_flags);
 
-            // Translators: This is memory or disk size. E.g. "2 GB (1 GB used)".
-            label.set_markup (_("%s <span color=\"grey\">(%s used)</span>").printf (capacity, 
allocation_str));
+            // Translators: This is memory or disk size. E.g. "1 GB used".
+            var label_text = _("%s used").printf (allocation_str);
+            var markup = ("%s <span color=\"grey\">(%s)</span>").printf (capacity, label_text);
+            label.set_markup (markup);
         }
     }
 
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index f5931ed7..a73fb70e 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -456,7 +456,9 @@ private void on_ram_changed (Boxes.Property property, uint64 value) {
                 var label = new Gtk.Label ("");
                 var capacity = format_size (volume_info.capacity, FormatSizeFlags.DEFAULT);
                 var allocation = format_size (volume_info.allocation, FormatSizeFlags.DEFAULT);
-                var markup = _("<span color=\"grey\">Maximum Disk Size</span>\t\t %s <span 
color=\"grey\">(%s used)</span>").printf (capacity, allocation);
+                var label_text = _("Maximum Disk Space");
+                var allocation_text = _("%s used").printf (allocation);
+                var markup = ("<span color=\"grey\">%s</span>\t\t %s <span 
color=\"grey\">(%s)</span>").printf (label_text, capacity, allocation_text);
                 label.set_markup (markup);
                 label.halign = Gtk.Align.START;
 
diff --git a/src/spice-display.vala b/src/spice-display.vala
index 50f9b196..a0f28273 100644
--- a/src/spice-display.vala
+++ b/src/spice-display.vala
@@ -347,8 +347,10 @@ private void on_new_file_transfer (Spice.MainChannel main_channel, Object transf
 
             if (!connected || main_channel.agent_connected)
                 break;
+            var link_address = "<a 
href=\"http://www.spice-space.org/download.html\";>http://www.spice-space.org/download.html</a>";
 
-            var message = _("SPICE guest tools are not installed. These tools improve user experience and 
enable host and box interactions, such as copy&amp;paste. Please visit <a 
href=\"http://www.spice-space.org/download.html\";>http://www.spice-space.org/download.html</a> to download 
and install these tools from within the box.");
+            // Translators: %s => a link to the website where users can download the guest tools.
+            var message = _("SPICE guest tools are not installed. These tools improve user experience and 
enable host and box interactions, such as copy&amp;paste. Please visit %s to download and install these tools 
from within the box.").printf (link_address);
             var label = new Gtk.Label (message);
             label.vexpand = true;
             label.valign = Gtk.Align.END;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]