Re: Potential to_char localization bug

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Potential to_char localization bug
Date: 2006-11-27 20:16:49
Message-ID: 20061127201649.GM9324@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:
> Dennis Bjorklund wrote:
> > Peter Eisentraut skrev:
> > > case 4:
> > > m = _("May");
> > > break;
> > >
> > >
> > > Haven't thought of a fix yet.
> >
> > A common way is to use something of the form
> >
> > m = _("S:May") + 2;
> >
> > and a comment above (that is copied to the .po file) explaining that the
> > S: should be in the translated string as well.
>
> OK, I am ready to admit I am lost. What is the problem here?

The problem is that "May" is both a month name, and the shorthand for a
month name. So there is no way to determine which is which for the
translation machinery. (Incidentally I noticed that what I proposed
doesn't fix the problem, in fact it doesn't work at all).

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dennis Bjorklund 2006-11-27 20:20:07 Re: Potential to_char localization bug
Previous Message Tom Dunstan 2006-11-27 20:11:53 Re: Storing a dynahash for an entire connection or transaction?