help-gengetopt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-gengetopt] Feature requests: gettext


From: Lorenzo Bettini
Subject: Re: [help-gengetopt] Feature requests: gettext
Date: Tue, 16 Sep 2008 11:43:44 +0200
User-agent: Thunderbird 2.0.0.16 (X11/20080724)

Tim Post wrote:
On Tue, 2008-09-16 at 10:32 +0200, Lorenzo Bettini wrote:

I hope that gettext functionalities will be added to getopt implementation soon, at least in glibc...

I doubt it, and here's why:

Getopt is a corner case in userspace libc as far as internationalization
goes, almost everything uses it. If someone wanted to put program 'foo'
on an initrd for instance, they'd either have to statically link against
gettext or make room for another dso depending on how many things used
it. Then there's the dictionaries, etc.

Busybox is a good example.

If I use .. say .. libxml, I know that I have a dependency on something
beyond libc(x). Parsing command line options should not create such a
dependency.
I'd be all for a separate getopt_intl implementation though. Not only
would it help users, it would make producing locale specific manuals a
cinch with something like help2man. That should probably be based on gnu
getopt, since gnu getopt has more perks than most and is by far the
noisiest in its internal error reporting.

Well, adding gettext functionalities to getopt would not necessarily require gettext dependence: though I don't know much about gettext, in the programs that used it there's always an #ifdef check to see whether gettext is available: if it's not a call to a gettext function, say foo(x) would reduce simply to x.

Moreover, I'm pretty sure to remember that there are some implementations of getopt with internalization.

this is just for discussion: I'm not a big fun of internalization, and, as you might have understood, I've never used it :-)

cheers
        Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]