forked from github/server
"required-Tag von $resources() liefert falsche Item-Bezeichnungen" - lokalisierter string
This commit is contained in:
parent
3e843afb99
commit
bd7d2e1271
1 changed files with 6 additions and 4 deletions
|
@ -410,16 +410,17 @@ cr_order(variant var, char * buffer, const void * userdata)
|
||||||
static int
|
static int
|
||||||
cr_resources(variant var, char * buffer, const void * userdata)
|
cr_resources(variant var, char * buffer, const void * userdata)
|
||||||
{
|
{
|
||||||
|
faction * f = (faction*)userdata;
|
||||||
resource * rlist = (resource*)var.v;
|
resource * rlist = (resource*)var.v;
|
||||||
char * wp = buffer;
|
char * wp = buffer;
|
||||||
if (rlist!=NULL) {
|
if (rlist!=NULL) {
|
||||||
wp += sprintf(wp, "\"%d %s", rlist->number,
|
const char * name = resourcename(rlist->type, rlist->number!=1);
|
||||||
resourcename(rlist->type, rlist->number!=1));
|
wp += sprintf(wp, "\"%d %s", rlist->number, add_translation(name, LOC(f->locale, name)));
|
||||||
for (;;) {
|
for (;;) {
|
||||||
rlist = rlist->next;
|
rlist = rlist->next;
|
||||||
if (rlist==NULL) break;
|
if (rlist==NULL) break;
|
||||||
wp += sprintf(wp, ", %d %s", rlist->number,
|
name = resourcename(rlist->type, rlist->number!=1);
|
||||||
resourcename(rlist->type, rlist->number!=1));
|
wp += sprintf(wp, ", %d %s", rlist->number, add_translation(name, LOC(f->locale, name)));
|
||||||
}
|
}
|
||||||
strcat(wp, "\"");
|
strcat(wp, "\"");
|
||||||
}
|
}
|
||||||
|
@ -1573,3 +1574,4 @@ creport_cleanup(void)
|
||||||
junkyard = 0;
|
junkyard = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue