mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 09:53:25 +00:00
plug-ins, libgimp: override set_i18n() for all our core plug-ins.
Hence avoiding the stderr messages. These are going to be localized with centrally installed catalogs "gimp*-std-plugins", "gimp*-script-fu" and "gimp*-python". We now handle core plug-in localizations differently and in particular, with kind of a reverse logic: - We don't consider "gimp*-std-plugins" to be the default catalog anymore. It made sense in the old world where we would consider the core plug-ins to be the most important and numerous ones. But we want to push a world where people are even more encouraged to develop their own plug-ins. These won't use the standard catalog anymore (because there are nearly no reasons that the strings are the same, it's only a confusing logic). So let's explicitly set the standard catalogs with DEFINE_STD_SET_I18N macro (which maps to a different catalog for script-fu plug-ins). - Doing something similar for Python plug-ins which have again their own catalog. - Getting rid of the INIT_I18N macro since now all the locale domain binding is done automatically by libgimp when using the set_i18n() method infrastructure.
This commit is contained in:
parent
4b9d8a56cb
commit
18c37f7084
124 changed files with 300 additions and 243 deletions
|
@ -25,11 +25,9 @@ from gi.repository import Gio
|
|||
import time
|
||||
import sys
|
||||
|
||||
import gettext
|
||||
textdomain = "gimp30-python"
|
||||
gettext.bindtextdomain(textdomain, Gimp.locale_directory())
|
||||
gettext.textdomain(textdomain)
|
||||
_ = gettext.gettext
|
||||
def N_(message): return message
|
||||
def _(message): return GLib.dgettext(None, message)
|
||||
|
||||
|
||||
def foggify(procedure, run_mode, image, n_drawables, drawables, args, data):
|
||||
config = procedure.create_config()
|
||||
|
@ -127,6 +125,9 @@ class Foggify (Gimp.PlugIn):
|
|||
blurb=_("Fog color"))
|
||||
|
||||
## GimpPlugIn virtual methods ##
|
||||
def do_set_i18n(self, procname):
|
||||
return True, 'gimp30-python', None
|
||||
|
||||
def do_query_procedures(self):
|
||||
return [ 'python-fu-foggify' ]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue