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