projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Einige Übersetzungen, einheitliche Bezeichnung
[kivitendo-erp.git]
/
locale
/
de
/
locales.pl
diff --git
a/locale/de/locales.pl
b/locale/de/locales.pl
index
4e67bd3
..
119dfe9
100755
(executable)
--- a/
locale/de/locales.pl
+++ b/
locale/de/locales.pl
@@
-14,6
+14,7
@@
$| = 1;
$basedir = "../..";
$bindir = "$basedir/bin/mozilla";
$basedir = "../..";
$bindir = "$basedir/bin/mozilla";
+$dbupdir = "$basedir/sql/Pg-upgrade";
$menufile = "menu.ini";
$submitsearch = qr/type\s*=\s*[\"\']?submit/i;
$menufile = "menu.ini";
$submitsearch = qr/type\s*=\s*[\"\']?submit/i;
@@
-40,6
+41,10
@@
if ($arg{n}) {
unshift @menufiles, $menufile;
}
unshift @menufiles, $menufile;
}
+opendir DIR, $dbupdir or die "$!";
+@dbplfiles = grep { /\.pl$/ } readdir DIR;
+closedir DIR;
+
# slurp the translations in
if (-f 'all') {
require "all";
# slurp the translations in
if (-f 'all') {
require "all";
@@
-52,20
+57,23
@@
if (-f 'all') {
# scanhtmlfile($file);
#}
# scanhtmlfile($file);
#}
-foreach $file (@progfiles) {
+map({ handle_file($_, $bindir); } @progfiles);
+map({ handle_file($_, $dbupdir); } @dbplfiles);
+sub handle_file {
+ my ($file, $dir) = @_;
print "\n$file" if $arg{v};
%locale = ();
%submit = ();
%subrt = ();
print "\n$file" if $arg{v};
%locale = ();
%submit = ();
%subrt = ();
- &scanfile("$
bin
dir/$file");
+ &scanfile("$dir/$file");
# scan custom_{module}.pl or {login}_{module}.pl files
foreach $customfile (@customfiles) {
if ($customfile =~ /_$file/) {
# scan custom_{module}.pl or {login}_{module}.pl files
foreach $customfile (@customfiles) {
if ($customfile =~ /_$file/) {
- if (-f "$
bin
dir/$customfile") {
- &scanfile("$
bin
dir/$customfile");
+ if (-f "$dir/$customfile") {
+ &scanfile("$dir/$customfile");
}
}
}
}
}
}
@@
-97,7
+105,8
@@
foreach $file (@progfiles) {
}
}
}
}
- open FH, ">$file" or die "$! : $file";
+ my $localefile = $dir eq $bindir ? $file : "dbupgrade";
+ open FH, ">$localefile" or die "$! : $localefile";
print FH q|$self{texts} = {
|;
print FH q|$self{texts} = {
|;
@@
-468,7
+477,8
@@
sub scanhtmlfile {
if ($line =~ m|</translate>|i) {
$text .= $`;
substr($line, 0, $+[0]) = "";
if ($line =~ m|</translate>|i) {
$text .= $`;
substr($line, 0, $+[0]) = "";
-
+ $text =~ s/\s+/ /g;
+
$copying = 0;
if ($issubmit) {
# $submit{$text} = 1;
$copying = 0;
if ($issubmit) {
# $submit{$text} = 1;
@@
-538,6
+548,7
@@
sub converthtmlfile {
if ($line =~ m|</translate>|i) {
$text .= $`;
substr($line, 0, $+[0]) = "";
if ($line =~ m|</translate>|i) {
$text .= $`;
substr($line, 0, $+[0]) = "";
+ $text =~ s/\s+/ /g;
$copying = 0;
$alllocales{$text} = 1;
$htmllocale{$text} = 1;
$copying = 0;
$alllocales{$text} = 1;
$htmllocale{$text} = 1;