From 20b84ef33e4ddb8780fb5253b6f6e77691af6377 Mon Sep 17 00:00:00 2001 From: mfloryan Date: Thu, 5 Feb 2009 10:00:57 +0000 Subject: [PATCH] Fixed small translation issue for extensions. --- src/extension/param/enum.cpp | 10 +++++----- src/extension/param/radiobutton.cpp | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/extension/param/enum.cpp b/src/extension/param/enum.cpp index 9d324a47c..89f54dada 100644 --- a/src/extension/param/enum.cpp +++ b/src/extension/param/enum.cpp @@ -64,15 +64,15 @@ ParamComboBox::ParamComboBox (const gchar * name, const gchar * guitext, const g Inkscape::XML::Node *child_repr = sp_repr_children(xml); while (child_repr != NULL) { char const * chname = child_repr->name(); - if (!strcmp(chname, "extension:item") || !strcmp(chname, "extension:_item")) { + if (!strcmp(chname, INKSCAPE_EXTENSION_NS "item") || !strcmp(chname, INKSCAPE_EXTENSION_NS "_item")) { Glib::ustring * newguitext = NULL; Glib::ustring * newvalue = NULL; const char * contents = sp_repr_children(child_repr)->content(); if (contents != NULL) // don't translate when 'item' but do translate when '_item' - // NOTE: internal extensions use build_from_mem and don't need _item but - // still need to include if are to be localized - newguitext = new Glib::ustring( !strcmp(chname, "extension:_item") ? _(contents) : contents ); + // NOTE: internal extensions use build_from_mem and don't need _item but + // still need to include if are to be localized + newguitext = new Glib::ustring( !strcmp(chname, INKSCAPE_EXTENSION_NS "_item") ? _(contents): contents ); else continue; @@ -161,7 +161,7 @@ ParamComboBox::set (const gchar * in, SPDocument * /*doc*/, Inkscape::XML::Node void ParamComboBox::changed (void) { - + } diff --git a/src/extension/param/radiobutton.cpp b/src/extension/param/radiobutton.cpp index 1e4ba3c8f..c17839001 100644 --- a/src/extension/param/radiobutton.cpp +++ b/src/extension/param/radiobutton.cpp @@ -83,9 +83,10 @@ ParamRadioButton::ParamRadioButton (const gchar * name, Glib::ustring * newguitext = NULL; Glib::ustring * newvalue = NULL; const char * contents = sp_repr_children(child_repr)->content(); + if (contents != NULL) // don't translate when 'option' but do translate when '_option' - newguitext = new Glib::ustring( !strcmp(chname, "_option") ? _(contents) : contents ); + newguitext = new Glib::ustring( !strcmp(chname, INKSCAPE_EXTENSION_NS "_option") ? _(contents) : contents ); else continue; -- 2.30.2