1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-02 19:56:45 +02:00

Add localization system (gettext)

This commit is contained in:
Ansa89
2015-05-25 16:38:52 +02:00
parent d0a7ca17d2
commit 85d3c18ba6
36 changed files with 5535 additions and 437 deletions

View File

@ -29,6 +29,12 @@
#include <unistd.h>
#include <pwd.h>
#ifdef NO_GETTEXT
#define gettext(A) (A)
#else
#include <libintl.h>
#endif
#include "toxic.h"
#include "configdir.h"
@ -116,7 +122,7 @@ int create_user_config_dirs(char *path)
char *logpath = malloc(strlen(path) + strlen(LOGDIR) + 1);
if (fullpath == NULL || logpath == NULL)
exit_toxic_err("failed in load_data_structures", FATALERR_MEMORY);
exit_toxic_err(gettext("failed in load_data_structures"), FATALERR_MEMORY);
strcpy(fullpath, path);
strcat(fullpath, CONFIGDIR);