Merge branch 'master' into setup-cronjob

Conflicts:
	src/buildno.h
This commit is contained in:
Enno Rehling 2015-02-08 13:56:49 +01:00
commit 7b41a53d2a
10 changed files with 29 additions and 7 deletions

View File

@ -70,5 +70,6 @@ add_subdirectory (quicklist)
add_subdirectory (critbit)
add_subdirectory (src eressea)
install(DIRECTORY res conf DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.xml")
install(DIRECTORY res conf DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.json")
install(DIRECTORY scripts DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.lua")

View File

@ -1,7 +1,7 @@
#!/bin/bash
[ -z ${ERESSEA} ] && ERESSEA=~/eressea
branch="master"
branch="develop"
if [ -e ${ERESSEA}/build/.preview ]; then
branch=`cat ${ERESSEA}/build/.preview`
fi

View File

@ -4345,6 +4345,14 @@
</string>
</namespace>
<namespace name="spellinfo">
<string name="create_ror">
<text locale="de">Erzeugt einen Ring der Regeneration.</text>
<text locale="en">Creates a ring of regeneration.</text>
</string>
<string name="create_focus">
<text locale="de">Erzeugt einen Aurafokus.</text>
<text locale="en">Creates an aurafocus crystal.</text>
</string>
<string name="acidrain">
<text locale="de">Tötet die Feinde mit Säure.</text>
<text locale="en">Kills enemies with acid.</text>

View File

@ -889,7 +889,7 @@
<arg name="left" type="int"/>
</type>
<text locale="de">"Auf der Einheit $if($eq($left,1),"liegt","liegen") $int($left) Wirkung$if($eq($left,1),"","en") $resource($potion,1)."</text>
<text locale="en">"There are $int($left) use($eq($left,1),"s","") of $resource($potion,1) left."</text>
<text locale="en">"There $if($eq($left,1),"is","are") $int($left) $if($eq($left,1),"use","uses") of $resource($potion,1) left."</text>
</message>
<message name="nr_region_owner" section="nr">
<type>

View File

@ -1,3 +1,3 @@
#define VERSION_MAJOR 3
#define VERSION_MINOR 5
#define VERSION_BUILD 698
#define VERSION_MINOR 4
#define VERSION_BUILD 3

View File

@ -1896,7 +1896,10 @@ int name_cmd(struct unit *u, struct order *ord)
}
if (s != NULL) {
return rename_cmd(u, ord, s, getstrtoken());
const char *name = getstrtoken();
if (name) {
rename_cmd(u, ord, s, name);
}
}
return 0;

View File

@ -781,7 +781,7 @@ CuSuite *get_laws_suite(void)
SUITE_ADD_TEST(suite, test_force_leave_ships);
SUITE_ADD_TEST(suite, test_force_leave_ships_on_ocean);
SUITE_ADD_TEST(suite, test_peasant_luck_effect);
SUITE_ADD_TEST(suite, test_luck_message);
DISABLE_TEST(suite, test_luck_message);
return suite;
}

View File

@ -240,7 +240,7 @@ const message_type *register_msg(const char *type, int n_param, ...) {
void assert_messages(struct CuTest * tc, struct mlist *msglist, const message_type **types,
int num_msgs, bool exact_match, ...) {
va_list args;
int found = 0, argc = 0;
int found, argc = -1;
struct message *msg;
bool match = true;
@ -271,3 +271,8 @@ void assert_messages(struct CuTest * tc, struct mlist *msglist, const message_ty
va_end(args);
}
void disabled_test(void *suite, void (*test)(CuTest *), const char *name) {
(void)test;
fprintf(stderr, "%s: SKIP\n", name);
}

View File

@ -47,6 +47,10 @@ extern "C" {
void assert_messages(struct CuTest * tc, struct mlist *msglist, const struct message_type **types,
int num_msgs, bool exact_match, ...);
void disabled_test(void *suite, void (*)(struct CuTest *), const char *name);
#define DISABLE_TEST(SUITE, TEST) disabled_test(SUITE, TEST, #TEST)
#ifdef __cplusplus
}
#endif

View File

@ -263,6 +263,7 @@ void init_translations(const struct locale *lang, int ut, const char * (*string_
assert(maxstrings > 0);
tokens = get_translations(lang, ut);
for (i = 0; i != maxstrings; ++i) {
// TODO: swap the name of s and key
const char * s = string_cb(i);
const char * key = s ? locale_string(lang, s, false) : 0;
key = key ? key : s;