localization of alliance status "ALL".

fix for https://bugs.eressea.de/view.php?id=1993
This commit is contained in:
Enno Rehling 2014-08-16 03:07:37 +02:00
parent 158d4f8d4b
commit 41d42fa248
5 changed files with 12 additions and 14 deletions

View File

@ -4262,11 +4262,6 @@ void do_battle(region * r)
}
}
void battle_init(battle * b) {
assert(b);
memset(b, 0, sizeof(battle));
}
void battle_free(battle * b) {
side *s;

View File

@ -110,6 +110,7 @@ const char *keywords[MAXKEYWORDS] = {
"teach",
"study",
"make",
"maketemp",
"move",
"password",
"recruit",

View File

@ -36,6 +36,7 @@ typedef enum {
K_TEACH,
K_STUDY,
K_MAKE,
K_MAKETEMP,
K_MOVE,
K_PASSWORD,
K_RECRUIT,

View File

@ -1412,13 +1412,16 @@ static void durchreisende(FILE * F, const region * r, const faction * f)
}
}
/* TODO: finish localization */
if (maxtravel == 1) {
bytes = _snprintf(bufp, size, " %s", LOC(f->locale, "has_moved_one"));
} else {
bytes = _snprintf(bufp, size, " %s", LOC(f->locale, "has_moved_many"));
if (size>0) {
if (maxtravel == 1) {
bytes = _snprintf(bufp, size, " %s", LOC(f->locale, "has_moved_one"));
}
else {
bytes = _snprintf(bufp, size, " %s", LOC(f->locale, "has_moved_many"));
}
if (wrptr(&bufp, &size, bytes) != 0)
WARN_STATIC_BUFFER();
}
if (wrptr(&bufp, &size, bytes) != 0)
WARN_STATIC_BUFFER();
*bufp = 0;
rparagraph(F, buf, 0, 0, 0);
}
@ -1648,7 +1651,7 @@ show_allies(const faction * f, const ally * allies, char *buf, size_t size)
if (wrptr(&bufp, &size, bytes) != 0)
WARN_STATIC_BUFFER();
if ((mode & HELP_ALL) == HELP_ALL) {
bytes = (int)strlcpy(bufp, "Alles", size);
bytes = (int)strlcpy(bufp, locale_string(f->locale, parameters[P_ANY]), size);
if (wrptr(&bufp, &size, bytes) != 0)
WARN_STATIC_BUFFER();
} else {

View File

@ -9,8 +9,6 @@
int wrptr(char **ptr, size_t * size, int bytes)
{
assert(bytes >= 0 || !"you're not using _snprintf right, maybe?");
if (bytes == 0) {
return 0;
}