1 2000-04-01 ast message catalog plan
3 (1) error_info.dictionary should be error_info.catalog
4 to match xopen and the internal naming in our implementation
5 and also to more closely match the webster definition
6 (catalog == enumerated list)
10 (2) nmake by default will
11 CATALOG = $(ID:N=+([A-Za-z0-9_]):?$(PWD:N=*/lib/*:Y,lib,,)$(ID)?$(PWD:B)?)
12 ERROR_CATALOG == "$(CATALOG)"
13 e.g., commands in src/cmd/std will use the "std" catalog; all of the
14 commands in src/lib/libcmd will use the "libcmd" catalog
16 nmake will add "[--catalog?$(CATALOG)]" to USAGE_LICENSE
17 optget() will set error_info.catalog if not defined on the first call
18 commands that don't emit messages before optget() need not change
19 otherwise the command should
21 error_info.id = "foo";
22 error_info.catalog = ERROR_CATALOG;
24 undefined references to { USAGE_LICENSE ERROR_CATALOG } are hard
29 (3) add catalog argument to libcmd <cmd.h> cmdinit(argv, context, catalog)
33 (4) msgcat global target build msgs/*.mso and $(CATALOG).msg
34 each Makefile will generate one catalog $(CATALOG).msg where
36 the *.msg files are weird -- we need to build them viewed over an
37 architecture specific tree, even though they will be eventually used
38 as architecture independent source
40 $(CATALOG).msg will be the "C" locale
42 debug will be a debugging locale that will translate each message to
43 (CATALOG-NAME:MESSAGE-INDEX)\n
44 this will make it easy to locate text that escaped translation (in what
45 should be translated output); it will also be a way for us to do
46 regression tests in the face of typo fixes -- presumably typos can be
47 fixed without changing the message index
53 (5) once all this is working I'll do catopen(3) and msggen(1)
57 (6) the makerules "all" action will
59 catgen $(CATALOG)-*.cat
60 and the makerules "install" action will copy the catgen output to
61 $(LOCALEDIR)/$(LOCALE)/LC_MESSAGES/$(CATALOG)*
63 LOCALEDIR = $(INSTALLROOT)/lib/locale
65 NOTE: still under consideration