diff options
| author | kamalpreetgrewal <grewalkamal005@gmail.com> | 2016-06-06 16:23:12 +0000 |
|---|---|---|
| committer | kamalpreetgrewal <grewalkamal005@gmail.com> | 2016-06-06 16:23:12 +0000 |
| commit | 782b586b9fd93b05e3dbc960ccd006014d32c5ac (patch) | |
| tree | ac7a0304cd3224731235fd2b688f12d04f1501e6 /src/extension/param/parameter.cpp | |
| parent | Register style dialog with support to add selector (diff) | |
| parent | [Bug #1588983] Finish up German tutorials for 0.92. (diff) | |
| download | inkscape-782b586b9fd93b05e3dbc960ccd006014d32c5ac.tar.gz inkscape-782b586b9fd93b05e3dbc960ccd006014d32c5ac.zip | |
Merging changes from trunk
(bzr r14949.1.2)
Diffstat (limited to 'src/extension/param/parameter.cpp')
| -rw-r--r-- | src/extension/param/parameter.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/extension/param/parameter.cpp b/src/extension/param/parameter.cpp index 10029893f..27d9bdf9b 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> @@ -56,6 +57,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) { |
