check for bind_textdomain_codeset, use standard HAVE_FOO semantic for

2001-08-30  Sven Neumann  <sven@gimp.org>

	* configure.in: check for bind_textdomain_codeset, use standard
	HAVE_FOO semantic for difftime.

	* libgimp/gimpintl.h
	* libgimp/libgimp-intl.h
	* libgimp/stdplugins-intl.h: set encoding of message translations
	to UTF-8 if bind_textdomain_codeset() is available. We still
	explicitely set LC_NUMERIC to "C" so we can write and parse floats
	in a defined way independent of the locale. We might want to find
	a cleaner solution for this.

	* plug-ins/script-fu/script-fu-server.c: inverted preprocessor logic
	from NO_DIFFTIME to HAVE_DIFFTIME.

	* plug-ins/script-fu/scripts/trochoid.scm:
	fixed parameter description (bug #59760).
This commit is contained in:
Sven Neumann
2001-08-30 00:21:38 +00:00
committed by Sven Neumann
parent 645642e8d3
commit 12f7df64cf
7 changed files with 55 additions and 44 deletions

View File

@ -1,3 +1,22 @@
2001-08-30 Sven Neumann <sven@gimp.org>
* configure.in: check for bind_textdomain_codeset, use standard
HAVE_FOO semantic for difftime.
* libgimp/gimpintl.h
* libgimp/libgimp-intl.h
* libgimp/stdplugins-intl.h: set encoding of message translations
to UTF-8 if bind_textdomain_codeset() is available. We still
explicitely set LC_NUMERIC to "C" so we can write and parse floats
in a defined way independent of the locale. We might want to find
a cleaner solution for this.
* plug-ins/script-fu/script-fu-server.c: inverted preprocessor logic
from NO_DIFFTIME to HAVE_DIFFTIME.
* plug-ins/script-fu/scripts/trochoid.scm:
fixed parameter description (bug #59760).
2001-08-29 Sven Neumann <sven@gimp.org> 2001-08-29 Sven Neumann <sven@gimp.org>
* README.i18n: added a section that mentions the GNOME translation * README.i18n: added a section that mentions the GNOME translation

View File

@ -492,20 +492,14 @@ AC_CHECK_FUNC(random, [
[AC_DEFINE(RAND_FUNC, lrand48) AC_DEFINE(SRAND_FUNC, srand48)], [AC_DEFINE(RAND_FUNC, lrand48) AC_DEFINE(SRAND_FUNC, srand48)],
[AC_DEFINE(RAND_FUNC, rand) AC_DEFINE(SRAND_FUNC, srand)])])]) [AC_DEFINE(RAND_FUNC, rand) AC_DEFINE(SRAND_FUNC, srand)])])])
dnl check for difftime dnl check some more funcs
AC_CHECK_FUNC(difftime, , AC_DEFINE(NO_DIFFTIME)) AC_CHECK_FUNCS(difftime putenv mmap bind_textdomain_codeset)
dnl check for putenv (because %#@&% NeXTStep doesn't have it)
AC_CHECK_FUNC(putenv, AC_DEFINE(HAVE_PUTENV))
dnl check for rint dnl check for rint
AC_CHECK_FUNC(rint, AC_DEFINE(HAVE_RINT), [ AC_CHECK_FUNC(rint, AC_DEFINE(HAVE_RINT), [
AC_CHECK_LIB(m, rint, [ AC_CHECK_LIB(m, rint, [
AC_DEFINE(HAVE_RINT)])]) AC_DEFINE(HAVE_RINT)])])
dnl check for mmap
AC_CHECK_FUNCS(mmap)
dnl check for inline dnl check for inline
AC_MSG_CHECKING([for inline definition in glibconfig.h]) AC_MSG_CHECKING([for inline definition in glibconfig.h])
AC_EGREP_CPP(glib_defines_inline, AC_EGREP_CPP(glib_defines_inline,

View File

@ -1,16 +1,16 @@
/* LIBGIMP - The GIMP Library /* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
* *
* gimpintl.h * gimpintl.h
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version. * version 2 of the License, or (at your option) any later version.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
@ -56,11 +56,16 @@
# define N_(String) (String) # define N_(String) (String)
#endif #endif
#ifndef HAVE_BIND_TEXTDOMAIN_CODESET
# define bind_textdomain_codeset(Domain, Codeset) (Domain)
#endif
#define INIT_LOCALE( domain ) G_STMT_START{ \ #define INIT_LOCALE( domain ) G_STMT_START{ \
gtk_set_locale (); \ gtk_set_locale (); \
setlocale (LC_NUMERIC, "C"); \ setlocale (LC_NUMERIC, "C"); \
bindtextdomain (domain, LOCALEDIR); \ bindtextdomain (domain, LOCALEDIR); \
textdomain (domain); \ bind_textdomain_codeset (domain, "UTF-8"); \
}G_STMT_END textdomain (domain); \
}G_STMT_END
#endif /* __GIMPINTL_H__ */ #endif /* __GIMPINTL_H__ */

View File

@ -1,4 +1,4 @@
/* LIBGIMP - The GIMP Library /* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
* *
* libgimp-intl.h * libgimp-intl.h
@ -6,11 +6,11 @@
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version. * version 2 of the License, or (at your option) any later version.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public

View File

@ -25,26 +25,19 @@
#include "gimpintl.h" #include "gimpintl.h"
#ifdef HAVE_LC_MESSAGES #define INIT_I18N() G_STMT_START{ \
#define INIT_I18N() G_STMT_START{ \ bindtextdomain("gimp-libgimp", LOCALEDIR); \
setlocale(LC_MESSAGES, ""); \ bind_textdomain_codeset ("gimp-libgimp", "UTF-8"); \
bindtextdomain("gimp-libgimp", LOCALEDIR); \ bindtextdomain("gimp-std-plugins", LOCALEDIR); \
bindtextdomain("gimp-std-plugins", LOCALEDIR); \ bind_textdomain_codeset ("gimp-std-plugins", "UTF-8"); \
textdomain("gimp-std-plugins"); \ textdomain("gimp-std-plugins"); \
}G_STMT_END setlocale (LC_NUMERIC, "C"); \
#else }G_STMT_END
#define INIT_I18N() G_STMT_START{ \
bindtextdomain("gimp-libgimp", LOCALEDIR); \
bindtextdomain("gimp-std-plugins", LOCALEDIR); \
textdomain("gimp-std-plugins"); \
}G_STMT_END
#endif
#define INIT_I18N_UI() G_STMT_START{ \ #define INIT_I18N_UI() G_STMT_START{ \
gtk_set_locale(); \ gtk_set_locale(); \
setlocale (LC_NUMERIC, "C"); \
INIT_I18N(); \ INIT_I18N(); \
}G_STMT_END }G_STMT_END
#endif /* __STDPLUGINS_INTL_H__ */ #endif /* __STDPLUGINS_INTL_H__ */

View File

@ -50,7 +50,7 @@
#define RESPONSE_HEADER 4 #define RESPONSE_HEADER 4
#define MAGIC 'G' #define MAGIC 'G'
#ifdef NO_DIFFTIME #ifndef HAVE_DIFFTIME
#define difftime(a,b) (((gdouble)(a)) - ((gdouble)(b))) #define difftime(a,b) (((gdouble)(a)) - ((gdouble)(b)))
#endif #endif

View File

@ -390,7 +390,7 @@
"Shuji Narazaki" "Shuji Narazaki"
"1997" "1997"
"" ""
SF-ADJUSTMENT _"Base Radius (pixel)" '(40 0 512 1 1 0 0) SF-ADJUSTMENT _"Base Radius (pixels)" '(40 0 512 1 1 0 0)
SF-ADJUSTMENT _"Wheel Radius (hypo < 0 < epi)" '(60 0 512 1 1 0 0) SF-ADJUSTMENT _"Wheel Radius (hypo < 0 < epi)" '(60 0 512 1 1 0 0)
SF-ADJUSTMENT _"Pen Rad. / Wheel Rad. [0.0:1.0]" '(0.8 0 1 .01 .01 2 0) SF-ADJUSTMENT _"Pen Rad. / Wheel Rad. [0.0:1.0]" '(0.8 0 1 .01 .01 2 0)
SF-ADJUSTMENT _"Hue Rate" '(1.0 0 1 .01 .01 2 0) SF-ADJUSTMENT _"Hue Rate" '(1.0 0 1 .01 .01 2 0)