forked from github/server
quickfix falsch sortierte messages.
This commit is contained in:
parent
ef32a52524
commit
9e49e7ef47
|
@ -194,7 +194,7 @@ print_curses(FILE * F, void * obj, typ_t typ, attrib *a, int self)
|
|||
header = 1;
|
||||
fputs("EFFECTS\n", F);
|
||||
}
|
||||
fprintf(F, "\"%d %s\"\n", data->value, add_translation(key, locale_string(NULL, key)));
|
||||
fprintf(F, "\"%d %s\"\n", data->value, add_translation(key, locale_string(default_locale, key)));
|
||||
}
|
||||
a = a->next;
|
||||
}
|
||||
|
|
|
@ -1682,13 +1682,13 @@ attack_message(const troop at, const troop dt, const weapon * wp, int dist)
|
|||
if (dist > 1) {
|
||||
sprintf(smallbuf, "%s schießt mit %s auf %s",
|
||||
a_unit,
|
||||
locale_string(NULL, resourcename(wp->type->itype->rtype, GR_INDEFINITE_ARTICLE)), d_unit);
|
||||
locale_string(default_locale, resourcename(wp->type->itype->rtype, GR_INDEFINITE_ARTICLE)), d_unit);
|
||||
return smallbuf;
|
||||
}
|
||||
|
||||
sprintf(smallbuf, "%s schlägt mit %s nach %s",
|
||||
a_unit,
|
||||
locale_string(NULL, resourcename(wp->type->itype->rtype, GR_INDEFINITE_ARTICLE)), d_unit);
|
||||
locale_string(default_locale, resourcename(wp->type->itype->rtype, GR_INDEFINITE_ARTICLE)), d_unit);
|
||||
|
||||
return smallbuf;
|
||||
}
|
||||
|
@ -1731,11 +1731,11 @@ hits(troop at, troop dt, weapon * awp)
|
|||
sprintf(debugbuf, "%.4s/%d [%6s/%d] attackiert %.4s/%d [%6s/%d] mit %d dist %d",
|
||||
unitid(au), at.index,
|
||||
(awp != NULL) ?
|
||||
locale_string(NULL, resourcename(awp->type->itype->rtype, 0)) : "unbewaffnet",
|
||||
locale_string(default_locale, resourcename(awp->type->itype->rtype, 0)) : "unbewaffnet",
|
||||
weapon_effskill(at, dt, awp, true, dist>1),
|
||||
unitid(du), dt.index,
|
||||
(dwp != NULL) ?
|
||||
locale_string(NULL, resourcename(dwp->type->itype->rtype, 0)) : "unbewaffnet",
|
||||
locale_string(default_locale, resourcename(dwp->type->itype->rtype, 0)) : "unbewaffnet",
|
||||
weapon_effskill(dt, at, dwp, true, dist>1),
|
||||
skdiff, dist);
|
||||
if (b->small) {
|
||||
|
@ -2494,7 +2494,7 @@ aftermath(battle * b)
|
|||
for (l=df->loot; l; l=l->next) {
|
||||
const item_type * itype = l->type;
|
||||
sprintf(buf, "%s erbeute%s %d %s.", unitname(du), du->number==1?"t":"n",
|
||||
l->number, locale_string(NULL, resourcename(itype->rtype, l->number!=1)));
|
||||
l->number, locale_string(default_locale, resourcename(itype->rtype, l->number!=1)));
|
||||
fbattlerecord(du->faction, r, buf);
|
||||
i_change(&du->items, itype, l->number);
|
||||
}
|
||||
|
|
|
@ -1340,7 +1340,7 @@ sp_reanimate(fighter * fi, int level, int force, spell * sp)
|
|||
}
|
||||
if (get_item(mage, I_AMULET_OF_HEALING) > 0) {
|
||||
scat(" und benutzt das ");
|
||||
scat(locale_string(NULL, resourcename(oldresourcetype[R_AMULET_OF_HEALING], 0)));
|
||||
scat(locale_string(default_locale, resourcename(oldresourcetype[R_AMULET_OF_HEALING], 0)));
|
||||
scat(", um den Zauber zu verstärken");
|
||||
k *= 2;
|
||||
c += 0.10;
|
||||
|
@ -1421,7 +1421,7 @@ sp_healing(fighter * fi, int level, int force, spell * sp)
|
|||
|
||||
if (get_item(mage, I_AMULET_OF_HEALING) > 0) {
|
||||
scat(" und benutzt das ");
|
||||
scat(locale_string(NULL, resourcename(oldresourcetype[R_AMULET_OF_HEALING], 0)));
|
||||
scat(locale_string(default_locale, resourcename(oldresourcetype[R_AMULET_OF_HEALING], 0)));
|
||||
scat(", um die Heilzauber zu verstärken");
|
||||
healhp *= 2;
|
||||
}
|
||||
|
|
|
@ -1631,9 +1631,9 @@ sail(region * starting_point, unit * u, region * next_point, boolean move_on_lan
|
|||
icat(trans->number);
|
||||
scat(" ");
|
||||
if (itm->number == 1) {
|
||||
scat(locale_string(NULL, resourcename(itm->type->rtype, 0)));
|
||||
scat(locale_string(default_locale, resourcename(itm->type->rtype, 0)));
|
||||
} else {
|
||||
scat(locale_string(NULL, resourcename(itm->type->rtype, NMF_PLURAL)));
|
||||
scat(locale_string(default_locale, resourcename(itm->type->rtype, NMF_PLURAL)));
|
||||
}
|
||||
}
|
||||
scat(" von der ");
|
||||
|
|
|
@ -932,6 +932,7 @@ r_addmessage(struct region * r, const struct faction * viewer, struct message *
|
|||
if (imsg==NULL) {
|
||||
imsg = malloc(sizeof(struct individual_message));
|
||||
imsg->next = r->individual_messages;
|
||||
imsg->msgs = NULL;
|
||||
r->individual_messages = imsg;
|
||||
imsg->viewer = viewer;
|
||||
}
|
||||
|
|
|
@ -420,7 +420,7 @@ caldera_handle(trigger * t, void * data)
|
|||
while (*ip) {
|
||||
item * i = *ip;
|
||||
char zText[10];
|
||||
sprintf(zText, " %d %s", i->number, locale_string(NULL, resourcename(i->type->rtype, i->number!=1)));
|
||||
sprintf(zText, " %d %s", i->number, locale_string(default_locale, resourcename(i->type->rtype, i->number!=1)));
|
||||
strcat(buf, zText);
|
||||
i_remove(ip, i);
|
||||
if (*ip==i) ip=&i->next;
|
||||
|
|
|
@ -38,8 +38,8 @@ struct locale {
|
|||
} * strings[SMAXHASH];
|
||||
};
|
||||
|
||||
locale * default_locale;
|
||||
static locale * locales;
|
||||
static locale * default_locale;
|
||||
|
||||
unsigned int
|
||||
locale_hashkey(const locale * lang)
|
||||
|
|
|
@ -33,4 +33,6 @@ extern void debug_language(const char * log);
|
|||
|
||||
#define LOC(s,l) locale_string(s, l)
|
||||
|
||||
extern locale * default_locale;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
/* util includes */
|
||||
#include "log.h"
|
||||
#include "message.h"
|
||||
#include "language.h"
|
||||
#include "translation.h"
|
||||
|
||||
/* libc includes */
|
||||
|
@ -116,6 +117,6 @@ nr_level(const struct message *msg)
|
|||
const char *
|
||||
nr_section(const struct message *msg)
|
||||
{
|
||||
nrmessage_type * nrt = nrt_find(NULL, msg->type);
|
||||
nrmessage_type * nrt = nrt_find(default_locale, msg->type);
|
||||
return nrt->section;
|
||||
}
|
||||
|
|
|
@ -4059,7 +4059,7 @@
|
|||
</nr>
|
||||
</locale>
|
||||
<locale name="en">
|
||||
<nr section="none">
|
||||
<nr section="events">
|
||||
<text>"$unit($unit) loses $int($dead) of $int($add($live,$dead)) people due to starvation in $region($region)."</text>
|
||||
</nr>
|
||||
</locale>
|
||||
|
@ -5148,7 +5148,7 @@
|
|||
</nr>
|
||||
</locale>
|
||||
<locale name="en">
|
||||
<nr section="none">
|
||||
<nr section="economy">
|
||||
<text>"$unit($unit) earns $int($amount)$if($eq($wanted,$amount),""," of $int($wanted)") in $region($region)."</text>
|
||||
</nr>
|
||||
</locale>
|
||||
|
|
|
@ -74,8 +74,6 @@ unknownunit;de;eine unbekannte Einheit
|
|||
## Meldungssektionen
|
||||
section_events;de;Meldungen und Ereignisse
|
||||
section_errors;de;Warnungen und Fehler
|
||||
section_event_p;de;Meldungen und Ereignisse
|
||||
section_error_p;de;Warnungen und Fehler
|
||||
section_economy;de;Wirtschaft und Handel
|
||||
section_production;de;Rohstoffe und Produktion
|
||||
section_magic;de;Magie und Artefakte
|
||||
|
|
Loading…
Reference in New Issue