forked from github/server
"Unbenannter Effekt (Mahlstrom?)" - made the quotes around messages in XML optional by parsing as string if there is no leading quote.
This commit is contained in:
parent
13e7e640fb
commit
ce6fbde53e
3 changed files with 13 additions and 8 deletions
|
@ -131,7 +131,6 @@ nrt_register(const struct message_type * mtype, const struct locale * lang, cons
|
|||
c+= strlen(strcpy(c, mtype->pnames[i]));
|
||||
}
|
||||
nrt->vars = strdup(zNames);
|
||||
/* TODO: really necessary to strdup them all? here? better to extend the caller? hash? */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -383,10 +383,17 @@ translate(const char* format, const void * userdata, const char* vars, variant a
|
|||
}
|
||||
}
|
||||
|
||||
if (parse(&stack, format, userdata)==NULL) return NULL;
|
||||
rv = (const char*)opop(&stack).v;
|
||||
free(stack->begin);
|
||||
free(stack);
|
||||
if (format[0]=='"') {
|
||||
rv = parse(&stack, format, userdata);
|
||||
}
|
||||
else {
|
||||
rv = parse_string(&stack, format, userdata);
|
||||
}
|
||||
if (rv!=NULL) {
|
||||
rv = (const char*)opop(&stack).v;
|
||||
free(stack->begin);
|
||||
free(stack);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
|
@ -1967,9 +1967,8 @@
|
|||
<arg name="mage" type="unit"/>
|
||||
<arg name="amount" type="int"/>
|
||||
</type>
|
||||
<text locale="de">"$if($isnull($mage),"Ein unentdeckter Magier",$unit($mage)) erschuf einen heiligen Hain von $int($amount) Schößlingen."</text>
|
||||
<text locale="fr">$if($isnull($mage),"An unknown magician ",$unit($mage)) created a holy forest of $int($amount) young trees."</text>
|
||||
<text locale="en">$if($isnull($mage),"An unknown magician ",$unit($mage)) created a holy forest of $int($amount) young trees."</text>
|
||||
<text locale="de">$if($isnull($mage),"Ein unentdeckter Magier",$unit($mage)) erschuf einen heiligen Hain von $int($amount) Schößlingen.</text>
|
||||
<text locale="en">$if($isnull($mage),"An unknown magician ",$unit($mage)) created a holy forest of $int($amount) young trees.</text>
|
||||
</message>
|
||||
<message name="harvest_effect" section="magic">
|
||||
<type>
|
||||
|
|
Loading…
Reference in a new issue