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