Re: Context in translations, Q_() and gettext



On Wed, 2005-12-21 at 14:22 -0600, Federico Mena Quintero wrote:
> On Wed, 2005-12-21 at 01:07 -0500, Matthias Clasen wrote:
> > I just learned that GNU gettext will soon have official support for
> > disambiguating context in translations. 
> 
> Will there be a tool to convert .po files from msgid "foo|bar" to the
> new msgctxt stuff?  Could msgmerge or whatever do it automatically?
> 

I'm not sure if msgmerge will be up to that. 
But a little bit of sed magic should get us there. 
That does not have to happen any time soon though, since we probably
can't ship msgctxt-containing .po files until the next gettext is 
widespread, anyway.
The important thing to get started soon is the conversion 
Q_("foo|bar") -> Q2_("foo", "bar")
so that we are done with that when the time is ripe to rely on msgctxt.

> This makes sense.  Or we can pick another prefix.  Why not C_ for
> context?
> 
> [Don't we support ngettext yet?]
> 

glib requires ngettext. We don't define a shorthand macro for that,
though, and N_() is already taken for noop...

Matthias




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