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