monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] resend : i18n


From: Nathaniel Smith
Subject: Re: [Monotone-devel] resend : i18n
Date: Mon, 22 Aug 2005 06:13:42 -0700
User-agent: Mutt/1.5.9i

On Sat, Aug 20, 2005 at 11:06:15AM -0700, Nathaniel Smith wrote:
> It seems clear that F() is not actually the optimal marker for
> i18nable text; in particular, it's sometimes used to do things like
> build SQL strings... (though these could use boost::format directly, I
> suppose...)

Right, after fighting with gettext for a bit, I changed my mind.

Current policy (the best one I could come up with):
  F() marks strings that should be translated
For strings that should be translated and involve plurals, use:
  FP("%i doorbell", "%i doorbells", count) % count
For strings that need munging, but should not be translated, use:
  boost::format("foo %s baz") % "bar"

You can also translate strings using the traditional _() and N_();
this seems a bit better in some cases (e.g., I marked all the CMD()
usage strings with these.)

-- Nathaniel

-- 
So let us espouse a less contested notion of truth and falsehood, even
if it is philosophically debatable (if we listen to philosophers, we
must debate everything, and there would be no end to the discussion).
  -- Serendipities, Umberto Eco




reply via email to

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