Re: Potential to_char localization bug - Mailing list pgsql-hackers

From Zeugswetter Andreas ADI SD
Subject Re: Potential to_char localization bug
Date
Msg-id E1539E0ED7043848906A8FF995BDA579018FE168@m0143.s-mxs.net
Whole thread Raw
In response to Re: Potential to_char localization bug  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Potential to_char localization bug  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
> > >                 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;

You need to make sure the prefix in the translation is also 2 bytes.
(Not possible with UTF32, so may be better to use _("Abr:May") + 4 ?)

> >
> > 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?

That you can only translate "May" once, but you need an abbreviated and
a long translation.
(And that you don't want an en.po file, cause that would be the standard
approach
using "_May")

Andreas


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Where is detab?
Next
From: "Zeugswetter Andreas ADI SD"
Date:
Subject: Re: Configuring BLCKSZ and XLOGSEGSZ (in 8.3)