Kaydet (Commit) ddc3dae4 authored tarafından Ivo Hinkelmann's avatar Ivo Hinkelmann

INTEGRATION: CWS pppopt04 (1.2.50); FILE MERGED

2007/11/19 15:13:04 sj 1.2.50.2: #i82551# en-US is always taken, independently from what is set in WITH_LANG
2007/11/15 16:25:23 sj 1.2.50.1: #i82551# fixed problem with default language-id, perform of more than one replace is needed
üst 4e4c785d
...@@ -7,9 +7,9 @@ eval 'exec perl -wS $0 ${1+"$@"}' ...@@ -7,9 +7,9 @@ eval 'exec perl -wS $0 ${1+"$@"}'
# #
# $RCSfile: licinserter.pl,v $ # $RCSfile: licinserter.pl,v $
# #
# $Revision: 1.2 $ # $Revision: 1.3 $
# #
# last change: $Author: kz $ $Date: 2007-10-10 15:30:30 $ # last change: $Author: ihi $ $Date: 2007-11-21 18:04:18 $
# #
# The Contents of this file are made available subject to # The Contents of this file are made available subject to
# the terms of GNU Lesser General Public License Version 2.1. # the terms of GNU Lesser General Public License Version 2.1.
...@@ -86,18 +86,31 @@ close INFILE; ...@@ -86,18 +86,31 @@ close INFILE;
chomp @inlines; chomp @inlines;
# Empty or unset WITH_LANG environment variable is set to default en-US.
# When WITH_LANG is set but does not contain en-US then that is prepended.
my $WithLang = $ENV{WITH_LANG};
if ( ! defined $WithLang || $WithLang eq "")
{
$WithLang = "en-US";
}
elsif ($WithLang !~ /\ben-US\b/)
{
$WithLang = "en-US " . $WithLang;
}
if ( $langswitch eq "" ) { if ( $langswitch eq "" ) {
my @outlines; my @outlines;
foreach my $i (@inlines) { foreach my $i (@inlines) {
if ( $i =~ /license-text/ ) { if ( $i =~ /license-text/ ) {
my $ii; my $ii;
my $name; my $name;
foreach my $code ( split(/\s+/,$ENV{WITH_LANG}) ) { foreach my $code ( split(/\s+/,$WithLang) ) {
$ii = $i; $ii = $i;
$name = $ARGV[1]; $name = $ARGV[1];
$name =~ s/xxx/$code/; $name =~ s/xxx/$code/;
$ii =~ s/isocode/$code/; $ii =~ s/isocode/$code/g;
$ii =~ s?licensefile?$name?; $ii =~ s?licensefile?$name?g;
push @outlines, "$ii\n"; push @outlines, "$ii\n";
} }
} else { } else {
...@@ -118,8 +131,8 @@ if ( $langswitch eq "" ) { ...@@ -118,8 +131,8 @@ if ( $langswitch eq "" ) {
my $ii = $i; my $ii = $i;
$name = $ARGV[1]; $name = $ARGV[1];
$name =~ s/xxx/$code/; $name =~ s/xxx/$code/;
$ii =~ s/isocode/$code/; $ii =~ s/isocode/$code/g;
$ii =~ s?licensefile?$name?; $ii =~ s?licensefile?$name?g;
push @outlines, "$ii\n"; push @outlines, "$ii\n";
} else { } else {
push @outlines, "$i\n"; push @outlines, "$i\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment