[gnome-builder] libidemm: use snprintf (to ease translators life)



commit 075b0c7bfe22885ad80e993432bf3d0d8a03ae33
Author: Marcin Kolny <marcin kolny gmail com>
Date:   Wed Apr 6 23:20:23 2016 +0200

    libidemm: use snprintf (to ease translators life)

 plugins/hello-cpp/hellocppapplicationaddin.cc |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plugins/hello-cpp/hellocppapplicationaddin.cc b/plugins/hello-cpp/hellocppapplicationaddin.cc
index 720c847..84746fe 100644
--- a/plugins/hello-cpp/hellocppapplicationaddin.cc
+++ b/plugins/hello-cpp/hellocppapplicationaddin.cc
@@ -45,8 +45,9 @@ HelloCppApplicationAddin::HelloCppApplicationAddin(GObject *gobj)
   application->signal_shutdown().connect([this] {
       auto stop = steady_clock::now();
       auto elapsed_seconds = duration_cast<seconds>(stop - start).count();
-      std::string message = _("Wow! You've spent with Builder ") + std::to_string(elapsed_seconds) + _(" 
seconds!");
-      Gtk::MessageDialog(message).run();
+      char message [100];
+      snprintf(message, 100, N_("Wow! You've spent with Builder %d seconds!"), elapsed_seconds);
+      Gtk::MessageDialog(gettext(message)).run();
     });
 
   start = std::chrono::steady_clock::now();


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