From 884353ed3daae17978691632eb71ca9263ab7954 Mon Sep 17 00:00:00 2001 From: Jehan Date: Wed, 9 Apr 2025 00:07:22 +0200 Subject: [PATCH] plug-ins: fix relocatability of the Python Console. If we were running Gimp.locale_directory() at the very start of the script, it would append before _gimp_reloc_init_lib() had happened, and therefore the returned value would be the non-relocated locale directory. Calling this inside set_i18n() happens later, and also feels like the proper place for this code. --- plug-ins/python/python-console/python-console.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plug-ins/python/python-console/python-console.py b/plug-ins/python/python-console/python-console.py index c9ba63f210..5b3e9b2cfa 100755 --- a/plug-ins/python/python-console/python-console.py +++ b/plug-ins/python/python-console/python-console.py @@ -34,7 +34,6 @@ import pyconsole import gettext textdomain = "gimp30-python" -gettext.bindtextdomain(textdomain, Gimp.locale_directory()) gettext.textdomain(textdomain) _ = gettext.gettext @@ -303,6 +302,7 @@ def run(procedure, config, data): class PythonConsole (Gimp.PlugIn): ## GimpPlugIn virtual methods ## def do_set_i18n(self, name): + gettext.bindtextdomain(textdomain, Gimp.locale_directory()) return True, 'gimp30-python', None def do_query_procedures(self):