Skip to content

Commit

Permalink
Cleanup of no longer used Gettext flags
Browse files Browse the repository at this point in the history
We don't need HAVE_GETTEXT conditional code
  • Loading branch information
fellen committed May 14, 2019
1 parent fc56720 commit 7cb4c1d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 27 deletions.
3 changes: 0 additions & 3 deletions CMakeLists.txt
Expand Up @@ -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)
Expand Down
9 changes: 0 additions & 9 deletions common/config.h.cmake.in
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down
24 changes: 9 additions & 15 deletions gnucash/gnucash-bin.c
Expand Up @@ -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>
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 7cb4c1d

Please sign in to comment.