Bug #4899
openxgettext(1) of shell scripts can generate invalid strings
0%
Description
xgettext of kclient.sh will generate a msgid "Principal \\", which contains unbalanced quotes (because of the escape). The same is true of various other things.
It's not clear to me whether xgettext should be fixed, or the affected components should be using gxgettext or what. xgettext(1) does say it takes ANSI C input, which a shell script certainly isn't.
Updated by Rich Lowe over 9 years ago
the same is true of s10_boot.ksh with "Warning: \\" and and kclient.sh with the "Principal or policy already exists" message.
Updated by Rich Lowe over 9 years ago
GNU xgettext seems to just ignore these tokens entirely.
Updated by Garrett D'Amore over 9 years ago
xgettext is designed to extract strings from C programs. It can't possibly be expected to parse full shell syntax (which can get horribly ugly with some fairly ridiculous quoting rules.)
Advice to people writing programs which are to be internationalized is to move their strings to a simpler array or file with variable assignments rather than leaving the constant strings deeply embedded in the code.
I'd suggest closing this as not a bug, as arbitrary string extraction from shell scripts is not one of xgettext's functions.
Updated by Rich Lowe over 9 years ago
I'd rather leave it open to cover kclient and s10_* being broken, but requiring a fix other than to xgettext