This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: gettext markup of library sources
On Mon, Apr 21, 2003 at 10:08:04AM -0500, Benjamin Kosnik wrote:
> See libstdc++-v3/po for the current catalog.
>
> I once made notes on how to deal with this (and maybe the makefile rules
> still work).
There are rules for building the po/mo files, and they work. There's nothing
for extracting the string literals. (I wish there was a way to merge new
extractions into an existing .pot, rather than overwriting it.) I'm trying
to script something now.
> >are traditional. We can't actually use _N like I've noted below; it's in
> >the BADNAMES list for Solaris.
>
> I'm in favor of not inventing a new syntax for this. If you can't use
> _N, maybe __N?
That would work.
> >Note that, as shown below, I'm /not/ proposing we actually use gettext()
> >yet. That will require some configury magic, and is probably best left
> >for post-3.3.
>
> Hmm: gettext is being used, now. See the std::messages facet. Are you
> talking about the location issue at install time?
I was having mental problems with textdomain(). Evidently I was on crack
when I wrote that. Let me rephrase: I'm proposing that "_" not actually
do anything yet.
> >+// XXX These are only placeholders. They let people mark up the library
> >+// sources without breaking things, and will be probably be somewhere else
> >+// once localization of the library itself is functioning.
> >+#define _(__msgid) (__msgid)
> >+#define _N(__msgid) (__msgid)
> >+#define gettext_noop(__msgid) (__msgid)
>
> Don't need XXX here, I don't think.
They're really useful in a syntax-highlighting editor. And they signal to
users of snapshots that it really is temporary code.
I'll do up a real patch and an example libstdc++.pot file.
Phil
--
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace. We seek
not your counsel, nor your arms. Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen. - Samuel Adams