You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Stanley Gambarin <st...@cs.bu.edu> on 1997/07/21 18:54:31 UTC

major feature request (2.0)

	This is a long message regarding a feature request for 2.0.  As
always, any feedback is appreciated.  Any flames are not to be sent to the
above email address :)

	Current design of the apache web server provides for a lot of the
hardwired strings (especially for error reporting and logging).  This 
implementation makes it extremely difficult to alter the strings if the 
different set of error and/or log messages is required.  In particular, 
it involves going through a code and altering all messages to a new 
desired ones.  
	Win32 and most (all?) Un*x platforms provide a facility by which
an external message archive can be stored and maintained separately from
the underlying source code.  On Win32 platforms a resource file can 
contain a "StringTable", while on Un*x platforms, an NLS message catalog
can be used instead.  
	The advantages of using a separate message catalog are many:
a. allow for segregation of the source code and the user interface (in
	the form of error and log messages)
b. allow for easier customization of the aforementioned messages to better
	suit the needs of the webmasters.
c. (important): apache is targeted as a web server for the global	
	community and not only English-speaking ones.  Above design would
	provide for catalogs in different languages, not limiting
	web persons (PC ?)  to acquire the advanced knowledge of English
	language before they are able to understand what is wrong with
	their server.

Design:
	- a message catalog should be compiled separately and loaded at
runtime (an attached source file provides functions for accessing the
catalog)
	- if a catalog can not be found/used/not supported, a default 
set of the messages is used (in English for now).
	- a cost of 1 extra function call is incurred per each log/error
reporting transaction, which is not a big deal (i think), since it is
not used as much, and benefits would outweigh the extra function call.
	- a change would require by which all function calls that have
a hardcoded message string in them, would have to be replaced by 
	get_res_string(ID), where ID is an identifier (defined in .h 
file), which maps numbers to messages.  A code below should be further
abstracted to allow call to LoadString() for Win32 platforms.  Attached
is a simple message catalog, a .c file with functions .h file and a simple
Perl script to generate header, message catalog and default message
structure from a file of messages.
						Stanley.


/* on linux, name this file 1.msg, then gencat 1.cat 1.msg */

$set 1 test
1 Hello world\n
10 bye bye birdie\n
23 yahoo\n
29 blah\n

Re: major feature request (2.0)

Posted by Brian Behlendorf <br...@organic.com>.
At 12:54 PM 7/21/97 -0400, you wrote:
>	Win32 and most (all?) Un*x platforms provide a facility by which
>an external message archive can be stored and maintained separately from
>the underlying source code.  

Strong +1 on that, for 2.0.

	Brian


--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
"Why not?" - TL           brian@organic.com - hyperreal.org - apache.org