From bad4eb62889cee4eb5d2dbf9636b7ba9301cca31 Mon Sep 17 00:00:00 2001 From: david <> Date: Fri, 17 May 2002 23:22:01 +0000 Subject: [PATCH] move conf file into the right directory in cvs, update Config.py to look in the right place (will have to change to /etc/lampadas.conf later) also some additions to the documentation --- LDP/lampadas/{pylib => conf}/lampadas.conf | 0 LDP/lampadas/pylib/Config.py | 2 +- LDP/lampadas/pylib/HTML.py | 9 +++------ LDP/lampadas/pylib/doc/Lampadas.wt | 18 ++++++++---------- 4 files changed, 12 insertions(+), 17 deletions(-) rename LDP/lampadas/{pylib => conf}/lampadas.conf (100%) diff --git a/LDP/lampadas/pylib/lampadas.conf b/LDP/lampadas/conf/lampadas.conf similarity index 100% rename from LDP/lampadas/pylib/lampadas.conf rename to LDP/lampadas/conf/lampadas.conf diff --git a/LDP/lampadas/pylib/Config.py b/LDP/lampadas/pylib/Config.py index ffde9af8..0ba56d2f 100755 --- a/LDP/lampadas/pylib/Config.py +++ b/LDP/lampadas/pylib/Config.py @@ -27,7 +27,7 @@ class Config: import ConfigParser self.config = ConfigParser.ConfigParser() - self.config.readfp(open('lampadas.conf')) + self.config.readfp(open('../conf/lampadas.conf')) if not self.config.has_section('DB') : raise ConfigFileReadErrorException("File 'lampadas.conf' is missing or does not contain a '[DB]' section") diff --git a/LDP/lampadas/pylib/HTML.py b/LDP/lampadas/pylib/HTML.py index 4d2b18aa..208eda31 100755 --- a/LDP/lampadas/pylib/HTML.py +++ b/LDP/lampadas/pylib/HTML.py @@ -38,11 +38,6 @@ class HTMLFactory: class PageFactory: def __call__(self, key, lang): - page = L.Strings['tpl-default'].I18n[lang].Text - page = page.replace('|header|', L.Strings['header'].I18n[lang].Text) - page = page.replace('|footer|', L.Strings['footer'].I18n[lang].Text) - - if key[:4] == 'doc/': docid = int(key[4:]) Doc = L.Docs[docid] @@ -61,11 +56,13 @@ class PageFactory: return "FORMAT NOT YET SUPPORTED" else: + page = L.Strings['tpl-default'].I18n[lang].Text + page = page.replace('|header|', L.Strings['header'].I18n[lang].Text) + page = page.replace('|footer|', L.Strings['footer'].I18n[lang].Text) page = page.replace('|body|', L.Strings[key].I18n[lang].Text) return page - # ComboFactory class ComboFactory: diff --git a/LDP/lampadas/pylib/doc/Lampadas.wt b/LDP/lampadas/pylib/doc/Lampadas.wt index d1e76cc7..db44ea04 100644 --- a/LDP/lampadas/pylib/doc/Lampadas.wt +++ b/LDP/lampadas/pylib/doc/Lampadas.wt @@ -69,21 +69,19 @@ then the AutoMirror module handles it. Mirror is intended to download files via the HTTP or FTP protocols. -*Website - -The Website module generates complete web pages for serving over HTTP to web browsers. -It makes extensive use of the HTML library, which provides the primitives it -needs to build the pages. - -Content of the pages themselves is held in the database, to support online editing of -page content by system administrators, and also to support internationalization. - *HTML The HTML module generates HTML primitives, such as comboboxes, that are used to make up the web pages. HTML generation methods require the caller to specify the desired language as a two-character ISO code. +It also generates complete web pages for serving over HTTP to web browsers. +The content of the pages themselves is held in the database, to support online editing of +page content by system administrators, and also to support internationalization. + +There is a templating system for the web pages and their text strings, which is +explained in the I18n section. + *Converter The Converter module knows how to take documents in various formats and convert them @@ -120,7 +118,7 @@ on top of the DataLayer which implement specific functionality. Each of these ca be consider an "extension" of the system, and any number of them could be constructed. -=Internationalization= +=Internationalization|i18n= Internationalization, or i18n for short, means support for multiple languages. Localization, or l10n for short, is the process of adding the translations for a particular