mirror of
https://github.com/postgres/postgres.git
synced 2025-04-29 13:56:47 +03:00
Read nls.nk files to determine the proper name of NLS catalogs to install.
Hiroshi Inoue, with minor modifications by me
This commit is contained in:
parent
ce53791b2a
commit
02dec25003
@ -3,7 +3,7 @@ package Install;
|
|||||||
#
|
#
|
||||||
# Package that provides 'make install' functionality for msvc builds
|
# Package that provides 'make install' functionality for msvc builds
|
||||||
#
|
#
|
||||||
# $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.32 2009/01/21 09:25:11 mha Exp $
|
# $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.33 2009/04/20 08:38:00 mha Exp $
|
||||||
#
|
#
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
@ -470,11 +470,10 @@ sub GenerateNLSFiles
|
|||||||
}, "src");
|
}, "src");
|
||||||
foreach (@flist)
|
foreach (@flist)
|
||||||
{
|
{
|
||||||
|
my $prgm = DetermineCatalogName($_);
|
||||||
s/nls.mk/po/;
|
s/nls.mk/po/;
|
||||||
my $dir = $_;
|
my $dir = $_;
|
||||||
next unless ($dir =~ /([^\/]+)\/po$/);
|
next unless ($dir =~ /([^\/]+)\/po$/);
|
||||||
my $prgm = $1;
|
|
||||||
$prgm = 'postgres' if ($prgm eq 'backend');
|
|
||||||
foreach (glob("$dir/*.po"))
|
foreach (glob("$dir/*.po"))
|
||||||
{
|
{
|
||||||
my $lang;
|
my $lang;
|
||||||
@ -499,6 +498,15 @@ sub DetermineMajorVersion
|
|||||||
return $1;
|
return $1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub DetermineCatalogName
|
||||||
|
{
|
||||||
|
my $filename = shift;
|
||||||
|
|
||||||
|
my $f = read_file($filename) || croak "Could not open $filename";
|
||||||
|
$f =~ /CATALOG_NAME\s*\:?=\s*(\S+)/m || croak "Could not determine catalog name in $filename";
|
||||||
|
return $1;
|
||||||
|
}
|
||||||
|
|
||||||
sub read_file
|
sub read_file
|
||||||
{
|
{
|
||||||
my $filename = shift;
|
my $filename = shift;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user