diff options
| author | Eduard Braun <eduard.braun2@gmx.de> | 2017-04-24 19:43:24 +0000 |
|---|---|---|
| committer | Eduard Braun <eduard.braun2@gmx.de> | 2017-04-24 19:43:24 +0000 |
| commit | bcd53f13e2f8547266a915dac0fc4c0012bfcf87 (patch) | |
| tree | a340f97f45db5c41b72aca56a16187f6ed87a654 /src/extension/param/parameter.cpp | |
| parent | Extensions: Some refactoring for code clarity and consistency (diff) | |
| download | inkscape-bcd53f13e2f8547266a915dac0fc4c0012bfcf87.tar.gz inkscape-bcd53f13e2f8547266a915dac0fc4c0012bfcf87.zip | |
Extensions: Fixes and improvements for "gui-description" parameter attribute along the lines of r14955
- "gui-description" was always translated (as opposed to only "_gui-description")
- Added possibility to specify "msgctxt" for "_gui-description"
(bzr r15635)
Diffstat (limited to 'src/extension/param/parameter.cpp')
| -rw-r--r-- | src/extension/param/parameter.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/extension/param/parameter.cpp b/src/extension/param/parameter.cpp index eeffbecf2..e2093158d 100644 --- a/src/extension/param/parameter.cpp +++ b/src/extension/param/parameter.cpp @@ -80,6 +80,14 @@ Parameter *Parameter::make(Inkscape::XML::Node *in_repr, Inkscape::Extension::Ex const char *description = in_repr->attribute("gui-description"); if (description == NULL) { description = in_repr->attribute("_gui-description"); + if (description != NULL) { + const char *context = in_repr->attribute("msgctxt"); + if (context != NULL) { + description = g_dpgettext2(NULL, context, description); + } else { + description = _(description); + } + } } bool hidden = false; { |
