From 91357b3adcbae9e9d923170f25f843973a169d98 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 24 Jun 2005 19:43:35 +0000 Subject: [PATCH] plural/singular bei resourcenamen vertauscht. warum meldet sowas keiner? --- src/common/kernel/item.c | 12 ++++++------ src/common/kernel/magic.c | 11 ++++------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/common/kernel/item.c b/src/common/kernel/item.c index c0c380288..b2e528ae7 100644 --- a/src/common/kernel/item.c +++ b/src/common/kernel/item.c @@ -2372,22 +2372,22 @@ attrib_type at_resourcelimit = { }; const char* -resname(resource_t res, int index) +resname(resource_t res, int plural) { const item_type * itype = resource2item(oldresourcetype[res]); if (itype!=NULL) { return locale_string(NULL, resourcename(oldresourcetype[res], index)); } else if (res == R_AURA) { - return index==1?"aura":"aura_p"; + return index?"aura_p":"aura"; } else if (res == R_PERMAURA) { - return index==1?"permaura":"permaura_p"; + return index?"permaura_p":"permaura"; } else if (res == R_PEASANTS) { - return index==1?"peasant":"peasant_p"; + return index?"peasant_p":"peasant"; } else if (res == R_UNIT) { - return index==1?"unit":"unit_p"; + return index?"unit_p":"unit"; } else if (res == R_HITPOINTS) { - return index==1?"hp":"hp_p"; + return index?"hp_p":"hp"; } return NULL; } diff --git a/src/common/kernel/magic.c b/src/common/kernel/magic.c index 9b08e7893..3c4304db1 100644 --- a/src/common/kernel/magic.c +++ b/src/common/kernel/magic.c @@ -946,17 +946,14 @@ cancast(unit * u, spell * sp, int level, int range, struct order * ord) * Meldung weiter zusammen */ scat(", "); icat(itemanz); - scat(locale_string(u->faction->locale, - resname(res, (itemanz == 1 ? 0 : 1)))); + scat(LOC(u->faction->locale, resname(res, itemanz!=1))); } else { /* Noch fehlte keine Komponente, wir generieren den Anfang der * Fehlermeldung */ - sprintf(buf, "%s in %s: 'ZAUBER %s' Für diesen Zauber fehlen " + sprintf(buf, "%s in %s: 'ZAUBER %s' - Für diesen Zauber fehlen " "noch %d ", unitname(u), regionname(u->region, u->faction), - spell_name(sp, u->faction->locale), - itemanz); - scat(locale_string(u->faction->locale, - resname(res, (itemanz == 1 ? 0 : 1)))); + spell_name(sp, u->faction->locale), itemanz); + scat(LOC(u->faction->locale, resname(res, itemanz!=1))); b = false; } }