From df92ed03cf0855f2b31bce56cb0ac62f8418284b Mon Sep 17 00:00:00 2001 From: TurnerSE Date: Sat, 31 Oct 2015 02:48:04 +0100 Subject: [PATCH 1/6] added descriptions for skillpotion in EN and DE --- res/core/de/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/res/core/de/strings.xml b/res/core/de/strings.xml index 1e5dbb034..b5bdce705 100644 --- a/res/core/de/strings.xml +++ b/res/core/de/strings.xml @@ -3648,6 +3648,10 @@ For a healing potion one takes the peel of a windbag and some bugleweed, stirr in some chopped elvendear and sprinkle it with the blossoms of an ice begonia. This has to cook through for four days, while a gapgrowth has to be added on the second day. Then one carefully scoops off the top layer of liquid. One such potion gives four men (or one man four times) a 50% chance to survive otherwise lethal wounds. The potion is automatically used in case of injury. Für einen Heiltrank nehme man die Schale eines Windbeutels und etwas Gurgelkraut, rühre eine kleingehacktes Elfenlieb dazu und bestreue alles mit den Blüten einer Eisblume. Dies muß vier Tage lang gären, wobei man am zweiten Tag einen Spaltwachs dazutun muß. Dann ziehe man vorsichtig den oben schwimmenden Saft ab. Ein solcher Trank gibt vier Männern (oder einem Mann vier mal) im Kampf eine Chance von 50%, sonst tödliche Wunden zu überleben. Der Trank wird von ihnen automatisch bei Verletzung angewandt. + + The creation of this potion is a well kept secret. Some even say, it couldn't be brewed by mere mortals. One thing is certain though, the drinker receives further insight into any learned talents, which furthers their progress towards the mastery of those talents. + Die Herstellung dieses Trunkes ist ein wohlgehütetes Geheimnis. Manche behaupten gar, von Sterblichen könne er gar nicht gebraut werden. Tatsache ist, dass er dem Trinkenden tiefere Einsicht in seine erlernten Talente gewährt, was ihn in der Meisterung dieser Talente voranbringt. + From e149d444c174e6cbe07e5275b6adaba7fc30c187 Mon Sep 17 00:00:00 2001 From: TurnerSE Date: Sat, 31 Oct 2015 04:10:08 +0100 Subject: [PATCH 2/6] expanded existing skillpotion-test to test for existence of description --- src/items/xerewards.test.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/items/xerewards.test.c b/src/items/xerewards.test.c index 5ce7716f3..ddaab85f3 100644 --- a/src/items/xerewards.test.c +++ b/src/items/xerewards.test.c @@ -2,11 +2,16 @@ #include "xerewards.h" +#include #include #include #include #include +#include + +#include + #include #include @@ -18,14 +23,29 @@ static void test_manacrystal(CuTest *tc) { static void test_skillpotion(CuTest *tc) { unit *u; + faction *f; const struct item_type *itype; + const char* pPotionText = NULL; + const char* pDescription = NULL; test_cleanup(); test_create_world(); - u = test_create_unit(test_create_faction(NULL), findregion(0, 0)); + + f = test_create_faction(NULL); + u = test_create_unit(f, findregion(0, 0)); itype = test_create_itemtype("skillpotion"); change_resource(u, itype->rtype, 2); CuAssertIntEquals(tc, 1, use_skillpotion(u, itype, 1, NULL)); + + pPotionText = mkname("potion", "skillpotion"); + CuAssertPtrNotNull(tc, pPotionText); + + pDescription = LOC(f->locale, pPotionText); + CuAssertPtrNotNull(tc, pDescription); + + CuAssert(tc, "Description empty", strlen(pDescription) == 0); + + test_cleanup(); } From c3add85739a243a8a4ed975d6ff9f72bb12344bc Mon Sep 17 00:00:00 2001 From: TurnerSE Date: Sat, 31 Oct 2015 14:37:39 +0100 Subject: [PATCH 3/6] WIP rework of test for description regarding functionality of locales --- src/items/xerewards.test.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/items/xerewards.test.c b/src/items/xerewards.test.c index ddaab85f3..44590bfdc 100644 --- a/src/items/xerewards.test.c +++ b/src/items/xerewards.test.c @@ -9,6 +9,7 @@ #include #include +#include #include @@ -23,16 +24,17 @@ static void test_manacrystal(CuTest *tc) { static void test_skillpotion(CuTest *tc) { unit *u; - faction *f; const struct item_type *itype; + + struct locale* pLang = NULL; const char* pPotionText = NULL; const char* pDescription = NULL; test_cleanup(); test_create_world(); + init_locales(); - f = test_create_faction(NULL); - u = test_create_unit(f, findregion(0, 0)); + u = test_create_unit(test_create_faction(NULL), findregion(0, 0)); itype = test_create_itemtype("skillpotion"); change_resource(u, itype->rtype, 2); CuAssertIntEquals(tc, 1, use_skillpotion(u, itype, 1, NULL)); @@ -40,7 +42,10 @@ static void test_skillpotion(CuTest *tc) { pPotionText = mkname("potion", "skillpotion"); CuAssertPtrNotNull(tc, pPotionText); - pDescription = LOC(f->locale, pPotionText); + pLang = get_locale("de"); + CuAssertPtrNotNull(tc, pLang); + + pDescription = locale_string(pLang, pPotionText, true); CuAssertPtrNotNull(tc, pDescription); CuAssert(tc, "Description empty", strlen(pDescription) == 0); From 486a4b84060532a141b2c68deb1a993b240aacab Mon Sep 17 00:00:00 2001 From: Philipp Dreher Date: Sat, 31 Oct 2015 16:55:59 +0100 Subject: [PATCH 4/6] Revert "WIP rework of test for description regarding functionality of locales" This reverts commit c3add85739a243a8a4ed975d6ff9f72bb12344bc. --- src/items/xerewards.test.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/items/xerewards.test.c b/src/items/xerewards.test.c index 44590bfdc..ddaab85f3 100644 --- a/src/items/xerewards.test.c +++ b/src/items/xerewards.test.c @@ -9,7 +9,6 @@ #include #include -#include #include @@ -24,17 +23,16 @@ static void test_manacrystal(CuTest *tc) { static void test_skillpotion(CuTest *tc) { unit *u; + faction *f; const struct item_type *itype; - - struct locale* pLang = NULL; const char* pPotionText = NULL; const char* pDescription = NULL; test_cleanup(); test_create_world(); - init_locales(); - u = test_create_unit(test_create_faction(NULL), findregion(0, 0)); + f = test_create_faction(NULL); + u = test_create_unit(f, findregion(0, 0)); itype = test_create_itemtype("skillpotion"); change_resource(u, itype->rtype, 2); CuAssertIntEquals(tc, 1, use_skillpotion(u, itype, 1, NULL)); @@ -42,10 +40,7 @@ static void test_skillpotion(CuTest *tc) { pPotionText = mkname("potion", "skillpotion"); CuAssertPtrNotNull(tc, pPotionText); - pLang = get_locale("de"); - CuAssertPtrNotNull(tc, pLang); - - pDescription = locale_string(pLang, pPotionText, true); + pDescription = LOC(f->locale, pPotionText); CuAssertPtrNotNull(tc, pDescription); CuAssert(tc, "Description empty", strlen(pDescription) == 0); From bff5f82be214b658b27dfa6f86ad6cb6a9104c96 Mon Sep 17 00:00:00 2001 From: Philipp Dreher Date: Sat, 31 Oct 2015 16:56:04 +0100 Subject: [PATCH 5/6] Revert "expanded existing skillpotion-test to test for existence of description" This reverts commit e149d444c174e6cbe07e5275b6adaba7fc30c187. --- src/items/xerewards.test.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/items/xerewards.test.c b/src/items/xerewards.test.c index ddaab85f3..5ce7716f3 100644 --- a/src/items/xerewards.test.c +++ b/src/items/xerewards.test.c @@ -2,16 +2,11 @@ #include "xerewards.h" -#include #include #include #include #include -#include - -#include - #include #include @@ -23,29 +18,14 @@ static void test_manacrystal(CuTest *tc) { static void test_skillpotion(CuTest *tc) { unit *u; - faction *f; const struct item_type *itype; - const char* pPotionText = NULL; - const char* pDescription = NULL; test_cleanup(); test_create_world(); - - f = test_create_faction(NULL); - u = test_create_unit(f, findregion(0, 0)); + u = test_create_unit(test_create_faction(NULL), findregion(0, 0)); itype = test_create_itemtype("skillpotion"); change_resource(u, itype->rtype, 2); CuAssertIntEquals(tc, 1, use_skillpotion(u, itype, 1, NULL)); - - pPotionText = mkname("potion", "skillpotion"); - CuAssertPtrNotNull(tc, pPotionText); - - pDescription = LOC(f->locale, pPotionText); - CuAssertPtrNotNull(tc, pDescription); - - CuAssert(tc, "Description empty", strlen(pDescription) == 0); - - test_cleanup(); } From 597aadbac37566aa174e4f61a6a3e4ef27ea44fd Mon Sep 17 00:00:00 2001 From: Philipp Dreher Date: Sat, 31 Oct 2015 17:09:39 +0100 Subject: [PATCH 6/6] small textual corrections --- res/core/de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/core/de/strings.xml b/res/core/de/strings.xml index b5bdce705..cb3ce83f3 100644 --- a/res/core/de/strings.xml +++ b/res/core/de/strings.xml @@ -3649,7 +3649,7 @@ Für einen Heiltrank nehme man die Schale eines Windbeutels und etwas Gurgelkraut, rühre eine kleingehacktes Elfenlieb dazu und bestreue alles mit den Blüten einer Eisblume. Dies muß vier Tage lang gären, wobei man am zweiten Tag einen Spaltwachs dazutun muß. Dann ziehe man vorsichtig den oben schwimmenden Saft ab. Ein solcher Trank gibt vier Männern (oder einem Mann vier mal) im Kampf eine Chance von 50%, sonst tödliche Wunden zu überleben. Der Trank wird von ihnen automatisch bei Verletzung angewandt. - The creation of this potion is a well kept secret. Some even say, it couldn't be brewed by mere mortals. One thing is certain though, the drinker receives further insight into any learned talents, which furthers their progress towards the mastery of those talents. + The recipe of this potion is a well kept secret. Some even say it couldn't be brewed by mere mortals. One thing is certain though, the drinker receives further insight into any learned skills, which furthers their progress towards the mastery of those skills. Die Herstellung dieses Trunkes ist ein wohlgehütetes Geheimnis. Manche behaupten gar, von Sterblichen könne er gar nicht gebraut werden. Tatsache ist, dass er dem Trinkenden tiefere Einsicht in seine erlernten Talente gewährt, was ihn in der Meisterung dieser Talente voranbringt.