PROPHET/OS
NAME
langtable: the message tables of the kernel out of the language files
SYNOPSIS
langtable <folder> <lang.h> <lang.c> [default]|selbsttest
DESCRIPTION
The message tables of the kernel out of the language files
One JSON file per language in <folder>, every one an object of keys and texts. Out of them come an enumeration, lang.h, and one table per language, lang.c. English leads: its keys give the order and the names MSG_<KEY>, a key another language lacks falls back to English and is counted, and a placeholder {n:u} that differs between two languages, or a key English does not know, stops it. default is the language the kernel speaks before it has read its configuration, en if none is named.
It is what tools/lang.py did, and the build holds the two against each other byte for byte on every run (R10-SELF-07). A key that stands twice in one file is refused.
selbsttest writes two languages and a third with a placeholder of another kind under /temp/langtable, holds the tables against the bytes they have to be and sees the third refused. It is what shell.the_message_tables_are_written_byte_for_byte drives.
EXAMPLE
$ langtable --help langtable <folder> <lang.h> <lang.c> [default]|selbsttest the message tables of the kernel out of <folder>/*.json default the language the kernel speaks first, en if none