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