From eb3598e7e27619c759ef33bb9ec4ffb8898523de Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Fri, 20 Sep 2013 00:45:16 -0400 Subject: Refactor status-bar text for multiple items, was very broken Fixed bugs: - https://launchpad.net/bugs/1199192 (bzr r12550) --- src/sp-path.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/sp-path.cpp') diff --git a/src/sp-path.cpp b/src/sp-path.cpp index 105506d6e..49e40fd24 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -66,8 +66,13 @@ gint SPPath::nodesInPath() const return _curve ? _curve->nodes_in_path() : 0; } +const char* SPPath::display_name() { + return _("Path"); +} + gchar* SPPath::description() { int count = this->nodesInPath(); + char *lpe_desc = g_strdup(""); if (sp_lpe_item_has_path_effect(this)) { Glib::ustring s; @@ -87,13 +92,12 @@ gchar* SPPath::description() { s = s + ", " + lpeobj->get_lpe()->getName(); } } - - return g_strdup_printf(ngettext("Path (%i node, path effect: %s)", - "Path (%i nodes, path effect: %s)",count), count, s.c_str()); - } else { - return g_strdup_printf(ngettext("Path (%i node)", - "Path (%i nodes)",count), count); + lpe_desc = g_strdup_printf(_(", path effect: %s"), s.c_str()); } + char *ret = g_strdup_printf(ngettext( + _("%i node%s"), _("%i nodes%s"), count), count, lpe_desc); + g_free(lpe_desc); + return ret; } void SPPath::convert_to_guides() { -- cgit v1.2.3