mirror of
https://github.com/Tha14/toxic.git
synced 2025-06-30 03:56:45 +02:00
Add localization system (gettext)
This commit is contained in:
@ -24,6 +24,12 @@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#ifdef NO_GETTEXT
|
||||
#define gettext(A) (A)
|
||||
#else
|
||||
#include <libintl.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <sys/types.h>
|
||||
#include <sys/dir.h>
|
||||
@ -117,7 +123,7 @@ int complete_line(ToxWindow *self, const void *list, int n_items, int size)
|
||||
char *sub = malloc(strlen(ubuf) + 1);
|
||||
|
||||
if (sub == NULL)
|
||||
exit_toxic_err("failed in complete_line", FATALERR_MEMORY);
|
||||
exit_toxic_err(gettext("failed in complete_line"), FATALERR_MEMORY);
|
||||
|
||||
if (!s && !dir_search) {
|
||||
strcpy(sub, tmp);
|
||||
|
Reference in New Issue
Block a user