more french shit...

This commit is contained in:
Enno Rehling 2003-05-13 15:43:18 +00:00
parent 43bc1a5720
commit ee0a9163c8
5 changed files with 18 additions and 41 deletions

View File

@ -2045,45 +2045,6 @@ kernel_done(void)
if (sqlstream!=NULL) sql_done(); if (sqlstream!=NULL) sql_done();
} }
static void
read_strings(FILE * F)
{
char rbuf[8192];
while (fgets(rbuf, sizeof(rbuf), F)) {
char * b = rbuf;
struct locale * lang;
char * key = b;
char * language;
const char * k;
if (rbuf[0]=='#') continue;
rbuf[strlen(rbuf)-1] = 0; /* \n weg */
while (*b && *b!=';') ++b;
if (!*b) continue;
*b++ = 0;
language = b;
while (*b && *b!=';') ++b;
*b++ = 0;
lang = find_locale(language);
if (!lang) lang = make_locale(language);
k = locale_getstring(lang, key);
if (k) {
log_warning(("Trying to register %s[%s]=\"%s\", already have \"%s\"\n", key, language, k, b));
} else locale_setstring(lang, key, b);
}
}
const char * messages[] = {
"%s/%s/strings.xml",
"%s/%s/messages.xml",
NULL
};
const char * strings[] = {
"%s/%s/strings.txt",
NULL
};
const char * localenames[] = { const char * localenames[] = {
"de", "en", "fr", "de", "en", "fr",
NULL NULL
@ -2399,12 +2360,11 @@ void
remove_empty_units_in_region(region *r) remove_empty_units_in_region(region *r)
{ {
unit **up = &r->units; unit **up = &r->units;
while (*up) { while (*up) {
unit * u = *up; unit * u = *up;
#ifdef MAXAGE #ifdef MAXAGE
faction * f = u->faction; faction * f = u->faction;
if (f->age > MAXAGE) set_number(u, 0); if (!fval(f, FFL_NOTIMEOUT) && f->age > MAXAGE) set_number(u, 0);
#endif #endif
if ((u->number <= 0 && u->race != new_race[RC_SPELL]) if ((u->number <= 0 && u->race != new_race[RC_SPELL])
|| (u->age <= 0 && u->race == new_race[RC_SPELL]) || (u->age <= 0 && u->race == new_race[RC_SPELL])

View File

@ -913,6 +913,8 @@ typedef struct strlist {
#define FFL_OVERRIDE (1<<27) /* Override-Passwort wurde benutzt */ #define FFL_OVERRIDE (1<<27) /* Override-Passwort wurde benutzt */
#define FFL_DBENTRY (1<<28) /* Partei ist in Datenbank eingetragen */ #define FFL_DBENTRY (1<<28) /* Partei ist in Datenbank eingetragen */
#define FFL_NOTIMEOUT (1<<29) /* ignore MAXAGE */
#define UFL_WERE (1<<28) #define UFL_WERE (1<<28)
/* Flags, die gespeichert werden sollen: */ /* Flags, die gespeichert werden sollen: */

View File

@ -185,6 +185,17 @@ convert_orders(void)
return 0; return 0;
} }
void
french_testers(void)
{
faction * f = factions;
const struct locale * french = find_locale("fr");
while (f!=NULL) {
if (f->locale==french) fset(f, FFL_NOTIMEOUT);
f = f->next;
}
}
static void static void
verify_owners(boolean bOnce) verify_owners(boolean bOnce)
{ {
@ -2781,6 +2792,7 @@ give_cammo(void)
void void
korrektur(void) korrektur(void)
{ {
french_testers();
#if TEST_LOCALES #if TEST_LOCALES
setup_locales(); setup_locales();
#endif #endif

View File

@ -7402,6 +7402,7 @@
<arg name="product" type="resource"></arg> <arg name="product" type="resource"></arg>
</type> </type>
<text locale="de">"Auf dem Markt wird für $resource($product,0) $int($price) Silber verlangt."</text> <text locale="de">"Auf dem Markt wird für $resource($product,0) $int($price) Silber verlangt."</text>
<text locale="fr">"Le marché local offre la $resource($product,0) au prix de $int($price) écus."</text>
<text locale="en">"The local market offers $resource($product,0) at a price of $int($price) silver."</text> <text locale="en">"The local market offers $resource($product,0) at a price of $int($price) silver."</text>
</message> </message>

View File

@ -1587,6 +1587,7 @@
<text locale="fr">METAMORPHOSE</text> <text locale="fr">METAMORPHOSE</text>
</string> </string>
<namespace name="race">
<string name="Adler"> <string name="Adler">
<text locale="fr">aigle</text> <text locale="fr">aigle</text>
</string> </string>
@ -1842,6 +1843,7 @@
<string name="Illusion"> <string name="Illusion">
<text locale="fr">illusion</text> <text locale="fr">illusion</text>
</string> </string>
</namespace>
<comment> NR generieren</comment> <comment> NR generieren</comment>
<string name="nr_options"> <string name="nr_options">