diff --git a/ChangeLog b/ChangeLog index 71ae1265..a0783d77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,13 @@ $Id$ v0.71.6 02-Sep-2005 + upgrade: + In mbsetup menu 8.2 remove the Italian language. + In /opt/mbse "rm -rf italian". + In /opt/mbse/etc "rm italian.lang". + Or keep it, but you need to take care of updating this language + yourself. + general: Due to lack of maintainers italian language support is dropped. @@ -17,6 +24,10 @@ v0.71.6 02-Sep-2005 Removed some debug logging. Added leading zeros for generated msgid's. + mbsetup: + Removed Italian default record. Rewrote code to create default + language records. + v0.71.5 18-Aug-2005 - 02-Sep-2005 diff --git a/html/basic.html.in b/html/basic.html.in index e92bb02a..054c5e0f 100644 --- a/html/basic.html.in +++ b/html/basic.html.in @@ -14,7 +14,7 @@
-
Last update 03-Seo-2005
+
Last update 09-Seo-2005

MBSE BBS Basic Installation

Introduction.

@@ -60,9 +60,6 @@ layout looks like this:
/opt/mbse/home 0770 Users homedirectories /opt/mbse/home/bbs 0770 Newuser account /opt/mbse/html 0755 HTML documentation -/opt/mbse/italian/macro 0750 Italian macro files -/opt/mbse/italian/menus 0750 Italian menu files -/opt/mbse/italian/txtfiles 0770 Italian ANSI files /opt/mbse/log 0770 MBSE BBS logfiles /opt/mbse/share/doc 0750 Generated sitedocs /opt/mbse/share/doc/html 0750 Generated html sitedocs @@ -73,7 +70,6 @@ layout looks like this:
/opt/mbse/share/int/es 0750 Spanish /opt/mbse/share/int/fr 0750 French /opt/mbse/share/int/gl 0750 Galacian -/opt/mbse/share/int/it 0750 Italian /opt/mbse/share/int/nl 0750 Dutch /opt/mbse/spanish/macro 0750 Spanish macro files /opt/mbse/spanish/menus 0750 Spanish menu files diff --git a/html/setup/language.html b/html/setup/language.html index 240b9e3a..3752dad6 100644 --- a/html/setup/language.html +++ b/html/setup/language.html @@ -14,7 +14,7 @@
-
Last update 09-Nov-2003
+
Last update 09-Sep-2005

MBSE BBS Setup - BBS Setup - Language Setup.

Language introduction.

@@ -28,7 +28,7 @@ present in your local language, the BBS will fall back to the default language. It is therefore wise to name all menus, macro templates and textfiles the same for all languages used. When you setup the languages for the first time, entries for English, Dutch, -Spanish, Galego, Italian and German languages are created. +Spanish, Galego, German, French and Chinese languages are created.

 

Language setup.

