gettext markup of library sources

Phil Edwards phil@jaj.com
Mon Apr 21 17:43:00 GMT 2003


On Mon, Apr 21, 2003 at 06:37:59PM +0200, Gabriel Dos Reis wrote:
> Benjamin Kosnik <bkoz@redhat.com> writes:
> 
> [...]
> 
> | The only part used at the moment is the '_(x)' define. That's the part that
> | should go in.
> | 
> | Really, I feel like this patch was preliminary and posted for discussion
> | only anyway. 
> 
> Agreed.

Exactly.


>    __throw_out_of_range("bitset::set argument too large");

This is nicer.  I'll do that.


> Also, I don't think we should spread "_" all over the places:  Just put
> it in one place -- the exception constructor that takes the diagnostic
> message. 

Won't work.  There's a reason that "_" is all over the place in other
programs: the xgettext needs a "keyword" in order to notice the string
literal and extract it into the .pot file.  By telling xgettext to use "_"
(or whatever) as a keyword, we get automatic collection of everything that
needs translating, with minimal ugliness in sources.

Putting a single call to gettext in the exception constructor /would/
look up the string and get the translation, but we would have to construct
po/libstdc++.pot by hand.  Let me construct an example .pot file and I
think you'll see what I mean.


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



More information about the Libstdc++ mailing list