forked from github/server
- i18n for unit_dissolve messages
This commit is contained in:
parent
52f8000792
commit
ef2f892d8a
5 changed files with 101 additions and 42 deletions
|
@ -88,7 +88,8 @@ dissolve_units(void)
|
|||
for (u=r->units;u;u=u->next) {
|
||||
attrib * a = a_find(u->attribs, &at_unitdissolve);
|
||||
if (a) {
|
||||
const char * str = NULL;
|
||||
message * msg;
|
||||
|
||||
if (u->age == 0 && a->data.ca[1] < 100) continue;
|
||||
|
||||
/* TODO: Durch einzelne Berechnung ersetzen */
|
||||
|
@ -111,46 +112,27 @@ dissolve_units(void)
|
|||
switch(a->data.ca[0]) {
|
||||
case 1:
|
||||
rsetpeasants(r, rpeasants(r) + n);
|
||||
if (n == 1) {
|
||||
str = "kehrte auf sein Feld zurück.";
|
||||
} else {
|
||||
str = "kehrten auf ihre Felder zurück.";
|
||||
}
|
||||
msg = msg_message("dissolve_units_1", "unit region number race", u, r, n, u->race);
|
||||
break;
|
||||
case 2:
|
||||
if (r->land && !fval(r, RF_MALLORN)) {
|
||||
rsettrees(r, 2, rtrees(r,2) + n);
|
||||
if (n == 1) {
|
||||
str = "wurde zum Baum.";
|
||||
} else {
|
||||
str = "wurden zu Bäumen.";
|
||||
}
|
||||
msg = msg_message("dissolve_units_2", "unit region number race", u, r, n, u->race);
|
||||
} else {
|
||||
if(n == 1) {
|
||||
str = "verfaulte.";
|
||||
} else {
|
||||
str = "verfaulten.";
|
||||
}
|
||||
msg = msg_message("dissolve_units_3", "unit region number race", u, r, n, u->race);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (u->race == new_race[RC_STONEGOLEM] || u->race == new_race[RC_IRONGOLEM]) {
|
||||
if (n == 1) {
|
||||
str = "zerfiel zu Staub.";
|
||||
} else {
|
||||
str = "zerfielen zu Staub.";
|
||||
}
|
||||
}else{
|
||||
if (n == 1) {
|
||||
str = "verschwand über Nacht.";
|
||||
}else{
|
||||
str = "verschwanden über Nacht.";
|
||||
}
|
||||
msg = msg_message("dissolve_units_4", "unit region number race", u, r, n, u->race);
|
||||
} else {
|
||||
msg = msg_message("dissolve_units_5", "unit region number race", u, r, n, u->race);
|
||||
}
|
||||
break;
|
||||
}
|
||||
ADDMSG(&u->faction->msgs, msg_message("dissolve_units",
|
||||
"unit region number race action", u, r, n, u->race, str));
|
||||
|
||||
add_message(&u->faction->msgs, msg);
|
||||
msg_release(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1536,8 +1536,13 @@ readgame(const char * filename, int backup)
|
|||
log_warning(("Found UTF-8 BOM, assuming unicode gamedata.\n"));
|
||||
global.data_version = atoi(token+3);
|
||||
} else {
|
||||
if (encoding==XML_CHAR_ENCODING_NONE) {
|
||||
encoding=XML_CHAR_ENCODING_8859_1;
|
||||
log_warning(("No BOM, assuming 8859-1 gamedata.\n"));
|
||||
}
|
||||
global.data_version = atoi(token);
|
||||
}
|
||||
enc_gamedata = encoding;
|
||||
|
||||
assert(global.data_version>=MIN_VERSION || !"unsupported data format");
|
||||
assert(global.data_version<=RELEASE_VERSION || !"unsupported data format");
|
||||
|
|
|
@ -123,6 +123,9 @@
|
|||
#include <cstring>
|
||||
#include <ctime>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# include <crtdbg.h>
|
||||
#endif
|
||||
#if defined(USE_DMALLOC)
|
||||
# define CLEANUP_CODE
|
||||
#endif
|
||||
|
|
|
@ -13,6 +13,8 @@ for k,v in project.configs do
|
|||
package.config[v].objdir = v .. "/" .. package.name
|
||||
package.config[v].libdir = v .. "/" .. package.name
|
||||
table.insert(package.config[v].buildflags, "extra-warnings")
|
||||
table.insert(package.config[v].buildflags, "no-debug-runtime")
|
||||
table.insert(package.config[v].buildflags, "singlethread-runtime")
|
||||
if (windows) then
|
||||
table.insert(package.config[v].defines, "WIN32")
|
||||
table.insert(package.config[v].defines, "_CRT_SECURE_NO_DEPRECATE")
|
||||
|
@ -34,12 +36,16 @@ package.excludes = {
|
|||
"modules/victoryconditions.c",
|
||||
"modules/victoryconditions.h",
|
||||
"items/studypotion.c",
|
||||
"items/studypotion.h"
|
||||
"items/studypotion.h",
|
||||
"kernel/sqlstore.c",
|
||||
"kernel/sqlstore.h"
|
||||
}
|
||||
for k,v in project.configs do
|
||||
package.config[v].objdir = v .. "/" .. package.name
|
||||
package.config[v].libdir = v .. "/" .. package.name
|
||||
table.insert(package.config[v].buildflags, "extra-warnings")
|
||||
table.insert(package.config[v].buildflags, "no-debug-runtime")
|
||||
table.insert(package.config[v].buildflags, "singlethread-runtime")
|
||||
if (windows) then
|
||||
table.insert(package.config[v].defines, "WIN32")
|
||||
table.insert(package.config[v].defines, "_CRT_SECURE_NO_DEPRECATE")
|
||||
|
@ -61,6 +67,8 @@ for k,v in project.configs do
|
|||
package.config[v].objdir = v .. "/" .. package.name
|
||||
package.config[v].libdir = v .. "/" .. package.name
|
||||
table.insert(package.config[v].buildflags, "extra-warnings")
|
||||
table.insert(package.config[v].buildflags, "no-debug-runtime")
|
||||
table.insert(package.config[v].buildflags, "singlethread-runtime")
|
||||
if (windows) then
|
||||
table.insert(package.config[v].defines, "WIN32")
|
||||
table.insert(package.config[v].defines, "_CRT_SECURE_NO_DEPRECATE")
|
||||
|
@ -83,6 +91,8 @@ for k,v in project.configs do
|
|||
package.config[v].objdir = v .. "/" .. package.name
|
||||
package.config[v].libdir = v .. "/" .. package.name
|
||||
table.insert(package.config[v].buildflags, "extra-warnings")
|
||||
table.insert(package.config[v].buildflags, "no-debug-runtime")
|
||||
table.insert(package.config[v].buildflags, "singlethread-runtime")
|
||||
if (windows) then
|
||||
table.insert(package.config[v].defines, "WIN32")
|
||||
table.insert(package.config[v].defines, "_CRT_SECURE_NO_DEPRECATE")
|
||||
|
@ -104,14 +114,22 @@ for k,v in project.configs do
|
|||
package.config[v].objdir = v
|
||||
package.config[v].bindir = v
|
||||
table.insert(package.config[v].buildflags, "extra-warnings")
|
||||
table.insert(package.config[v].buildflags, "no-debug-runtime")
|
||||
table.insert(package.config[v].buildflags, "singlethread-runtime")
|
||||
if (windows) then
|
||||
table.insert(package.config[v].defines, "WIN32")
|
||||
table.insert(package.config[v].defines, "_CRT_SECURE_NO_DEPRECATE")
|
||||
if target=="vs2005" then
|
||||
if v=="Debug" then
|
||||
package.config[v].links = { "lua5.1_d", "luabind_d" }
|
||||
else
|
||||
package.config[v].links = { "lua5.1", "luabind" }
|
||||
end
|
||||
else
|
||||
package.config[v].links = { "lua50", "luabind" }
|
||||
end
|
||||
end
|
||||
if v=="Debug" then
|
||||
package.config[v].links = { "lua5.1_d", "luabind_d" }
|
||||
else
|
||||
package.config[v].links = { "lua5.1", "luabind" }
|
||||
if v~="Debug" then
|
||||
table.insert(package.config[v].defines, "NDEBUG")
|
||||
end
|
||||
end
|
||||
|
@ -129,14 +147,22 @@ for k,v in project.configs do
|
|||
package.config[v].objdir = v
|
||||
package.config[v].bindir = v
|
||||
table.insert(package.config[v].buildflags, "extra-warnings")
|
||||
table.insert(package.config[v].buildflags, "no-debug-runtime")
|
||||
table.insert(package.config[v].buildflags, "singlethread-runtime")
|
||||
if (windows) then
|
||||
table.insert(package.config[v].defines, "WIN32")
|
||||
table.insert(package.config[v].defines, "_CRT_SECURE_NO_DEPRECATE")
|
||||
if target=="vs2005" then
|
||||
if v=="Debug" then
|
||||
package.config[v].links = { "lua5.1_d", "luabind_d" }
|
||||
else
|
||||
package.config[v].links = { "lua5.1", "luabind" }
|
||||
end
|
||||
else
|
||||
package.config[v].links = { "lua50", "luabind" }
|
||||
end
|
||||
end
|
||||
if v=="Debug" then
|
||||
package.config[v].links = { "lua5.1_d", "luabind_d" }
|
||||
else
|
||||
package.config[v].links = { "lua5.1", "luabind" }
|
||||
if v~="Debug" then
|
||||
table.insert(package.config[v].defines, "NDEBUG")
|
||||
end
|
||||
-- package.config["Debug"].linkoptions = { "/NODEFAULTLIB:MSVCRT /NODEFAULTLIB:LIBCMT" }
|
||||
|
|
|
@ -7896,16 +7896,59 @@
|
|||
<text locale="en">"$unit($unit) reactivates the astral protection shield in $region($region)."</text>
|
||||
</message>
|
||||
|
||||
<message name="dissolve_units" section="events">
|
||||
<message name="dissolve_units_1" section="events">
|
||||
<type>
|
||||
<arg name="region" type="region"/>
|
||||
<arg name="unit" type="unit"/>
|
||||
<arg name="number" type="int"/>
|
||||
<arg name="race" type="race"/>
|
||||
<arg name="action" type="string"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) in $region($region): $int($number) $race($race,$number) $action"</text>
|
||||
<text locale="en">"$unit($unit) in $region($region): $int($number) $race($race,$number) $action"</text>
|
||||
<text locale="de">"$unit($unit) in $region($region): $int($number) $race($race,$number) $if($eq($number,1),"kehrte auf seine", "kehrten auf ihre") Felder zurück."</text>
|
||||
<text locale="en">"$unit($unit) in $region($region): $int($number) $race($race,$number) returned to the fields."</text>
|
||||
</message>
|
||||
|
||||
<message name="dissolve_units_2" section="events">
|
||||
<type>
|
||||
<arg name="region" type="region"/>
|
||||
<arg name="unit" type="unit"/>
|
||||
<arg name="number" type="int"/>
|
||||
<arg name="race" type="race"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) in $region($region): $int($number) $race($race,$number) $if($eq($number,1),"wurde zum Baum", "wurden zu Bäumen")."</text>
|
||||
<text locale="en">"$unit($unit) in $region($region): $int($number) $race($race,$number) turned into $if($eq($number,1),"a tree", "trees")."</text>
|
||||
</message>
|
||||
|
||||
<message name="dissolve_units_3" section="events">
|
||||
<type>
|
||||
<arg name="region" type="region"/>
|
||||
<arg name="unit" type="unit"/>
|
||||
<arg name="number" type="int"/>
|
||||
<arg name="race" type="race"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) in $region($region): $int($number) $race($race,$number) $if($eq($number,1),"verfaulte", "verfaulten")."</text>
|
||||
<text locale="en">"$unit($unit) in $region($region): $int($number) $race($race,$number) whithered and died."</text>
|
||||
</message>
|
||||
|
||||
<message name="dissolve_units_4" section="events">
|
||||
<type>
|
||||
<arg name="region" type="region"/>
|
||||
<arg name="unit" type="unit"/>
|
||||
<arg name="number" type="int"/>
|
||||
<arg name="race" type="race"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) in $region($region): $int($number) $race($race,$number) $if($eq($number,1),"zerfiel", "zerfielen") zu Staub."</text>
|
||||
<text locale="en">"$unit($unit) in $region($region): $int($number) $race($race,$number) turned to dust."</text>
|
||||
</message>
|
||||
|
||||
<message name="dissolve_units_5" section="events">
|
||||
<type>
|
||||
<arg name="region" type="region"/>
|
||||
<arg name="unit" type="unit"/>
|
||||
<arg name="number" type="int"/>
|
||||
<arg name="race" type="race"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) in $region($region): $int($number) $race($race,$number) $if($eq($number,1),"verschwand", "verschwanden") über Nacht."</text>
|
||||
<text locale="en">"$unit($unit) in $region($region): $int($number) $race($race,$number) disappearedin the night."</text>
|
||||
</message>
|
||||
|
||||
<message name="forestfire_spread" section="events">
|
||||
|
|
Loading…
Reference in a new issue