missing translations are the worst.

This commit is contained in:
Enno Rehling 2018-02-17 21:08:58 +01:00
parent 06f3e337b6
commit cb537b1a93
3 changed files with 8 additions and 4 deletions

View file

@ -1081,7 +1081,7 @@
<string name="lifepotion">
<text locale="en">water of life</text>
</string>
<string name="p2_p">
<string name="lifepotion_p">
<text locale="en">waters of life</text>
</string>
<string name="p3">

View file

@ -2114,10 +2114,14 @@ static void eval_resource(struct opstack **stack, const void *userdata)
int j = opop(stack).i;
const struct resource_type *res = (const struct resource_type *)opop(stack).v;
const char *c = LOC(lang, resourcename(res, j != 1));
size_t len = strlen(c);
variant var;
if (c) {
size_t len = strlen(c);
var.v = strcpy(balloc(len + 1), c);
var.v = strcpy(balloc(len + 1), c);
} else {
var.v = NULL;
}
opush(stack, var);
}

View file

@ -186,7 +186,7 @@ const char *locale_string(const locale * lang, const char *key, bool warn)
return value;
}
}
return 0;
return NULL;
}
void locale_setstring(locale * lang, const char *key, const char *value)