diff --git a/src/common/gamecode/report.c b/src/common/gamecode/report.c index 31b3b55ae..30c80bb8c 100644 --- a/src/common/gamecode/report.c +++ b/src/common/gamecode/report.c @@ -2922,6 +2922,19 @@ eval_region(struct opstack ** stack, const void * userdata) /* region -> string opush(stack, var); } +static void +eval_terrain(struct opstack ** stack, const void * userdata) /* region -> string */ +{ + const struct faction * f = (const struct faction *)userdata; + const struct region * r = (const struct region *)opop(stack).v; + const char * c = LOC(f->locale, terrain_name(r)); + size_t len = strlen(c); + variant var; + + var.v = strcpy(balloc(len+1), c); + opush(stack, var); +} + static void eval_ship(struct opstack ** stack, const void * userdata) /* ship -> string */ { @@ -3091,6 +3104,7 @@ report_init(void) /* register functions that turn message contents to readable strings */ add_function("alliance", &eval_alliance); add_function("region", &eval_region); + add_function("terrain", &eval_terrain); add_function("weight", &eval_weight); add_function("resource", &eval_resource); add_function("race", &eval_race); diff --git a/src/res/messages.xml b/src/res/messages.xml index 39eed54ca..6d4a4dbe0 100644 --- a/src/res/messages.xml +++ b/src/res/messages.xml @@ -1969,18 +1969,18 @@ - "$unit($unit) entdeckt dass im $direction($direction) Ozean ist." - "$unit($unit) discovered that an Ocean lies in the $direction($direction)." - "$unit($unit) discovered that an Ocean lies in the $direction($direction)." + "$unit($unit) entdeckt dass im $direction($direction) $terrain($region) ist." + "$unit($unit) discovered that an ocean lies in the $direction($direction)." + "$unit($unit) discovered that an ocean lies in the $direction($direction)." - "$unit($unit) entdeckt, dass $region($region) Ozean ist." - "$unit($unit) discovered that $region($region) is Ocean." - "$unit($unit) discovered that $region($region) is Ocean." + "$unit($unit) entdeckt, dass $region($region) $terrain($region) ist." + "$unit($unit) discovered that $region($region) is $terrain($region)." + "$unit($unit) discovered that $region($region) is $terrain($region)."