+2001-03-08 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+ * INSTALL: remove mention of problem with gettext.
+
2001-03-02 John Levon <moz@compsoc.man.ac.uk>
* configure.in:
If you your version of gcc-c++ is > 2.96-69, you may not need to do
this.
- o If you have GNU gettext installed on your system (e.g. on linux),
- you may get tons of warnings like:
-
- bullet_forms.C:101: warning: passing `char *' to argument 1 of
- `__builtin_constant_p(int)' lacks a cast
-
- These are in harmless warnings caused by a bug in libintl.h, but
- will be solved if you use --with-included-gettext when configuring
- LyX.
-
o It is possible to compile lyx with Tru64 Unix cxx compiler
version 6.2, provided one uses
CXX='cxx -std strict_ansi'
+2001-03-08 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+ * main.C (main): pass lyx_localedir to gettext_init().
+
+ * gettext.h: remove locale_init and gettext_init macros
+
+ * gettext.C (locale_init): new function
+ (gettext_init): new function
+
+ * lyx_gui.C (LyXGUI): use locale_init() instead of explicit
+ setlocale().
+
2001-03-07 Edwin Leuven <leuven@fee.uva.nl>
* Moved credits to frontends:
+// -*- C++ -*-
+/* This file is part of
+ * ======================================================
+ *
+ * LyX, The Document Processor
+ *
+ * Copyright 1995 Matthias Ettrich
+ * Copyright 1995-2001 The LyX Team.
+ *
+ * ====================================================== */
+
#include <config.h>
+#ifdef ENABLE_NLS
+
#include "LString.h"
-#include "gettext.h"
-#ifdef ENABLE_NLS
+# if HAVE_GETTEXT
+# include <libintl.h> // use the header already in the system *EK*
+# ifdef HAVE_LOCALE_H
+# include <locale.h> // for LC_MESSAGES
+# endif
+# else
+# include "../intl/libintl.h"
+# endif
char const * _(char const * str)
{
return string();
}
+void locale_init()
+{
+# ifdef HAVE_LC_MESSAGES
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ setlocale(LC_NUMERIC, "C");
+# endif
+}
+
+void gettext_init(string const & localedir)
+{
+ bindtextdomain(PACKAGE, localedir.c_str());
+ textdomain(PACKAGE);
+}
+
+
#endif
#include "LString.h"
-# if HAVE_GETTEXT
-# include <libintl.h> // use the header already in the system *EK*
-# ifdef HAVE_LOCALE_H
-# include <locale.h> // for LC_MESSAGES
-# endif
-# else
-# include "../intl/libintl.h"
-# endif
-
+///
char const * _(char const *);
-
+///
string const _(string const &);
+///
+void locale_init();
+///
+void gettext_init(string const & localedir);
-//# define _(str) gettext(str)
-# define N_(str) (str) // for detecting static strings
-
-# ifdef HAVE_LC_MESSAGES
- // LC_TIME, LC_CTYPE, even LC_ALL
-# define locale_init() { setlocale (LC_MESSAGES, ""); setlocale (LC_CTYPE, ""); setlocale(LC_NUMERIC, "C"); }
-# else
-# define locale_init()
-# endif
-# define gettext_init() { bindtextdomain (PACKAGE, lyx_localedir.c_str()); \
- textdomain (PACKAGE); }
#else
///
# define _(str) (str)
///
# define S_(str) (str)
///
-# define N_(str) (str)
-///
# define locale_init()
///
-# define gettext_init()
+# define gettext_init(package, localedir)
+
#endif
+# define N_(str) (str) // for detecting static strings
+
#endif
#include <config.h>
#include <cstdlib>
-#include <clocale>
#ifdef __GNUG__
#pragma implementation
fl_initialize(argc, argv, "LyX", cmdopt, num_res);
// It appears that, in xforms >=0.89.5, fl_initialize()
// calls setlocale() and ruins our LC_NUMERIC setting.
- setlocale(LC_NUMERIC, "C");
+ locale_init();
fl_get_app_resources(res, num_res);
static const int geometryBitmask =
lyx_localedir = LOCALEDIR;
// initialize for internationalized version *EK*
- locale_init(); // macro
- gettext_init(); // macro
+ locale_init();
+ gettext_init(lyx_localedir);
#ifdef __EMX__
_wildcard(&argc, &argv);