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();
}
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[] = {
"de", "en", "fr",
NULL
@ -2399,12 +2360,11 @@ void
remove_empty_units_in_region(region *r)
{
unit **up = &r->units;
while (*up) {
unit * u = *up;
#ifdef MAXAGE
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
if ((u->number <= 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_DBENTRY (1<<28) /* Partei ist in Datenbank eingetragen */
#define FFL_NOTIMEOUT (1<<29) /* ignore MAXAGE */
#define UFL_WERE (1<<28)
/* Flags, die gespeichert werden sollen: */

View File

@ -185,6 +185,17 @@ convert_orders(void)
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
verify_owners(boolean bOnce)
{
@ -2781,6 +2792,7 @@ give_cammo(void)
void
korrektur(void)
{
french_testers();
#if TEST_LOCALES
setup_locales();
#endif

View File

@ -7402,6 +7402,7 @@
<arg name="product" type="resource"></arg>
</type>
<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>
</message>

View File

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