getopts --man lists getopts details
note that you can get the usage string for any ast command/script by (ksh here)
ksh '--??usage' 2>&1 | fmt -o
where fmt is the ast fmt and -o formats usage strings
without fmt -o the usage string will most likely contain little or no newlines
use $'...' for the usage string
this will properly handle the \b...\b etc. modifiers
then use '--??keys' to get the l10n strings for the man page
common strings and most getopts syntax will be filtered out
for easier translation
the common strings like NAME DESCRIPTION are in the ast catalog
'--??keys' output in combination with ksh -D will form the message keys
note that long option names will appear in the keys output
both the original and translated long names are recognized
[--catalog?foo] in the usage string provides an alternate catalog name
(besides the script base name provided by ksh at runtime)
the single char flags are used as case labels in the getopts loop
if you don't want flags then specify a 2 or more digit string
and that will be used as the case label and only the long option
will be recognized
[100:long-only]
numeric options use the # separator instead of :
[n:number?The number of foo.]#[foo-count]
after the next src update (sometime wed) I'll set up a complete
script example for the fudd locale (slightly better than swedish chef)
if anyone has a better (and rated G) jargonizer let me know
-- Glenn Fowler -- AT&T Research, Florham Park NJ --