1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 14:26:39 +02:00

core: make libintl.h required if CMake option ENABLE_NLS is enabled (issue #2031)

This commit is contained in:
Sébastien Helleu
2023-10-15 14:58:26 +02:00
parent 839148e9d4
commit 252f787fcf
6 changed files with 34 additions and 30 deletions
+2
View File
@@ -1658,9 +1658,11 @@ doc_generate (const char *path)
* (this is used to generate documentation without installing WeeChat,
* that means no need to run `make install`)
*/
#ifdef ENABLE_NLS
localedir = getenv ("WEECHAT_DOCGEN_LOCALEDIR");
if (localedir && localedir[0])
bindtextdomain (PACKAGE, localedir);
#endif /* ENABLE_NLS */
for (i = 0; locales[i]; i++)
{
+1 -5
View File
@@ -33,11 +33,7 @@
#include <locale.h>
#if defined(ENABLE_NLS) && !defined(_)
#ifdef HAVE_LIBINTL_H
#include <libintl.h>
#else
#include "../../intl/libintl.h"
#endif /* HAVE_LIBINTL_H */
#include <libintl.h>
#define _(string) gettext(string)
#define NG_(single,plural,number) ngettext(single,plural,number)
#ifdef gettext_noop