1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-12-06 20:06:34 +01:00

Revert commit 312d0c3 (localization/gettext)

There were serious problems with branch merging that need to be resolved first
This commit is contained in:
Jfreegman
2015-07-04 01:19:16 -04:00
parent 444d8e7a74
commit 035420e5c7
37 changed files with 441 additions and 5552 deletions

View File

@@ -24,12 +24,6 @@
#include <string.h>
#include <assert.h>
#ifdef NO_GETTEXT
#define gettext(A) (A)
#else
#include <libintl.h>
#endif
#include "toxic.h"
#include "windows.h"
#include "execute.h"
@@ -104,7 +98,7 @@ static int parse_command(WINDOW *w, ToxWindow *self, const char *input, char (*a
char *cmd = strdup(input);
if (cmd == NULL)
exit_toxic_err(gettext("failed in parse_command"), FATALERR_MEMORY);
exit_toxic_err("failed in parse_command", FATALERR_MEMORY);
int num_args = 0;
int i = 0; /* index of last char in an argument */
@@ -118,7 +112,7 @@ static int parse_command(WINDOW *w, ToxWindow *self, const char *input, char (*a
i = char_find(1, cmd, '\"');
if (cmd[i] == '\0') {
const char *errmsg = gettext("Invalid argument. Did you forget a closing \"?");
const char *errmsg = "Invalid argument. Did you forget a closing \"?";
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, errmsg);
free(cmd);
return -1;
@@ -189,5 +183,5 @@ void execute(WINDOW *w, ToxWindow *self, Tox *m, const char *input, int mode)
if (do_command(w, self, m, num_args, global_commands, args) == 0)
return;
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, gettext("Invalid command."));
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Invalid command.");
}