On Saturday 08 April 2006 1:05 am, Barry Warsaw wrote:
> On Sat, 2006-04-08 at 00:45 +0200, "Martin v. Löwis" wrote:
> > *Never* try to do i18n that way. Don't combine fragments through
> > concatenation. Instead, always use placeholders.
>
> Martin is of course absolutely right!
>
> > If you have
On Sat, 2006-04-08 at 00:45 +0200, "Martin v. Löwis" wrote:
> *Never* try to do i18n that way. Don't combine fragments through
> concatenation. Instead, always use placeholders.
Martin is of course absolutely right!
> If you have many fragments, the translator gets the challenge of
> translating
Martin Blais wrote:
> I'm not sure all the cases are handled, but for those which aren't I
> can't see why I couldn't hack the pygettext parser to make it do what
> I want, e.g. is the case were the function contains multiple strings
> handled? ::
>
> P(A_("Status: ", get_balance(), "dollars", h
On Fri, 2006-04-07 at 13:29 +0200, Alexander Schremmer wrote:
> Have you thought about simply writing _ = lambda x:x instead of N_ ...?
> By doing that, you just need to care about one function (of course _
> doesn't translate in that case and you might need to del _ afterwards).
That's essential
On Thu, 2006-04-06 at 11:48 -0400, Martin Blais wrote:
> - This implies that we would have to introduce some way for these
> strings to call a custom function at runtime.
Yes, definitely. For example, in Mailman we bind _() not to gettext's
_() but to a special one that looks up the translation
On 4/7/06, Alexander Schremmer <[EMAIL PROTECTED]> wrote:
> On Fri, 7 Apr 2006 10:07:26 -0400, Martin Blais wrote:
>
> > There are cases where you need N_() after initialization, so you need
> > both, really. See the link I sent to Alex earlier (to the GNU manual
> > example).
>
> On the page you
On Fri, 7 Apr 2006 10:07:26 -0400, Martin Blais wrote:
> There are cases where you need N_() after initialization, so you need
> both, really. See the link I sent to Alex earlier (to the GNU manual
> example).
On the page you were referring to, I cannot find a particular use case that
does not w
On 4/7/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> Martin Blais wrote:
> >> P(a("Click here to forget", href="...
> >
> > No. That's not going to work: pygettext needs to be able to extract
> > the string for the catalogs. No markup, no extraction. (This is how
> > you enter strings that a
On 4/7/06, M.-A. Lemburg <[EMAIL PROTECTED]> wrote:
> Martin Blais wrote:
> > Hi all
> >
> > I got an evil idea for Python this morning -- Guido: no, it's not
> > about linked lists :-) -- , and I'd like to bounce it here. But
> > first, a bit of context.
>
> This has been discussed a few times b
On 4/7/06, Alexander Schremmer <[EMAIL PROTECTED]> wrote:
> On Thu, 6 Apr 2006 20:35:51 -0400, Martin Blais wrote:
>
> > This is pretty standard
> > getttext stuff, if you used _() a lot I'm surprised you don't have a
> > need for N_(), I always needed it when I used i18n (or maybe I
> > misunderst
On Thu, 6 Apr 2006 20:35:51 -0400, Martin Blais wrote:
> This is pretty standard
> getttext stuff, if you used _() a lot I'm surprised you don't have a
> need for N_(), I always needed it when I used i18n (or maybe I
> misunderstood your question?).
Have you thought about simply writing _ = lambd
Martin Blais wrote:
> Hi all
>
> I got an evil idea for Python this morning -- Guido: no, it's not
> about linked lists :-) -- , and I'd like to bounce it here. But
> first, a bit of context.
This has been discussed a few times before, see e.g.
http://mail.python.org/pipermail/python-list/2000
Martin Blais wrote:
>> P(a("Click here to forget", href="...
>
> No. That's not going to work: pygettext needs to be able to extract
> the string for the catalogs. No markup, no extraction. (This is how
> you enter strings that are not meant to be translated.)
I know; I wrote pygettext. You can
On 4/6/06, Alex Martelli <[EMAIL PROTECTED]> wrote:
> On 4/6/06, Martin Blais <[EMAIL PROTECTED]> wrote:
>
> > - We could also have a prefix "I" for strings to be marked but not
> > runtime-translated, to replace the N_() strings.
>
> I'm more dubious about this one, because I don't really see the
On 4/6/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> Martin Blais wrote:
> >...
> >A(P(_("Click here to forget"), href="...
> >...
>
> I assume that this should be
>
> P(A(_("Click here to forget"), href="...
>
> instead (i.e. href is a parameter to A, not to P)
Yeah, that's rig
Martin Blais wrote:
>...
>A(P(_("Click here to forget"), href="...
>...
I assume that this should be
P(A(_("Click here to forget"), href="...
instead (i.e. href is a parameter to A, not to P)
>
> (In my example, I built a library not unlike stan for creating HTML,
> which is wher
On 4/6/06, Martin Blais <[EMAIL PROTECTED]> wrote:
...
> So I had the following idea: would it not be nice if there existed a
> string-prefix 'i' -- a string prefix like for the raw (r'...') and
> unicode (u'...') strings -- that would mark the string as being for
> i18n? Something like this (
Hi all
I got an evil idea for Python this morning -- Guido: no, it's not
about linked lists :-) -- , and I'd like to bounce it here. But
first, a bit of context.
In the context of writing i18n apps, programmers have to "mark"
strings that may be internationalized in a way that
- a special hoo
18 matches
Mail list logo