mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00

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.
45 lines
1.6 KiB
C
45 lines
1.6 KiB
C
/* LIBGIMP - The GIMP Library
|
|
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
|
*
|
|
* stdplugins-intl.h
|
|
*
|
|
* This library is free software: you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 3 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library. If not, see
|
|
* <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef __STDPLUGINS_INTL_H__
|
|
#define __STDPLUGINS_INTL_H__
|
|
|
|
#ifndef GETTEXT_PACKAGE
|
|
#error "config.h must be included prior to stdplugins-intl.h"
|
|
#endif
|
|
|
|
#include <glib/gi18n.h>
|
|
|
|
|
|
#define DEFINE_STD_SET_I18N \
|
|
static gboolean \
|
|
set_i18n (GimpPlugIn *plug_in, \
|
|
const gchar *procedure_name, \
|
|
gchar **gettext_domain, \
|
|
gchar **catalog_dir) \
|
|
{ \
|
|
*gettext_domain = g_strdup (GETTEXT_PACKAGE"-std-plug-ins"); \
|
|
return TRUE; \
|
|
};
|
|
|
|
#define STD_SET_I18N set_i18n
|
|
|
|
|
|
#endif /* __STDPLUGINS_INTL_H__ */
|