On Thu, Feb 07, 2008 at 06:12:17AM -0500, Andrew Dunstan wrote:
>
>
> Magnus Hagander wrote:
> >On Wed, Feb 06, 2008 at 02:59:31PM +0100, Gevik Babakhani wrote:
> >
> >>I might be very wrong, but when I try to install 8.3 on Windows with NLS
> >>options selected, no share/locale files are installed. could someone
> >>please
> >>test or confirm this?
> >>
> >
> >Yes, it's broken. It seems the change in Install.pm rev 1.20 to use
> >File::Find instead of external dir broke this, and was never tested at all
> >:-(
> >
> >I know I build without NLS enabled, and it seems so does everybody else who
> >regularly builds the msvc stuff.
> >
> >There is no testing at all of the NLS stuff in the regression tests.
> >Perhaps it would be a good idea to do that? Could be somethign as simple as
> >launching psql in a way tha tgenerates a syntax error and make sure i
> >matches a proper translation?
> >
> >
> >(and yes, I'm working on a patch for the actual issue)
> >
> >
> >
>
> Oops, My bad!
>
> I think if we just change the forward slashes to backslashes at the top[
> of that loop it should work, but haven't had time to test.
No, it'sa bit more than that, but that's one of the changes :)
I have a patch working for me, I've sent it over to Gevik for testing in
his environment. Attached here if somebody else wants to play.
//Magnus
Index: Install.pm
===================================================================
RCS file: /cvsroot/pgsql/src/tools/msvc/Install.pm,v
retrieving revision 1.26
diff -c -r1.26 Install.pm
*** Install.pm 3 Dec 2007 15:42:58 -0000 1.26
--- Install.pm 7 Feb 2008 11:15:50 -0000
***************
*** 456,482 ****
print "Installing NLS files...";
EnsureDirectories($target, "share/locale");
my @flist;
! File::Find::find({wanted =>
! sub { /^nls\.mk\z/s &&
! !
push(@flist,
$File::Find::name);
! }
}, "src");
foreach (@flist)
{
s/nls.mk/po/;
my $dir = $_;
! next unless ($dir =~ /([^\\]+)\\po$/);
my $prgm = $1;
$prgm = 'postgres' if ($prgm eq 'backend');
foreach (glob("$dir/*.po"))
{
my $lang;
! next unless /^(.*)\.po/;
$lang = $1;
EnsureDirectories($target, "share/locale/$lang",
"share/locale/$lang/LC_MESSAGES");
system(
! "$nlspath\\bin\\msgfmt -o
$target\\share\\locale\\$lang\\LC_MESSAGES\\$prgm.mo $dir\\$_"
)
&& croak("Could not run msgfmt on $dir\\$_");
print ".";
--- 456,482 ----
print "Installing NLS files...";
EnsureDirectories($target, "share/locale");
my @flist;
! File::Find::find({wanted =>
! sub { /^nls\.mk\z/s &&
!
!push(@flist, $File::Find::name);
! }
}, "src");
foreach (@flist)
{
s/nls.mk/po/;
my $dir = $_;
! next unless ($dir =~ /([^\/]+)\/po$/);
my $prgm = $1;
$prgm = 'postgres' if ($prgm eq 'backend');
foreach (glob("$dir/*.po"))
{
my $lang;
! next unless /([^\/]+)\.po/;
$lang = $1;
EnsureDirectories($target, "share/locale/$lang",
"share/locale/$lang/LC_MESSAGES");
system(
! "$nlspath\\bin\\msgfmt -o
$target\\share\\locale\\$lang\\LC_MESSAGES\\$prgm.mo $_"
)
&& croak("Could not run msgfmt on $dir\\$_");
print ".";
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org