diff options
Diffstat (limited to 'docs/i18n/EventSourceGenerator')
-rw-r--r-- | docs/i18n/EventSourceGenerator | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/docs/i18n/EventSourceGenerator b/docs/i18n/EventSourceGenerator new file mode 100644 index 0000000..79e79b2 --- /dev/null +++ b/docs/i18n/EventSourceGenerator @@ -0,0 +1,40 @@ +Idea: +- the master is gettext, a logger and a set of category, message ids in a + header file +- produce an .mc file from it, which can be used in the event logger + application as message/category DLL +- maybe its awk/sed in the beginning + +Links: +- members.tripod.com/~ashimg/Parser.html +- cscope +- mcpp_lib + +we must find all wolf_log calls in a given set of source files (in this case +libwolf.dll), later we also need a merger for at least wolfmsg.mc and app.mc + +foreach call to wolf_log we get: +- wolf level: must be mapped to 'Severity' +- the category_id (is passed in ReportEvent directly, we don't need it to + generate the MC file, also the categories and their names are few and + change not too often, so we hard-code them) +- message_id (we need it here expanded) + - the Severity, the Facility and the message_id form the 'MessageId' +- _( ) format string or message: this is the msgid in gettext and gets + the English version in the MC file +- for each msgid we must search for the msgstr in the corresponding gettext + file and map it to the right language +- The 'SymbolicName' is tricky: we need the define from log/messages.h, + unexpanded + +1) Easy way to find all calls of wolf_log with macros correctly expanded +find . -name '*.c' -exec cat {} \; | mcpp -DLINUX + -DOS_MAJOR_VERSION=2 -DOS_MINOR_VERSION=6 -DENABLE_NLS=1 -I. -I +- /usr/lib/gcc/i686-pc-linux-gnu/4.3.3/include -I../include/wolf | grep +- / wolf_log\( + +2) The logger must map the messageid correcly (masks) + +3) Sort out the problems with message.dll installation and the registry in + the event source + |