From b6ae20da85f7c02f486dd7ba15713292b61017cb Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 1 Mar 2011 12:52:27 +0100 Subject: [PATCH] =?utf8?q?Alle=20Dateien=20in=20SL=20rekursiv=20nach=20?= =?utf8?q?=C3=9Cbersetzungen=20durchsuchen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- locale/de/all | 3 +++ scripts/locales.pl | 41 +++++++++++++++++++++++++++++++---------- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/locale/de/all b/locale/de/all index dd550435e..842452068 100644 --- a/locale/de/all +++ b/locale/de/all @@ -862,6 +862,7 @@ $self->{texts} = { 'Incoming Payments' => 'Zahlungseingänge', 'Incoming invoice number' => 'Eingangsrechnungsnummer', 'Incorrect Password!' => 'Ungültiges Passwort!', + 'Incorrect password!.' => 'Ungültiges Passwort!.', 'Incorrect username or password!' => 'Ungültiger Benutzername oder falsches Passwort!', 'Increase' => 'Erhöhen', 'Individual Items' => 'Einzelteile', @@ -1552,6 +1553,7 @@ $self->{texts} = { 'Supplies' => 'Lieferungen', 'Switch Menu on / off' => 'Menü ein- / ausklappen', 'System' => 'System', + 'System currently down for maintenance!' => 'Lx-Office ist momentan zwecks Wartungsarbeiten nicht zugänglich.', 'TODO list' => 'Aufgabenliste', 'TODO list options' => 'Aufgabenlistenoptionen', 'TOP100' => 'Top 100', @@ -1969,6 +1971,7 @@ $self->{texts} = { '[email]' => '[email]', 'account_description' => 'Beschreibung', 'accrual' => 'Bilanzierung (Soll-Versteuerung)', + 'action= not defined!' => 'action= nicht definiert!', 'active' => 'aktiv', 'all entries' => 'alle Einträge', 'ap_aging_list' => 'liste_offene_verbindlichkeiten', diff --git a/scripts/locales.pl b/scripts/locales.pl index f03e5c667..0780a49f6 100755 --- a/scripts/locales.pl +++ b/scripts/locales.pl @@ -31,7 +31,7 @@ parse_args(); my $basedir = "../.."; my $locales_dir = "."; my $bindir = "$basedir/bin/mozilla"; -my @progdirs = ( "$basedir/SL/Controller", "$basedir/SL/Template/Plugin", "$basedir/SL/Auth" ); +my @progdirs = ( "$basedir/SL" ); my $dbupdir = "$basedir/sql/Pg-upgrade"; my $dbupdir2 = "$basedir/sql/Pg-upgrade2"; my $menufile = "menu.ini"; @@ -42,18 +42,39 @@ my ($ALL_HEADER, $MISSING_HEADER, $LOST_HEADER); init(); -opendir DIR, "$bindir" or die "$!"; -my @progfiles = map { [ $_, $bindir ] } grep { /\.pl$/ && !/(_custom|^\.)/ } readdir DIR; -seekdir DIR, 0; -my @customfiles = grep /_custom/, readdir DIR; -closedir DIR; +sub find_files { + my ($dir_name, $files) = @_; -foreach my $dir (@progdirs) { - opendir DIR, $dir or die "$!"; - push @progfiles, map { [ $_, $dir ] } grep { /\.pm$/ } readdir DIR; - closedir DIR; + $files ||= []; + + my @dirs_to_check; + + opendir my $dir, $dir_name or die "$! $dir_name"; + + foreach my $name (readdir $dir) { + next if $name eq '.' || $name eq '..'; + + my $full_name = "${dir_name}/${name}"; + if (-d $full_name) { + push @dirs_to_check, $full_name; + } else { + push @{ $files }, $full_name; + } + } + + closedir $dir; + + map { find_files($_, $files) } @dirs_to_check; + + return @{ $files }; } +my @bindir_files = find_files($bindir); +my @progfiles = map { m:^(.+)/([^/]+)$:; [ $2, $1 ] } grep { /\.pl$/ && !/_custom/ } @bindir_files; +my @customfiles = grep /_custom/, @bindir_files; + +push @progfiles, map { m:^(.+)/([^/]+)$:; [ $2, $1 ] } grep { /\.pm$/ } map { find_files($_) } @progdirs; + # put customized files into @customfiles my @menufiles; -- 2.20.1