[bind10-dev] internationalization for specification descriptions?

Stephen Morris stephen at isc.org
Mon Oct 18 08:47:08 UTC 2010


On 18 Oct 2010, at 08:21, Jelte Jansen wrote:

> We would also want support for basic substitution, in a log message you'd use
> "%error.file_not_found%", filename where the stringbundle definition for en-US
> contains:
> error.file_not_found "File %s not found"
> 
> (actually, I'd need to check but I would expect a logging framework to have
> support for this already)

Didn't we discuss this at the last BIND-10 meeting?  I thought that we'd decided to use something like this in the logging framework, but would also supply a default message if the stringbundle/message file could not be found, e.g.

   log(AUTH_FNF, "file %s not found", db_file);

... which would output something like:

AUTH_FNF, file /var/temp/db001.db not found

... if the message were not found, or a local language equivalent if it were.  In all cases the identification (in this case, AUTH_FNF) would remain unchanged and be used by support to look up the cause of the error in a (to be supplied) message manual.

Incidentally, Jelte's example above raises a question: should the message definition include a severity for the message, or should the message be severity-neutral and the programmer decide what severity is logged.  In other words, do we want:

log(AUTH_FNF, "file %s not found", db_file) to produce something like "AUTH_FNF - Error: file /var/temp/db001.db not found"

... or should we have:

log_error(AUTH_FNF, "file %s not found", db_file) producing "AUTH_FNF - Error: file /var/temp/db001.db not found"
log_info(AUTH_FNF, "file %s not found", db_file) producing "AUTH_FNF - Info: file /var/temp/db001.db not found"


Stephen


More information about the bind10-dev mailing list