summaryrefslogtreecommitdiffstats
path: root/src/extension/param/radiobutton.cpp
diff options
context:
space:
mode:
authorNicolas Dufour <nicoduf@yahoo.fr>2010-10-09 07:14:28 +0000
committerJazzyNico <nicoduf@yahoo.fr>2010-10-09 07:14:28 +0000
commitbc24a38c135c2db93e5c2776fc4d77c5bc67fea2 (patch)
tree57938d568458e123c51a9acb5b7f7d86f6d1e377 /src/extension/param/radiobutton.cpp
parentExtensions. Temporarily removing a string from translatable content to preven... (diff)
downloadinkscape-bc24a38c135c2db93e5c2776fc4d77c5bc67fea2.tar.gz
inkscape-bc24a38c135c2db93e5c2776fc4d77c5bc67fea2.zip
Extensions, i18n. Adding context to description, groupheader and radiobutton extension parameters.
(bzr r9821)
Diffstat (limited to 'src/extension/param/radiobutton.cpp')
-rw-r--r--src/extension/param/radiobutton.cpp18
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);