From 541272c5cf4f874a13eff89993d5d4a941451f42 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 26 Jan 2007 08:59:02 +0000 Subject: [PATCH] =?utf8?q?Beim=20Login=20wird=20jetzt=20ein=20Check=20durc?= =?utf8?q?hgef=C3=BChrt,=20ob=20alle=20ben=C3=B6tigten=20Perl-Module=20ins?= =?utf8?q?talliert=20sind.=20Wenn=20nicht,=20dann=20wird=20eine=20Fehlerme?= =?utf8?q?ldung=20sowie=20eine=20Liste=20der=20fehlenden=20Module=20ausgeg?= =?utf8?q?eben=20sowie=20grobe=20Informationen,=20wie=20man=20die=20fehlen?= =?utf8?q?den=20Module=20nachinstallieren=20kann.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Form.pm | 200 -------------------------- SL/InstallationCheck.pm | 3 +- SL/Locale.pm | 239 +++++++++++++++++++++++++++++++ am.pl | 1 + bin/mozilla/installationcheck.pl | 85 +++++++++++ locale/de/all | 11 ++ locale/de/installationcheck | 19 +++ login.pl | 3 + 8 files changed, 359 insertions(+), 202 deletions(-) create mode 100644 SL/Locale.pm create mode 100644 bin/mozilla/installationcheck.pl create mode 100644 locale/de/installationcheck diff --git a/SL/Form.pm b/SL/Form.pm index 8b7612837..95ad61660 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -2413,204 +2413,4 @@ sub audittrail { } -package Locale; - -sub new { - $main::lxdebug->enter_sub(); - - my ($type, $country, $NLS_file) = @_; - my $self = {}; - - if ($country && -d "locale/$country") { - local *IN; - $self->{countrycode} = $country; - if (open(IN, "locale/$country/$NLS_file")) { - my $code = join("", ); - eval($code); - close(IN); - } - } - - $self->{NLS_file} = $NLS_file; - - push @{ $self->{LONG_MONTH} }, - ("January", "February", "March", "April", - "May ", "June", "July", "August", - "September", "October", "November", "December"); - push @{ $self->{SHORT_MONTH} }, - (qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)); - - $main::lxdebug->leave_sub(); - - bless $self, $type; -} - -sub text { - my ($self, $text) = @_; - - return (exists $self->{texts}{$text}) ? $self->{texts}{$text} : $text; -} - -sub findsub { - $main::lxdebug->enter_sub(); - - my ($self, $text) = @_; - - if (exists $self->{subs}{$text}) { - $text = $self->{subs}{$text}; - } else { - if ($self->{countrycode} && $self->{NLS_file}) { - Form->error( - "$text not defined in locale/$self->{countrycode}/$self->{NLS_file}"); - } - } - - $main::lxdebug->leave_sub(); - - return $text; -} - -sub date { - $main::lxdebug->enter_sub(); - - my ($self, $myconfig, $date, $longformat) = @_; - - my $longdate = ""; - my $longmonth = ($longformat) ? 'LONG_MONTH' : 'SHORT_MONTH'; - - if ($date) { - - # get separator - $spc = $myconfig->{dateformat}; - $spc =~ s/\w//g; - $spc = substr($spc, 1, 1); - - if ($date =~ /\D/) { - if ($myconfig->{dateformat} =~ /^yy/) { - ($yy, $mm, $dd) = split /\D/, $date; - } - if ($myconfig->{dateformat} =~ /^mm/) { - ($mm, $dd, $yy) = split /\D/, $date; - } - if ($myconfig->{dateformat} =~ /^dd/) { - ($dd, $mm, $yy) = split /\D/, $date; - } - } else { - $date = substr($date, 2); - ($yy, $mm, $dd) = ($date =~ /(..)(..)(..)/); - } - - $dd *= 1; - $mm--; - $yy = ($yy < 70) ? $yy + 2000 : $yy; - $yy = ($yy >= 70 && $yy <= 99) ? $yy + 1900 : $yy; - - if ($myconfig->{dateformat} =~ /^dd/) { - if (defined $longformat && $longformat == 0) { - $mm++; - $dd = "0$dd" if ($dd < 10); - $mm = "0$mm" if ($mm < 10); - $longdate = "$dd$spc$mm$spc$yy"; - } else { - $longdate = "$dd"; - $longdate .= ($spc eq '.') ? ". " : " "; - $longdate .= &text($self, $self->{$longmonth}[$mm]) . " $yy"; - } - } elsif ($myconfig->{dateformat} eq "yyyy-mm-dd") { - - # Use German syntax with the ISO date style "yyyy-mm-dd" because - # Lx-Office is mainly used in Germany or German speaking countries. - if (defined $longformat && $longformat == 0) { - $mm++; - $dd = "0$dd" if ($dd < 10); - $mm = "0$mm" if ($mm < 10); - $longdate = "$yy-$mm-$dd"; - } else { - $longdate = "$dd. "; - $longdate .= &text($self, $self->{$longmonth}[$mm]) . " $yy"; - } - } else { - if (defined $longformat && $longformat == 0) { - $mm++; - $dd = "0$dd" if ($dd < 10); - $mm = "0$mm" if ($mm < 10); - $longdate = "$mm$spc$dd$spc$yy"; - } else { - $longdate = &text($self, $self->{$longmonth}[$mm]) . " $dd, $yy"; - } - } - - } - - $main::lxdebug->leave_sub(); - - return $longdate; -} - -sub parse_date { - $main::lxdebug->enter_sub(); - - my ($self, $myconfig, $date, $longformat) = @_; - - unless ($date) { - $main::lxdebug->leave_sub(); - return (); - } - - # get separator - $spc = $myconfig->{dateformat}; - $spc =~ s/\w//g; - $spc = substr($spc, 1, 1); - - if ($date =~ /\D/) { - if ($myconfig->{dateformat} =~ /^yy/) { - ($yy, $mm, $dd) = split /\D/, $date; - } elsif ($myconfig->{dateformat} =~ /^mm/) { - ($mm, $dd, $yy) = split /\D/, $date; - } elsif ($myconfig->{dateformat} =~ /^dd/) { - ($dd, $mm, $yy) = split /\D/, $date; - } - } else { - $date = substr($date, 2); - ($yy, $mm, $dd) = ($date =~ /(..)(..)(..)/); - } - - $dd *= 1; - $mm *= 1; - $yy = ($yy < 70) ? $yy + 2000 : $yy; - $yy = ($yy >= 70 && $yy <= 99) ? $yy + 1900 : $yy; - - $main::lxdebug->leave_sub(); - return ($yy, $mm, $dd); -} - -sub reformat_date { - $main::lxdebug->enter_sub(); - - my ($self, $myconfig, $date, $output_format, $longformat) = @_; - - $main::lxdebug->leave_sub() and return "" unless ($date); - - my ($yy, $mm, $dd) = $self->parse_date($myconfig, $date); - - $output_format =~ /d+/; - substr($output_format, $-[0], $+[0] - $-[0]) = - sprintf("%0" . (length($&)) . "d", $dd); - - $output_format =~ /m+/; - substr($output_format, $-[0], $+[0] - $-[0]) = - sprintf("%0" . (length($&)) . "d", $mm); - - $output_format =~ /y+/; - if (length($&) == 2) { - $yy -= $yy >= 2000 ? 2000 : 1900; - } - substr($output_format, $-[0], $+[0] - $-[0]) = - sprintf("%0" . (length($&)) . "d", $yy); - - $main::lxdebug->leave_sub(); - - return $output_format; -} - 1; diff --git a/SL/InstallationCheck.pm b/SL/InstallationCheck.pm index fc8560bd0..22724c429 100644 --- a/SL/InstallationCheck.pm +++ b/SL/InstallationCheck.pm @@ -11,7 +11,6 @@ use vars qw(@required_modules); { "name" => "HTML::Template", "url" => "http://search.cpan.org/~samtregar/" }, { "name" => "Archive::Zip", "url" => "http://search.cpan.org/~adamk/" }, { "name" => "Text::Iconv", "url" => "http://search.cpan.org/~mpiotr/" }, - { "name" => "Klaus", "url" => "http://dum.my/" }, ); sub module_available { @@ -27,7 +26,7 @@ sub module_available { sub test_all_modules { my @missing_modules; - map({ push(@missing_modules, $_) unless (module_available($_)); } + map({ push(@missing_modules, $_) unless (module_available($_->{"name"})); } @required_modules); return @missing_modules; diff --git a/SL/Locale.pm b/SL/Locale.pm new file mode 100644 index 000000000..8e7037d78 --- /dev/null +++ b/SL/Locale.pm @@ -0,0 +1,239 @@ +#==================================================================== +# LX-Office ERP +# Copyright (C) 2004 +# Based on SQL-Ledger Version 2.1.9 +# Web http://www.lx-office.org +# +#===================================================================== +# SQL-Ledger Accounting +# Copyright (C) 1998-2002 +# +# Author: Dieter Simader +# Email: dsimader@sql-ledger.org +# Web: http://www.sql-ledger.org +# +# Contributors: Thomas Bayen +# Antti Kaihola +# Moritz Bunkus (tex code) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +#====================================================================== +# +# Translations and number/date formatting +# +#====================================================================== + +package Locale; + +use SL::LXDebug; + +sub new { + $main::lxdebug->enter_sub(); + + my ($type, $country, $NLS_file) = @_; + my $self = {}; + + if ($country && -d "locale/$country") { + local *IN; + $self->{countrycode} = $country; + if (open(IN, "locale/$country/$NLS_file")) { + my $code = join("", ); + eval($code); + close(IN); + } + } + + $self->{NLS_file} = $NLS_file; + + push @{ $self->{LONG_MONTH} }, + ("January", "February", "March", "April", + "May ", "June", "July", "August", + "September", "October", "November", "December"); + push @{ $self->{SHORT_MONTH} }, + (qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)); + + $main::lxdebug->leave_sub(); + + bless $self, $type; +} + +sub text { + my ($self, $text) = @_; + + return (exists $self->{texts}{$text}) ? $self->{texts}{$text} : $text; +} + +sub findsub { + $main::lxdebug->enter_sub(); + + my ($self, $text) = @_; + + if (exists $self->{subs}{$text}) { + $text = $self->{subs}{$text}; + } else { + if ($self->{countrycode} && $self->{NLS_file}) { + Form->error( + "$text not defined in locale/$self->{countrycode}/$self->{NLS_file}"); + } + } + + $main::lxdebug->leave_sub(); + + return $text; +} + +sub date { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $date, $longformat) = @_; + + my $longdate = ""; + my $longmonth = ($longformat) ? 'LONG_MONTH' : 'SHORT_MONTH'; + + if ($date) { + + # get separator + $spc = $myconfig->{dateformat}; + $spc =~ s/\w//g; + $spc = substr($spc, 1, 1); + + if ($date =~ /\D/) { + if ($myconfig->{dateformat} =~ /^yy/) { + ($yy, $mm, $dd) = split /\D/, $date; + } + if ($myconfig->{dateformat} =~ /^mm/) { + ($mm, $dd, $yy) = split /\D/, $date; + } + if ($myconfig->{dateformat} =~ /^dd/) { + ($dd, $mm, $yy) = split /\D/, $date; + } + } else { + $date = substr($date, 2); + ($yy, $mm, $dd) = ($date =~ /(..)(..)(..)/); + } + + $dd *= 1; + $mm--; + $yy = ($yy < 70) ? $yy + 2000 : $yy; + $yy = ($yy >= 70 && $yy <= 99) ? $yy + 1900 : $yy; + + if ($myconfig->{dateformat} =~ /^dd/) { + if (defined $longformat && $longformat == 0) { + $mm++; + $dd = "0$dd" if ($dd < 10); + $mm = "0$mm" if ($mm < 10); + $longdate = "$dd$spc$mm$spc$yy"; + } else { + $longdate = "$dd"; + $longdate .= ($spc eq '.') ? ". " : " "; + $longdate .= &text($self, $self->{$longmonth}[$mm]) . " $yy"; + } + } elsif ($myconfig->{dateformat} eq "yyyy-mm-dd") { + + # Use German syntax with the ISO date style "yyyy-mm-dd" because + # Lx-Office is mainly used in Germany or German speaking countries. + if (defined $longformat && $longformat == 0) { + $mm++; + $dd = "0$dd" if ($dd < 10); + $mm = "0$mm" if ($mm < 10); + $longdate = "$yy-$mm-$dd"; + } else { + $longdate = "$dd. "; + $longdate .= &text($self, $self->{$longmonth}[$mm]) . " $yy"; + } + } else { + if (defined $longformat && $longformat == 0) { + $mm++; + $dd = "0$dd" if ($dd < 10); + $mm = "0$mm" if ($mm < 10); + $longdate = "$mm$spc$dd$spc$yy"; + } else { + $longdate = &text($self, $self->{$longmonth}[$mm]) . " $dd, $yy"; + } + } + + } + + $main::lxdebug->leave_sub(); + + return $longdate; +} + +sub parse_date { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $date, $longformat) = @_; + + unless ($date) { + $main::lxdebug->leave_sub(); + return (); + } + + # get separator + $spc = $myconfig->{dateformat}; + $spc =~ s/\w//g; + $spc = substr($spc, 1, 1); + + if ($date =~ /\D/) { + if ($myconfig->{dateformat} =~ /^yy/) { + ($yy, $mm, $dd) = split /\D/, $date; + } elsif ($myconfig->{dateformat} =~ /^mm/) { + ($mm, $dd, $yy) = split /\D/, $date; + } elsif ($myconfig->{dateformat} =~ /^dd/) { + ($dd, $mm, $yy) = split /\D/, $date; + } + } else { + $date = substr($date, 2); + ($yy, $mm, $dd) = ($date =~ /(..)(..)(..)/); + } + + $dd *= 1; + $mm *= 1; + $yy = ($yy < 70) ? $yy + 2000 : $yy; + $yy = ($yy >= 70 && $yy <= 99) ? $yy + 1900 : $yy; + + $main::lxdebug->leave_sub(); + return ($yy, $mm, $dd); +} + +sub reformat_date { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $date, $output_format, $longformat) = @_; + + $main::lxdebug->leave_sub() and return "" unless ($date); + + my ($yy, $mm, $dd) = $self->parse_date($myconfig, $date); + + $output_format =~ /d+/; + substr($output_format, $-[0], $+[0] - $-[0]) = + sprintf("%0" . (length($&)) . "d", $dd); + + $output_format =~ /m+/; + substr($output_format, $-[0], $+[0] - $-[0]) = + sprintf("%0" . (length($&)) . "d", $mm); + + $output_format =~ /y+/; + if (length($&) == 2) { + $yy -= $yy >= 2000 ? 2000 : 1900; + } + substr($output_format, $-[0], $+[0] - $-[0]) = + sprintf("%0" . (length($&)) . "d", $yy); + + $main::lxdebug->leave_sub(); + + return $output_format; +} + +1; diff --git a/am.pl b/am.pl index df71c21e5..b8a8b2d1b 100755 --- a/am.pl +++ b/am.pl @@ -43,6 +43,7 @@ use SL::LXDebug; $lxdebug = LXDebug->new(); use SL::Form; +use SL::Locale; eval { require "lx-erp.conf"; }; diff --git a/bin/mozilla/installationcheck.pl b/bin/mozilla/installationcheck.pl new file mode 100644 index 000000000..6e1dfc6b4 --- /dev/null +++ b/bin/mozilla/installationcheck.pl @@ -0,0 +1,85 @@ +use SL::InstallationCheck; + +sub verify_installation { + my $script = $0; + $script =~ s|.*/||; + + return unless ($form{"action"} && ($script eq "login.pl")); + + my @missing_modules = SL::InstallationCheck::test_all_modules(); + return if (scalar(@missing_modules) == 0); + + use SL::Locale; + my $locale = new Locale($language, "installationcheck"); + + print(qq|content-type: text/html + + + + + | . $locale->text("One or more Perl modules missing") . qq| + + + +

| . $locale->text("One or more Perl modules missing") . qq|

+ +

| . $locale->text("At least one Perl module that Lx-Office ERP " . + "requires for running is not installed on your " . + "system.") . + " " . + $locale->text("Please install the below listed modules or ask your " . + "system administrator to.") . + " " . + $locale->text("You cannot continue before all required modules are " . + "installed.") . qq|

+ +

+ + + + + + +|); + + my $odd = 1; + foreach my $module (@missing_modules) { + print(qq| + + + + |); + $odd = 1 - $odd; + } + + print(qq| +
| . $locale->text("Module name") . qq|| . $locale->text("Module home page") . qq|
$module->{name}$module->{url}
+

+ +

| . $locale->text("There are usually three ways to install " . + "Perl modules.") . + " " . + $locale->text("The preferred one is to install packages provided by " . + "your operating system distribution (e.g. Debian or " . + "RPM packages).") . qq|

+ +

| . $locale->text("The second way is to use Perl's CPAN module and let " . + "it download and install the module for you.") . + " " . + $locale->text("Here's an example command line:") . qq|

+ +

perl -MCPAN -e "install CGI::Ajax"

+ +

| . $locale->text("The third way is to download the module from the " . + "above mentioned URL and to install the module " . + "manually following the installations instructions " . + "contained in the source archive.") . qq|

+ + + +|); + exit(0); +} + +1; diff --git a/locale/de/all b/locale/de/all index 2047b99b8..f0d48adbb 100644 --- a/locale/de/all +++ b/locale/de/all @@ -117,6 +117,7 @@ aktualisieren wollen?', 'Assign new units' => 'Neue Einheiten zuweisen', 'Assign units' => 'Einheiten zuweisen', 'Assume Tax Consultant Data in Tax Computation?' => 'Beraterdaten in UStVA übernehmen?', + 'At least one Perl module that Lx-Office ERP requires for running is not installed on your system.' => 'Mindestes ein Perl-Modul, das Lx-Office ERP zur Ausführung benötigt, ist auf Ihrem System nicht installiert.', 'Attach PDF:' => 'PDF anhängen', 'Attachment' => 'als Anhang', 'Audit Control' => 'Bücherkontrolle', @@ -470,6 +471,7 @@ gestartet', 'HTML' => 'HTML', 'Heading' => 'Überschrift', 'Help' => 'Hilfe', + 'Here\'s an example command line:' => 'Hier ist eine Kommandozeile, die als Beispiel dient:', 'Hide by default' => 'Standardmäßig verstecken', 'Hint-Missing-Preferences' => 'Bitte fehlende USTVA Einstellungen ergänzen (Menüpunkt: Programm)', 'Hints' => 'Hinweise', @@ -619,6 +621,8 @@ gestartet', 'Mobile1' => 'Mobile 1', 'Mobile2' => 'Mobile 2', 'Model' => 'Modell', + 'Module home page' => 'Modul-Webseite', + 'Module name' => 'Modulname', 'Monat' => 'Monat', 'Monthly' => 'monatlich', 'More than one control file with the tag \'%s\' exist.' => 'Es gibt mehr als eine Kontrolldatei mit dem Tag \'%s\'.', @@ -671,6 +675,7 @@ gestartet', 'Old (on the side)' => 'Alt (seitlich)', 'On Hand' => 'Auf Lager', 'On Order' => 'Ist bestellt', + 'One or more Perl modules missing' => 'Ein oder mehr Perl-Module fehlen', 'Open' => 'Offen', 'OpenDocument/OASIS' => 'OpenDocument/OASIS', 'Openings' => 'Öffnungszeiten', @@ -730,6 +735,7 @@ gestartet', 'Please insert object dimensions below.' => 'Bitte geben Sie die Abmessungen unten ein', 'Please insert your language values below' => 'Bitte die Übersetzungen unten eintragen', 'Please insert your longdescription below' => 'Bitte den Langtext eingeben', + 'Please install the below listed modules or ask your system administrator to.' => 'Bitte installieren Sie die unten aufgeführten Module, oder bitten Sie Ihren Administrator darum.', 'Please select a customer from the list below.' => 'Bitte einen Endkunden aus der Liste auswählen', 'Please select a vendor from the list below.' => 'Bitte einen Händler aus der Liste auswählen', 'Please select the chart of accounts this installation is using from the list below.' => 'Bitte wählen Sie den Kontenrahmen aus, der bei dieser Installation verwendet wird.', @@ -969,12 +975,16 @@ gestartet', 'The name is missing in row %d.' => 'Der Name fehlt in Zeile %d.', 'The name is missing.' => 'Der Name fehlt.', 'The passwords do not match.' => 'Die Passwörter stimmen nicht überein.', + 'The preferred one is to install packages provided by your operating system distribution (e.g. Debian or RPM packages).' => 'Die bevorzugte Art, ein Perl-Modul zu installieren, ist durch Installation eines von Ihrem Betriebssystem zur Verfügung gestellten Paketes (z.B. Debian-Pakete oder RPM).', + 'The second way is to use Perl\'s CPAN module and let it download and install the module for you.' => 'Die zweite Variante besteht darin, Perls CPAN-Modul zu benutzen und es das Modul für Sie installieren zu lassen.', + 'The third way is to download the module from the above mentioned URL and to install the module manually following the installations instructions contained in the source archive.' => 'Die dritte Variante besteht darin, das Paket von der oben genannten URL herunterzuladen und es manuell zu installieren. Beachten Sie dabei die im Paket enthaltenen Installationsanweisungen.', 'The unit has been saved.' => 'Die Einheit wurde gespeichert.', 'The unit in row %d has been deleted in the meantime.' => 'Die Einheit in Zeile %d ist in der Zwischentzeit gelöscht worden.', 'The unit in row %d has been used in the meantime and cannot be changed anymore.' => 'Die Einheit in Zeile %d wurde in der Zwischenzeit benutzt und kann nicht mehr geändert werden.', 'The units have been saved.' => 'Die Einheiten wurden gespeichert.', 'There are four tax zones.' => 'Es gibt vier Steuerzonen.', 'There are still entries in the database for which no unit has been assigned.' => 'Es gibt noch Einträge in der Datenbank, für die keine Einheit zugeordnet ist.', + 'There are usually three ways to install Perl modules.' => 'Es gibt normalerweise drei Arten, ein Perlmodul zu installieren.', 'There is nothing to do in this step.' => 'In diesem Schritt gibt es nichts mehr zu tun.', 'Therefore there\'s no need to create the same article more than once if it is sold or bought in/from another tax zone.' => 'Deswegen muss man den gleichen Artikel nicht mehr mehrmals anlegen, wenn er in verschiedenen Steuerzonen gehandelt werden soll.', 'These units can be based on other units so that Lx-Office can convert prices when the user switches from one unit to another.' => 'Diese Einheiten können auf anderen Einheiten basieren, sodass Lx-Office Preise umrechnen kann, wenn der Benutzer von einer Einheit zu einer anderen Wechselt.', @@ -1113,6 +1123,7 @@ gestartet', 'Yes' => 'Ja', 'You are logged out!' => 'Auf Wiedersehen!', 'You can also create new units now.' => 'Sie können jetzt auch neue Einheiten anlegen.', + 'You cannot continue before all required modules are installed.' => 'Sie können nicht fortfahren, bevor alle benötigten Pakete installiert sind.', 'You cannot continue until all unknown units have been mapped to known ones.' => 'Sie können nicht fortfahren, bis alle unbekannten Einheiten in neue Einheiten umgewandelt wurden.', 'You did not enter a name!' => 'Sie haben keinen Namen eingegeben!', 'You have to chose a dimension unit and a service unit which will then be assigned to those entries.' => 'Sie müssen eine Maß- und eine Dienstleistungseinheit auswählen, die diesen Waren und Dienstleistungen, denen noch keine Einheit zugeordnet ist, zugeordnet wird.', diff --git a/locale/de/installationcheck b/locale/de/installationcheck new file mode 100644 index 000000000..85238f044 --- /dev/null +++ b/locale/de/installationcheck @@ -0,0 +1,19 @@ +$self->{texts} = { + 'At least one Perl module that Lx-Office ERP requires for running is not installed on your system.' => 'Mindestes ein Perl-Modul, das Lx-Office ERP zur Ausführung benötigt, ist auf Ihrem System nicht installiert.', + 'Here\'s an example command line:' => 'Hier ist eine Kommandozeile, die als Beispiel dient:', + 'Module home page' => 'Modul-Webseite', + 'Module name' => 'Modulname', + 'One or more Perl modules missing' => 'Ein oder mehr Perl-Module fehlen', + 'Please install the below listed modules or ask your system administrator to.' => 'Bitte installieren Sie die unten aufgeführten Module, oder bitten Sie Ihren Administrator darum.', + 'The preferred one is to install packages provided by your operating system distribution (e.g. Debian or RPM packages).' => 'Die bevorzugte Art, ein Perl-Modul zu installieren, ist durch Installation eines von Ihrem Betriebssystem zur Verfügung gestellten Paketes (z.B. Debian-Pakete oder RPM).', + 'The second way is to use Perl\'s CPAN module and let it download and install the module for you.' => 'Die zweite Variante besteht darin, Perls CPAN-Modul zu benutzen und es das Modul für Sie installieren zu lassen.', + 'The third way is to download the module from the above mentioned URL and to install the module manually following the installations instructions contained in the source archive.' => 'Die dritte Variante besteht darin, das Paket von der oben genannten URL herunterzuladen und es manuell zu installieren. Beachten Sie dabei die im Paket enthaltenen Installationsanweisungen.', + 'There are usually three ways to install Perl modules.' => 'Es gibt normalerweise drei Arten, ein Perlmodul zu installieren.', + 'You cannot continue before all required modules are installed.' => 'Sie können nicht fortfahren, bevor alle benötigten Pakete installiert sind.', +}; + +$self->{subs} = { + 'verify_installation' => 'verify_installation', +}; + +1; diff --git a/login.pl b/login.pl index 376ea98bf..2d4c34e36 100755 --- a/login.pl +++ b/login.pl @@ -74,6 +74,9 @@ Login disabled!\n"; exit; } +require "bin/mozilla/installationcheck.pl"; +verify_installation(); + if ($form{path}) { $form{path} =~ s/%2f/\//gi; $form{path} =~ s/\.\.\///g; -- 2.20.1