summaryrefslogtreecommitdiffstats
path: root/src/extension/param/parameter.cpp
diff options
context:
space:
mode:
authorEduard Braun <eduard.braun2@gmx.de>2017-04-24 18:59:06 +0000
committerEduard Braun <eduard.braun2@gmx.de>2017-04-24 18:59:06 +0000
commitbab6dfe02bd9556c931973a272e154251764e88e (patch)
tree4e63e6d40ee6c6757bcdd5754d0cc97af0ae15a4 /src/extension/param/parameter.cpp
parentFix crash when modifying text in "Text and Font" dialog (diff)
downloadinkscape-bab6dfe02bd9556c931973a272e154251764e88e.tar.gz
inkscape-bab6dfe02bd9556c931973a272e154251764e88e.zip
Restore r14955 which was reverted in r15047 due to messed up merge
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/14955 http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/15047 Fixed bugs: - https://launchpad.net/bugs/1669951 (bzr r15633)
Diffstat (limited to 'src/extension/param/parameter.cpp')
-rw-r--r--src/extension/param/parameter.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/extension/param/parameter.cpp b/src/extension/param/parameter.cpp
index 0eb491078..2c72c61df 100644
--- a/src/extension/param/parameter.cpp
+++ b/src/extension/param/parameter.cpp
@@ -20,6 +20,7 @@
#endif
#include <cstring>
+#include <glibmm/i18n.h>
#include "ui/widget/color-notebook.h"
#include <xml/node.h>
@@ -65,6 +66,16 @@ Parameter *Parameter::make(Inkscape::XML::Node *in_repr, Inkscape::Extension::Ex
const char *guitext = in_repr->attribute("gui-text");
if (guitext == NULL) {
guitext = in_repr->attribute("_gui-text");
+ if (guitext == NULL) {
+ // guitext = ""; // propably better to require devs to explicitly set an empty gui-text if this is what they want
+ } else {
+ const char *context = in_repr->attribute("msgctxt");
+ if (context != NULL) {
+ guitext = g_dpgettext2(NULL, context, guitext);
+ } else {
+ guitext = _(guitext);
+ }
+ }
}
const char *gui_tip = in_repr->attribute("gui-tip");
if (gui_tip == NULL) {