Cleanup of no longer used Gettext flags

We don't need HAVE_GETTEXT conditional code
This commit is contained in:
Frank H. Ellenberger 2019-05-14 22:37:05 +02:00
parent fc567208f3
commit 7cb4c1d7b1
3 changed files with 9 additions and 27 deletions

View File

@ -697,9 +697,6 @@ endif(UNIX OR MINGW)
endif(ENABLE_BINRELOC)
if (UNIX OR MINGW)
set (HAVE_BIND_TEXTDOMAIN_CODESET 1)
set (HAVE_DCGETTEXT 1)
set (HAVE_GETTEXT 1)
set (HAVE_GETTIMEOFDAY 1)
set (HAVE_GUILE 1)
set (HAVE_LIBM 1)

View File

@ -78,9 +78,6 @@
/* Don't use deprecated glib functions */
#cmakedefine G_DISABLE_DEPRECATED 1
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
#cmakedefine HAVE_BIND_TEXTDOMAIN_CODESET 1
/* define if the Boost library is available */
#cmakedefine HAVE_BOOST
@ -93,9 +90,6 @@
/* Define to 1 if you have the <dbi/dbi.h> header file. */
#cmakedefine HAVE_DBI_DBI_H 1
/* Define to 1 if you have the `dcgettext' function. */
#cmakedefine HAVE_DCGETTEXT 1
/* Define to 1 if you have the <dirent.h> header file. */
#cmakedefine HAVE_DIRENT_H 1
@ -120,9 +114,6 @@
/* Define to 1 if you have the `getppid' function. */
#cmakedefine HAVE_GETPPID 1
/* Define if the GNU gettext() function is already present or preinstalled. */
#cmakedefine HAVE_GETTEXT 1
/* Define to 1 if you have the `gettimeofday' function. */
#cmakedefine HAVE_GETTIMEOFDAY 1

View File

@ -69,10 +69,8 @@ static QofLogModule log_module = GNC_MOD_GUI;
*/
#define __MSWIN_CONSOLE__ 0
#ifdef HAVE_GETTEXT
# include <libintl.h>
# include <locale.h>
#endif
#include <libintl.h>
#include <locale.h>
#ifdef MAC_INTEGRATION
# include <Foundation/Foundation.h>
@ -848,6 +846,7 @@ redirect_stdout (void)
int
main(int argc, char ** argv)
{
gchar *localedir = gnc_path_get_localedir();
#if !defined(G_THREADS_ENABLED) || defined(G_THREADS_IMPL_NONE)
# error "No GLib thread implementation available!"
#endif
@ -883,17 +882,12 @@ main(int argc, char ** argv)
g_setenv ("LC_ALL", "C", TRUE);
setlocale (LC_ALL, "C");
}
#ifdef HAVE_GETTEXT
{
gchar *localedir = gnc_path_get_localedir();
bindtextdomain(GETTEXT_PACKAGE, localedir);
bindtextdomain("iso_4217", localedir); // For win32 to find currency name translations
bind_textdomain_codeset("iso_4217", "UTF-8");
textdomain(GETTEXT_PACKAGE);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
g_free(localedir);
}
#endif
bindtextdomain(GETTEXT_PACKAGE, localedir);
bindtextdomain("iso_4217", localedir); // For win32 to find currency name translations
bind_textdomain_codeset("iso_4217", "UTF-8");
textdomain(GETTEXT_PACKAGE);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
g_free(localedir);
gnc_parse_command_line(&argc, &argv);
gnc_print_unstable_message();