diff options
| author | Michael Soegtrop <MSoegtrop@yahoo.de> | 2016-06-12 10:52:33 +0000 |
|---|---|---|
| committer | Michael Soegtrop <MSoegtrop@yahoo.de> | 2016-06-12 10:52:33 +0000 |
| commit | 013ba80c5b0115dbb0f6da01e1f42806a4037eb8 (patch) | |
| tree | fe8d764a8e808c2084df8ace149d472109f3ae25 /src/extension/param/parameter.cpp | |
| parent | Fixed Bool LPE review issues (diff) | |
| parent | Optionally sort attributes and properties into a canonical order. (diff) | |
| download | inkscape-013ba80c5b0115dbb0f6da01e1f42806a4037eb8.tar.gz inkscape-013ba80c5b0115dbb0f6da01e1f42806a4037eb8.zip | |
updated to latest trunk
(bzr r14876.2.3)
Diffstat (limited to 'src/extension/param/parameter.cpp')
| -rw-r--r-- | src/extension/param/parameter.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/extension/param/parameter.cpp b/src/extension/param/parameter.cpp index 10029893f..e4a614667 100644 --- a/src/extension/param/parameter.cpp +++ b/src/extension/param/parameter.cpp @@ -40,6 +40,8 @@ #include "radiobutton.h" #include "string.h" +#include <glibmm/i18n.h> + namespace Inkscape { namespace Extension { @@ -56,6 +58,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) { |
