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