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-star.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/sp-star.cpp') diff --git a/src/sp-star.cpp b/src/sp-star.cpp index 4a3a8cbe3..e5c5c7c25 100644 --- a/src/sp-star.cpp +++ b/src/sp-star.cpp @@ -251,19 +251,18 @@ void SPStar::update_patheffect(bool write) { this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); } +const char* SPStar::display_name() { + if (this->flatsided == false) + return _("Star"); + return _("Polygon"); +} + gchar* SPStar::description() { // while there will never be less than 3 vertices, we still need to // make calls to ngettext because the pluralization may be different // for various numbers >=3. The singular form is used as the index. - if (this->flatsided == false) { - return g_strdup_printf (ngettext("Star with %d vertex", - "Star with %d vertices", - this->sides), this->sides); - } else { - return g_strdup_printf (ngettext("Polygon with %d vertex", - "Polygon with %d vertices", - this->sides), this->sides); - } + return g_strdup_printf (ngettext(_("with %d vertex"), _("with %d vertices"), + this->sides), this->sides); } /** -- cgit v1.2.3