xref: /titanic_50/usr/src/cmd/ast/msgcc/NOTES (revision 2df1fe9ca32bb227b9158c67f5c00b54c20b10fd)
12000-04-01 ast message catalog plan
2
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)
7
8    DONE
9
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
15
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
20
21	error_info.id = "foo";
22	error_info.catalog = ERROR_CATALOG;
23
24    undefined references to { USAGE_LICENSE ERROR_CATALOG } are hard
25    compile time errors
26
27    DONE
28
29(3) add catalog argument to libcmd <cmd.h> cmdinit(argv, context, catalog)
30
31    DONE
32
33(4) msgcat global target build msgs/*.mso and $(CATALOG).msg
34    each Makefile will generate one catalog $(CATALOG).msg where
35
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
39
40    $(CATALOG).msg will be the "C" locale
41
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
48
49    see msgadmin(1)
50
51    DONE
52
53(5) once all this is working I'll do catopen(3) and msggen(1)
54
55    DONE
56
57(6) the makerules "all" action will
58	catgen $(CATALOG).cat
59	catgen $(CATALOG)-*.cat
60    and the makerules "install" action will copy the catgen output to
61	$(LOCALEDIR)/$(LOCALE)/LC_MESSAGES/$(CATALOG)*
62    where
63	LOCALEDIR = $(INSTALLROOT)/lib/locale
64
65    NOTE: still under consideration
66