From 60497da87b74c4228523e63d927c741abafa2d67 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 7 Feb 2017 20:50:07 +0100 Subject: [PATCH] print error message when missing parameter translation. --- src/kernel/xmlreader.c | 3 +-- src/util/language.c | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/kernel/xmlreader.c b/src/kernel/xmlreader.c index cd3331517..6491daf20 100644 --- a/src/kernel/xmlreader.c +++ b/src/kernel/xmlreader.c @@ -359,7 +359,6 @@ static int parse_calendar(xmlDocPtr doc) xmlXPathObjectPtr xpathCalendars; xmlNodeSetPtr nsetCalendars; - /* reading eressea/buildings/building */ xpathCalendars = xmlXPathEvalExpression(BAD_CAST "/eressea/calendar", xpath); nsetCalendars = xpathCalendars->nodesetval; months_per_year = 0; @@ -374,7 +373,7 @@ static int parse_calendar(xmlDocPtr doc) xmlChar *start; start = xmlGetProp(calendar, BAD_CAST "start"); - if (start && config_get("game.start")==NULL) { + if (start && config_get("game.start") == NULL) { config_set("game.start", (const char *)start); xmlFree(start); } diff --git a/src/util/language.c b/src/util/language.c index 300e69103..0de04be71 100644 --- a/src/util/language.c +++ b/src/util/language.c @@ -300,6 +300,9 @@ void init_translations(const struct locale *lang, int ut, const char * (*string_ struct critbit_tree ** cb = (struct critbit_tree **)tokens; add_translation(cb, key, i); } + else { + log_error("no translation for %s in locale %s", s, lang->name); + } } } }