From 70fe3688b3b751233e19504cb83772cb73cd2e60 Mon Sep 17 00:00:00 2001 From: Kaalleen Date: Wed, 24 Sep 2025 09:03:08 +0000 Subject: [PATCH 1/2] Make menu-tip translatable --- src/extension/effect.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/extension/effect.cpp b/src/extension/effect.cpp index 2b59434269..53e671804d 100644 --- a/src/extension/effect.cpp +++ b/src/extension/effect.cpp @@ -95,8 +95,12 @@ Effect::Effect(Inkscape::XML::Node *in_repr, ImplementationHolder implementation } if (!strcmp(effect_child->name(), INKSCAPE_EXTENSION_NS "menu-tip") || !strcmp(effect_child->name(), INKSCAPE_EXTENSION_NS "_menu-tip")) { - _menu_tip = effect_child->firstChild()->content(); - } + gchar const *menu_tip = effect_child->firstChild()->content(); + if (_translation_enabled) { + _menu_tip = get_translation(menu_tip); + } else { + _menu_tip = _(menu_tip); + } } if (streq(effect_child->name(), INKSCAPE_EXTENSION_NS "icon")) { _icon_path = effect_child->firstChild()->content(); } -- GitLab From 1a2dc9103f6d53bf6f15ae796792708cc0dc10cd Mon Sep 17 00:00:00 2001 From: Kaalleen Date: Wed, 24 Sep 2025 17:45:24 +0000 Subject: [PATCH 2/2] get_translation already checks for translation_enabled --- src/extension/effect.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/extension/effect.cpp b/src/extension/effect.cpp index 53e671804d..19f60091ac 100644 --- a/src/extension/effect.cpp +++ b/src/extension/effect.cpp @@ -95,12 +95,8 @@ Effect::Effect(Inkscape::XML::Node *in_repr, ImplementationHolder implementation } if (!strcmp(effect_child->name(), INKSCAPE_EXTENSION_NS "menu-tip") || !strcmp(effect_child->name(), INKSCAPE_EXTENSION_NS "_menu-tip")) { - gchar const *menu_tip = effect_child->firstChild()->content(); - if (_translation_enabled) { - _menu_tip = get_translation(menu_tip); - } else { - _menu_tip = _(menu_tip); - } } + _menu_tip = get_translation(effect_child->firstChild()->content()); + } if (streq(effect_child->name(), INKSCAPE_EXTENSION_NS "icon")) { _icon_path = effect_child->firstChild()->content(); } -- GitLab