diff options
Diffstat (limited to 'src/extension/prefdialog/parameter-optiongroup.cpp')
| -rw-r--r-- | src/extension/prefdialog/parameter-optiongroup.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/extension/prefdialog/parameter-optiongroup.cpp b/src/extension/prefdialog/parameter-optiongroup.cpp index e3f655dde..232c35315 100644 --- a/src/extension/prefdialog/parameter-optiongroup.cpp +++ b/src/extension/prefdialog/parameter-optiongroup.cpp @@ -302,8 +302,17 @@ ParamOptionGroup::ParamOptionGroupOption::ParamOptionGroupOption(Inkscape::XML:: if (value) { _value = value; } else { - g_warning("Missing value for option '%s' of parameter '%s' in extension '%s'.", - _text.c_str(), parent->_name, _extension->get_id()); + if (text) { + const char *name = xml->name(); + if (!strcmp(name, INKSCAPE_EXTENSION_NS "item") || !strcmp(name, INKSCAPE_EXTENSION_NS "_item")) { + _value = text; // use untranslated UI text as value (for backwards-compatibility) + } else { + _value = _text; // use translated UI text as value + } + } else { + g_warning("Missing value for option '%s' of parameter '%s' in extension '%s'.", + _text.c_str(), parent->_name, _extension->get_id()); + } } } |
