X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=locale%2Fde%2Flocales.pl;h=6415370443d90466fb5f152c90b3ec8ef8d7bc7c;hb=4fd8bdbfb46b8b63a7d05457959b98c4956d1dbd;hp=24adc4b628016fd019c651a0f16bf2b269c37f89;hpb=7c73b81235f45b9e6c80740fcfa09f6f0dac7285;p=kivitendo-erp.git diff --git a/locale/de/locales.pl b/locale/de/locales.pl index 24adc4b62..641537044 100755 --- a/locale/de/locales.pl +++ b/locale/de/locales.pl @@ -15,6 +15,7 @@ $| = 1; $basedir = "../.."; $bindir = "$basedir/bin/mozilla"; $dbupdir = "$basedir/sql/Pg-upgrade"; +$dbupdir2 = "$basedir/sql/Pg-upgrade2"; $menufile = "menu.ini"; $submitsearch = qr/type\s*=\s*[\"\']?submit/i; @@ -45,6 +46,10 @@ opendir DIR, $dbupdir or die "$!"; @dbplfiles = grep { /\.pl$/ } readdir DIR; closedir DIR; +opendir DIR, $dbupdir2 or die "$!"; +@dbplfiles2 = grep { /\.pl$/ } readdir DIR; +closedir DIR; + # slurp the translations in if (-f 'all') { require "all"; @@ -59,6 +64,7 @@ if (-f 'all') { map({ handle_file($_, $bindir); } @progfiles); map({ handle_file($_, $dbupdir); } @dbplfiles); +map({ handle_file($_, $dbupdir2); } @dbplfiles2); sub handle_file { my ($file, $dir) = @_; @@ -99,21 +105,20 @@ sub handle_file { foreach $text (keys %$missing) { if ($locale{$text} || $htmllocale{$text}) { - unless ($self{texts}{$text}) { - $self{texts}{$text} = $missing->{$text}; + unless ($self->{texts}{$text}) { + $self->{texts}{$text} = $missing->{$text}; } } } - my $localefile = $dir eq $bindir ? $file : "dbupgrade"; - open FH, ">$localefile" or die "$! : $localefile"; + open FH, ">$file" or die "$! : $file"; - print FH q|$self{texts} = { + print FH q|$self->{texts} = { |; foreach $key (sort keys %locale) { - if ($self{texts}{$key}) { - $text = $self{texts}{$key}; + if ($self->{texts}{$key}) { + $text = $self->{texts}{$key}; } else { $text = $key; } @@ -131,7 +136,7 @@ sub handle_file { print FH q|}; -$self{subs} = { +$self->{subs} = { |; foreach $key (sort keys %subrt) { @@ -142,7 +147,7 @@ $self{subs} = { } foreach $key (sort keys %submit) { - $text = ($self{texts}{$key}) ? $self{texts}{$key} : $key; + $text = ($self->{texts}{$key}) ? $self->{texts}{$key} : $key; $text =~ s/'/\\'/g; $text =~ s/\\$/\\\\/; @@ -181,11 +186,11 @@ print FH q|# These are all the texts to build the translations files. # you can add the translation in this file or in the 'missing' file # run locales.pl from this directory to rebuild the translation files -$self{texts} = { +$self->{texts} = { |; foreach $key (sort keys %alllocales) { - $text = $self{texts}{$key}; + $text = $self->{texts}{$key}; $count++; @@ -477,7 +482,8 @@ sub scanhtmlfile { if ($line =~ m||i) { $text .= $`; substr($line, 0, $+[0]) = ""; - + $text =~ s/\s+/ /g; + $copying = 0; if ($issubmit) { # $submit{$text} = 1; @@ -547,10 +553,11 @@ sub converthtmlfile { if ($line =~ m||i) { $text .= $`; substr($line, 0, $+[0]) = ""; + $text =~ s/\s+/ /g; $copying = 0; $alllocales{$text} = 1; $htmllocale{$text} = 1; - print(OUT $self{"texts"}{$text} || $text); + print(OUT $self->{"texts"}{$text} || $text); print(OUT "\n") if ("" eq $line); $text = "";