From ea05ba3338bec1517826614f27935a36c3b0f0f8 Mon Sep 17 00:00:00 2001 From: Patrick Storz Date: Sun, 4 Aug 2019 01:34:27 +0200 Subject: Implement "translationdomain" attribute for extensions Will allow extensions to ship their own message catalog used for translation of the extension#s strings. Needs to be set on the root element of the .inx Currently supported values: - unset: use default textdomain (which happens to be 'inkscape') - 'inkscape': use Inkscape's message catalog - 'none': disable translation for the extension's strings --- src/extension/prefdialog/parameter.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/extension/prefdialog/parameter.cpp') diff --git a/src/extension/prefdialog/parameter.cpp b/src/extension/prefdialog/parameter.cpp index 18d2a40ec..5716a3be8 100644 --- a/src/extension/prefdialog/parameter.cpp +++ b/src/extension/prefdialog/parameter.cpp @@ -325,13 +325,7 @@ Parameter *Parameter::get_param(const gchar */*name*/) const char *Parameter::get_translation(const char* msgid) { - // TODO: translation domain - - if (_context) { - return g_dpgettext2(nullptr, _context, msgid); - } else { - return _(msgid); - } + return _extension->get_translation(msgid, _context); } Glib::ustring const extension_pref_root = "/extensions/"; -- cgit v1.2.3