]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- improved translation message for plural form 190/head
authorArvin Schnell <aschnell@suse.de>
Thu, 27 Aug 2015 09:26:00 +0000 (11:26 +0200)
committerArvin Schnell <aschnell@suse.de>
Thu, 27 Aug 2015 09:26:00 +0000 (11:26 +0200)
client/commands.cc

index 02df9ad6ba64eee001a5e2c6c3d1050176f0a7ec..908e44f006e890c2db2f9ef3dc443764b43864e5 100644 (file)
  */
 
 
+#include <iostream>
+
 #include "commands.h"
 #include "utils/text.h"
-#include "misc.h"
+#include "snapper/AppUtil.h"
+
+using namespace std;
 
 
 #define SERVICE "org.opensuse.Snapper"
@@ -265,14 +269,13 @@ void
 command_delete_xsnapshots(DBus::Connection& conn, const string& config_name,
                          const list<unsigned int>& nums, bool verbose)
 {
-    DBus::MessageMethodCall call(SERVICE, OBJECT, INTERFACE, "DeleteSnapshots");
-
-    DBus::Hoho hoho(call);
-    hoho << config_name << nums;
+    if (verbose)
+    {
+       cout << sformat(_("Deleting snapshot from %s:", "Deleting snapshots from %s:", nums.size()),
+                       config_name.c_str()) << endl;
 
-    if (verbose) {
-       cout << _("Deleting snapshots from ") << config_name << ": ";
-       for (list<unsigned int>::const_iterator it = nums.begin(); it != nums.end(); ++it) {
+       for (list<unsigned int>::const_iterator it = nums.begin(); it != nums.end(); ++it)
+       {
            if (it != nums.begin())
                cout << ", ";
            cout << *it;
@@ -280,6 +283,11 @@ command_delete_xsnapshots(DBus::Connection& conn, const string& config_name,
        cout << endl;
     }
 
+    DBus::MessageMethodCall call(SERVICE, OBJECT, INTERFACE, "DeleteSnapshots");
+
+    DBus::Hoho hoho(call);
+    hoho << config_name << nums;
+
     conn.send_with_reply_and_block(call);
 }