diff --git a/mbsetup/m_lang.c b/mbsetup/m_lang.c index f532cde3..0bfd0dce 100644 --- a/mbsetup/m_lang.c +++ b/mbsetup/m_lang.c @@ -42,110 +42,64 @@ int LangUpdated = 0; +void AddLang(char *, char *, char *, FILE *); +void AddLang(char *Name, char *Key, char *Path, FILE *fil) +{ + memset(&lang, 0, sizeof(lang)); + snprintf(lang.Name, 30, "%s", Name); + snprintf(lang.LangKey, 2, "%s", Key); + snprintf(lang.MenuPath, 81, "%s/%s/menus", getenv("MBSE_ROOT"), Path); + snprintf(lang.TextPath, 81, "%s/%s/txtfiles", getenv("MBSE_ROOT"), Path); + snprintf(lang.MacroPath, 81, "%s/%s/macro", getenv("MBSE_ROOT"), Path); + snprintf(lang.Filename, 81, "%s.lang", Path); + lang.Available = TRUE; + fwrite(&lang, sizeof(lang), 1, fil); +} + + + /* * Count nr of lang records in the database. * Creates the database if it doesn't exist. */ int CountLanguage(void) { - FILE *fil; - char ffile[PATH_MAX]; - int count; + FILE *fil; + char ffile[PATH_MAX]; + int count = 0; - snprintf(ffile, PATH_MAX, "%s/etc/language.data", getenv("MBSE_ROOT")); - if ((fil = fopen(ffile, "r")) == NULL) { - if ((fil = fopen(ffile, "a+")) != NULL) { - Syslog('+', "Created new %s", ffile); - langhdr.hdrsize = sizeof(langhdr); - langhdr.recsize = sizeof(lang); - fwrite(&langhdr, sizeof(langhdr), 1, fil); + snprintf(ffile, PATH_MAX, "%s/etc/language.data", getenv("MBSE_ROOT")); + if ((fil = fopen(ffile, "r")) == NULL) { + if ((fil = fopen(ffile, "a+")) != NULL) { + Syslog('+', "Created new %s", ffile); + langhdr.hdrsize = sizeof(langhdr); + langhdr.recsize = sizeof(lang); + fwrite(&langhdr, sizeof(langhdr), 1, fil); - /* - * Setup default records - */ - memset(&lang, 0, sizeof(lang)); - snprintf(lang.Name, 30, "English"); - snprintf(lang.LangKey, 2, "E"); - snprintf(lang.MenuPath, 81, "%s/english/menus", getenv("MBSE_ROOT")); - snprintf(lang.TextPath, 81, "%s/english/txtfiles", getenv("MBSE_ROOT")); - snprintf(lang.MacroPath, 81, "%s/english/macro", getenv("MBSE_ROOT")); - snprintf(lang.Filename, 81, "english.lang"); - lang.Available = TRUE; - fwrite(&lang, sizeof(lang), 1, fil); + /* + * Setup default records + */ + AddLang((char *)"English", (char *)"E", (char *)"english", fil); count++; + AddLang((char *)"Nederlands", (char *)"N", (char *)"dutch", fil); count++; + AddLang((char *)"Spanish", (char *)"S", (char *)"spanish", fil); count++; + AddLang((char *)"Galego", (char *)"G", (char *)"galego", fil); count++; + AddLang((char *)"Deutsch", (char *)"D", (char *)"german", fil); count++; + AddLang((char *)"French", (char *)"F", (char *)"french", fil); count++; + AddLang((char *)"Chinese", (char *)"C", (char *)"chinese", fil); count++; + + fclose(fil); + chmod(ffile, 0640); + return count; + } else + return -1; + } - memset(&lang, 0, sizeof(lang)); - snprintf(lang.Name, 30, "Nederlands"); - snprintf(lang.LangKey, 2, "N"); - snprintf(lang.MenuPath, 81, "%s/dutch/menus", getenv("MBSE_ROOT")); - snprintf(lang.TextPath, 81, "%s/dutch/txtfiles", getenv("MBSE_ROOT")); - snprintf(lang.MacroPath, 81, "%s/dutch/macro", getenv("MBSE_ROOT")); - snprintf(lang.Filename, 81, "dutch.lang"); - lang.Available = TRUE; - fwrite(&lang, sizeof(lang), 1, fil); + fread(&langhdr, sizeof(langhdr), 1, fil); + fseek(fil, 0, SEEK_END); + count = (ftell(fil) - langhdr.hdrsize) / langhdr.recsize; + fclose(fil); - memset(&lang, 0, sizeof(lang)); - snprintf(lang.Name, 30, "Spanish"); - snprintf(lang.LangKey, 2, "S"); - snprintf(lang.MenuPath, 81, "%s/spanish/menus", getenv("MBSE_ROOT")); - snprintf(lang.TextPath, 81, "%s/spanish/txtfiles", getenv("MBSE_ROOT")); - snprintf(lang.MacroPath, 81, "%s/spanish/macro", getenv("MBSE_ROOT")); - snprintf(lang.Filename, 81, "spanish.lang"); - lang.Available = TRUE; - fwrite(&lang, sizeof(lang), 1, fil); - - memset(&lang, 0, sizeof(lang)); - snprintf(lang.Name, 30, "Galego"); - snprintf(lang.LangKey, 2, "G"); - snprintf(lang.MenuPath, 81, "%s/galego/menus", getenv("MBSE_ROOT")); - snprintf(lang.TextPath, 81, "%s/galego/txtfiles", getenv("MBSE_ROOT")); - snprintf(lang.MacroPath, 81, "%s/galego/macro", getenv("MBSE_ROOT")); - snprintf(lang.Filename, 81, "galego.lang"); - lang.Available = TRUE; - fwrite(&lang, sizeof(lang), 1, fil); - - memset(&lang, 0, sizeof(lang)); - snprintf(lang.Name, 30, "Deutsch"); - snprintf(lang.LangKey, 2, "D"); - snprintf(lang.MenuPath, 81, "%s/german/menus", getenv("MBSE_ROOT")); - snprintf(lang.TextPath, 81, "%s/german/txtfiles", getenv("MBSE_ROOT")); - snprintf(lang.MacroPath, 81, "%s/german/macro", getenv("MBSE_ROOT")); - snprintf(lang.Filename, 81, "german.lang"); - lang.Available = TRUE; - fwrite(&lang, sizeof(lang), 1, fil); - - memset(&lang, 0, sizeof(lang)); - snprintf(lang.Name, 30, "French"); - snprintf(lang.LangKey, 2, "F"); - snprintf(lang.MenuPath, 81, "%s/french/menus", getenv("MBSE_ROOT")); - snprintf(lang.TextPath, 81, "%s/french/txtfiles", getenv("MBSE_ROOT")); - snprintf(lang.MacroPath, 81, "%s/french/macro", getenv("MBSE_ROOT")); - snprintf(lang.Filename, 81, "french.lang"); - lang.Available = TRUE; - fwrite(&lang, sizeof(lang), 1, fil); - - memset(&lang, 0, sizeof(lang)); - snprintf(lang.Name, 30, "Chinese"); - snprintf(lang.LangKey, 2, "C"); - snprintf(lang.MenuPath, 81, "%s/chinese/menus", getenv("MBSE_ROOT")); - snprintf(lang.TextPath, 81, "%s/chinese/txtfiles", getenv("MBSE_ROOT")); - snprintf(lang.MacroPath, 81, "%s/chinese/macro", getenv("MBSE_ROOT")); - snprintf(lang.Filename, 81, "chinese.lang"); - lang.Available = TRUE; - fwrite(&lang, sizeof(lang), 1, fil); - - fclose(fil); - chmod(ffile, 0640); - return 5; - } else - return -1; - } - - fread(&langhdr, sizeof(langhdr), 1, fil); - fseek(fil, 0, SEEK_END); - count = (ftell(fil) - langhdr.hdrsize) / langhdr.recsize; - fclose(fil); - - return count; + return count; }