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) { void battle_free(battle * b) {
side *s; side *s;

View file

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

View file

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

View file

@ -1412,13 +1412,16 @@ static void durchreisende(FILE * F, const region * r, const faction * f)
} }
} }
/* TODO: finish localization */ /* TODO: finish localization */
if (size>0) {
if (maxtravel == 1) { if (maxtravel == 1) {
bytes = _snprintf(bufp, size, " %s", LOC(f->locale, "has_moved_one")); bytes = _snprintf(bufp, size, " %s", LOC(f->locale, "has_moved_one"));
} else { }
else {
bytes = _snprintf(bufp, size, " %s", LOC(f->locale, "has_moved_many")); bytes = _snprintf(bufp, size, " %s", LOC(f->locale, "has_moved_many"));
} }
if (wrptr(&bufp, &size, bytes) != 0) if (wrptr(&bufp, &size, bytes) != 0)
WARN_STATIC_BUFFER(); WARN_STATIC_BUFFER();
}
*bufp = 0; *bufp = 0;
rparagraph(F, buf, 0, 0, 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) if (wrptr(&bufp, &size, bytes) != 0)
WARN_STATIC_BUFFER(); WARN_STATIC_BUFFER();
if ((mode & HELP_ALL) == HELP_ALL) { 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) if (wrptr(&bufp, &size, bytes) != 0)
WARN_STATIC_BUFFER(); WARN_STATIC_BUFFER();
} else { } else {

View file

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