diff options
Diffstat (limited to 'src/extension/param/radiobutton.cpp')
| -rw-r--r-- | src/extension/param/radiobutton.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/extension/param/radiobutton.cpp b/src/extension/param/radiobutton.cpp index c17839001..23655baea 100644 --- a/src/extension/param/radiobutton.cpp +++ b/src/extension/param/radiobutton.cpp @@ -84,12 +84,22 @@ ParamRadioButton::ParamRadioButton (const gchar * name, 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, INKSCAPE_EXTENSION_NS "_option") ? _(contents) : contents ); - else + if (contents != NULL) { + // don't translate when 'item' but do translate when '_option' + if (!strcmp(chname, INKSCAPE_EXTENSION_NS "_option")) { + if (child_repr->attribute("msgctxt") != NULL) { + newguitext = new Glib::ustring(g_dpgettext2(NULL, child_repr->attribute("msgctxt"), contents)); + } else { + newguitext = new Glib::ustring(_(contents)); + } + } else { + newguitext = new Glib::ustring(contents); + } + } else continue; + + const char * val = child_repr->attribute("value"); if (val != NULL) newvalue = new Glib::ustring(val); |
