Merge pull request #2479 from assistcontrol/master

Fix build with --disable-nls (fixes #2477)
This commit is contained in:
Gerardo O 2023-03-02 08:37:49 -06:00 committed by GitHub
commit 30ad1d0d67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -1300,8 +1300,10 @@ set_locale (void) {
char *loc_ctype;
setlocale (LC_ALL, "");
#ifdef ENABLE_NLS
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
#endif
loc_ctype = getenv ("LC_CTYPE");
if (loc_ctype != NULL)

View File

@ -30,9 +30,14 @@
#ifndef LABELS_H_INCLUDED
#define LABELS_H_INCLUDED
#ifdef ENABLE_NLS
#include <libintl.h>
#define _(String) dgettext (PACKAGE , String)
#else
#define _(String) (String)
#endif
#define gettext_noop(String) String
#define N_(String) gettext_noop (String)