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