1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

[gettext] Show info about gettext.

gettext (System) means gettext from the libc library.
gettext (ELinks) builtin from src/intl/gettext.
This commit is contained in:
Witold Filipczyk 2021-08-15 17:52:54 +02:00
parent 85f7e8c79b
commit 4258e248d0
4 changed files with 52 additions and 0 deletions

View File

@ -222,3 +222,25 @@ set_language(int language)
_nl_msg_cat_cntr++;
}
}
static void
init_gettext(struct module *module)
{
}
static void
done_gettext(struct module *module)
{
mem_free_set(&LANGUAGE, NULL);
}
struct module gettext_module = struct_module(
/* name: */ "gettext (ELinks)",
/* options: */ NULL,
/* hooks: */ NULL,
/* submodules: */ NULL,
/* data: */ NULL,
/* init: */ init_gettext,
/* done: */ done_gettext
);

View File

@ -221,3 +221,24 @@ set_language(int language)
_nl_msg_cat_cntr++;
}
static void
init_gettext(struct module *module)
{
}
static void
done_gettext(struct module *module)
{
mem_free_set(&LANGUAGE, NULL);
}
struct module gettext_module = struct_module(
/* name: */ "gettext (System)",
/* options: */ NULL,
/* hooks: */ NULL,
/* submodules: */ NULL,
/* data: */ NULL,
/* init: */ init_gettext,
/* done: */ done_gettext
);

View File

@ -3,12 +3,15 @@
#include "config/options.h"
#include "intl/charsets.h"
#include "main/module.h"
#include "terminal/terminal.h"
#ifdef __cplusplus
extern "C" {
#endif
extern struct module gettext_module;
#ifdef CONFIG_GETTEXT
extern int _nl_msg_cat_cntr;

View File

@ -24,6 +24,9 @@
#include "ecmascript/ecmascript.h"
#include "formhist/formhist.h"
#include "globhist/globhist.h"
#ifdef CONFIG_NLS
#include "intl/libintl.h"
#endif
#include "mime/mime.h"
#include "network/ssl/ssl.h"
#include "protocol/protocol.h"
@ -43,6 +46,9 @@ struct module *main_modules[] = {
struct module *builtin_modules[] = {
&periodic_saving_module,
&viewer_module,
#ifdef CONFIG_NLS
&gettext_module,
#endif
#ifdef CONFIG_CSS
&css_module,
#endif