XErrorDB in a modular world

Alan Coopersmith Alan.Coopersmith at Sun.COM
Mon Jun 6 09:37:13 PDT 2005


Jim Gettys wrote:
> On Sun, 2005-06-05 at 13:04 -0700, Alan Coopersmith wrote:
>>What if XErrorDB as a single file was replaced with a directory
>>in which each extension installs it's own file as part of it's
>>protocol module and the original XErrorDB was used for just the
>>X11 core protocol entries?
> 
> I worry a bit about startup time for this solution.

Does XErrorDB need to be read at startup or when the first error
message is issued?   (Which for most apps should hopefully be never.)

> The other issue we should think about more seriously is the I18N support
> of this facility; error messages should be able to be localized.

Right - I thought about that as well as long as we're changing the code.
For most of XErrorDB, localization doesn't make sense - it's just a
mapping of request & error codes to the protocol names, and localizing
those would just make it harder to figure out what's going on.   There
are some text messages in there that should be localized though, but
only for a few

I was thinking the lookup path for messages for each extension/protocol
would be something like:
	<prefix>/lib/X11/ErrorDB/<language>/<extension>
	<prefix>/lib/X11/ErrorDB/C/<extension>

And what's now XErrorDB would become <prefix>/lib/X11/ErrorDB/C/X11
(possibly with a symlink to that left for minimal backwards 
compatibility with any clients linked with old libX11's).

(I know some of the desktops today prefer the model of having all the
  localized versions in one file, instead of per-locale files.   I've
  always preferred the per-locale versions, since it's easier to add
  new locales after the fact.   Does anyone have strong preferences
  one way or another?)

I thought I read XCB would use XML protocol description files, so 
perhaps eventually these can be generated from those at build time.

-- 
	-Alan Coopersmith-           alan.coopersmith at sun.com
	 Sun Microsystems, Inc. - X Window System Engineering


More information about the xorg-modular mailing list