[gnome-builder/wip/loganek/libidemm] libidemm: use snprintf (to ease translators life)
- From: Marcin Kolny <mkolny src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/loganek/libidemm] libidemm: use snprintf (to ease translators life)
- Date: Wed, 6 Apr 2016 21:20:47 +0000 (UTC)
commit 1fe20a7ba1c8e0a791c9dacea8ecf07bcc5ca1a4
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]