Revision 541272c5
Von Moritz Bunkus vor etwa 18 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
2413 | 2413 |
|
2414 | 2414 |
} |
2415 | 2415 |
|
2416 |
package Locale; |
|
2417 |
|
|
2418 |
sub new { |
|
2419 |
$main::lxdebug->enter_sub(); |
|
2420 |
|
|
2421 |
my ($type, $country, $NLS_file) = @_; |
|
2422 |
my $self = {}; |
|
2423 |
|
|
2424 |
if ($country && -d "locale/$country") { |
|
2425 |
local *IN; |
|
2426 |
$self->{countrycode} = $country; |
|
2427 |
if (open(IN, "locale/$country/$NLS_file")) { |
|
2428 |
my $code = join("", <IN>); |
|
2429 |
eval($code); |
|
2430 |
close(IN); |
|
2431 |
} |
|
2432 |
} |
|
2433 |
|
|
2434 |
$self->{NLS_file} = $NLS_file; |
|
2435 |
|
|
2436 |
push @{ $self->{LONG_MONTH} }, |
|
2437 |
("January", "February", "March", "April", |
|
2438 |
"May ", "June", "July", "August", |
|
2439 |
"September", "October", "November", "December"); |
|
2440 |
push @{ $self->{SHORT_MONTH} }, |
|
2441 |
(qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)); |
|
2442 |
|
|
2443 |
$main::lxdebug->leave_sub(); |
|
2444 |
|
|
2445 |
bless $self, $type; |
|
2446 |
} |
|
2447 |
|
|
2448 |
sub text { |
|
2449 |
my ($self, $text) = @_; |
|
2450 |
|
|
2451 |
return (exists $self->{texts}{$text}) ? $self->{texts}{$text} : $text; |
|
2452 |
} |
|
2453 |
|
|
2454 |
sub findsub { |
|
2455 |
$main::lxdebug->enter_sub(); |
|
2456 |
|
|
2457 |
my ($self, $text) = @_; |
|
2458 |
|
|
2459 |
if (exists $self->{subs}{$text}) { |
|
2460 |
$text = $self->{subs}{$text}; |
|
2461 |
} else { |
|
2462 |
if ($self->{countrycode} && $self->{NLS_file}) { |
|
2463 |
Form->error( |
|
2464 |
"$text not defined in locale/$self->{countrycode}/$self->{NLS_file}"); |
|
2465 |
} |
|
2466 |
} |
|
2467 |
|
|
2468 |
$main::lxdebug->leave_sub(); |
|
2469 |
|
|
2470 |
return $text; |
|
2471 |
} |
|
2472 |
|
|
2473 |
sub date { |
|
2474 |
$main::lxdebug->enter_sub(); |
|
2475 |
|
|
2476 |
my ($self, $myconfig, $date, $longformat) = @_; |
|
2477 |
|
|
2478 |
my $longdate = ""; |
|
2479 |
my $longmonth = ($longformat) ? 'LONG_MONTH' : 'SHORT_MONTH'; |
|
2480 |
|
|
2481 |
if ($date) { |
|
2482 |
|
|
2483 |
# get separator |
|
2484 |
$spc = $myconfig->{dateformat}; |
|
2485 |
$spc =~ s/\w//g; |
|
2486 |
$spc = substr($spc, 1, 1); |
|
2487 |
|
|
2488 |
if ($date =~ /\D/) { |
|
2489 |
if ($myconfig->{dateformat} =~ /^yy/) { |
|
2490 |
($yy, $mm, $dd) = split /\D/, $date; |
|
2491 |
} |
|
2492 |
if ($myconfig->{dateformat} =~ /^mm/) { |
|
2493 |
($mm, $dd, $yy) = split /\D/, $date; |
|
2494 |
} |
|
2495 |
if ($myconfig->{dateformat} =~ /^dd/) { |
|
2496 |
($dd, $mm, $yy) = split /\D/, $date; |
|
2497 |
} |
|
2498 |
} else { |
|
2499 |
$date = substr($date, 2); |
|
2500 |
($yy, $mm, $dd) = ($date =~ /(..)(..)(..)/); |
|
2501 |
} |
|
2502 |
|
|
2503 |
$dd *= 1; |
|
2504 |
$mm--; |
|
2505 |
$yy = ($yy < 70) ? $yy + 2000 : $yy; |
|
2506 |
$yy = ($yy >= 70 && $yy <= 99) ? $yy + 1900 : $yy; |
|
2507 |
|
|
2508 |
if ($myconfig->{dateformat} =~ /^dd/) { |
|
2509 |
if (defined $longformat && $longformat == 0) { |
|
2510 |
$mm++; |
|
2511 |
$dd = "0$dd" if ($dd < 10); |
|
2512 |
$mm = "0$mm" if ($mm < 10); |
|
2513 |
$longdate = "$dd$spc$mm$spc$yy"; |
|
2514 |
} else { |
|
2515 |
$longdate = "$dd"; |
|
2516 |
$longdate .= ($spc eq '.') ? ". " : " "; |
|
2517 |
$longdate .= &text($self, $self->{$longmonth}[$mm]) . " $yy"; |
|
2518 |
} |
|
2519 |
} elsif ($myconfig->{dateformat} eq "yyyy-mm-dd") { |
|
2520 |
|
|
2521 |
# Use German syntax with the ISO date style "yyyy-mm-dd" because |
|
2522 |
# Lx-Office is mainly used in Germany or German speaking countries. |
|
2523 |
if (defined $longformat && $longformat == 0) { |
|
2524 |
$mm++; |
|
2525 |
$dd = "0$dd" if ($dd < 10); |
|
2526 |
$mm = "0$mm" if ($mm < 10); |
|
2527 |
$longdate = "$yy-$mm-$dd"; |
|
2528 |
} else { |
|
2529 |
$longdate = "$dd. "; |
|
2530 |
$longdate .= &text($self, $self->{$longmonth}[$mm]) . " $yy"; |
|
2531 |
} |
|
2532 |
} else { |
|
2533 |
if (defined $longformat && $longformat == 0) { |
|
2534 |
$mm++; |
|
2535 |
$dd = "0$dd" if ($dd < 10); |
|
2536 |
$mm = "0$mm" if ($mm < 10); |
|
2537 |
$longdate = "$mm$spc$dd$spc$yy"; |
|
2538 |
} else { |
|
2539 |
$longdate = &text($self, $self->{$longmonth}[$mm]) . " $dd, $yy"; |
|
2540 |
} |
|
2541 |
} |
|
2542 |
|
|
2543 |
} |
|
2544 |
|
|
2545 |
$main::lxdebug->leave_sub(); |
|
2546 |
|
|
2547 |
return $longdate; |
|
2548 |
} |
|
2549 |
|
|
2550 |
sub parse_date { |
|
2551 |
$main::lxdebug->enter_sub(); |
|
2552 |
|
|
2553 |
my ($self, $myconfig, $date, $longformat) = @_; |
|
2554 |
|
|
2555 |
unless ($date) { |
|
2556 |
$main::lxdebug->leave_sub(); |
|
2557 |
return (); |
|
2558 |
} |
|
2559 |
|
|
2560 |
# get separator |
|
2561 |
$spc = $myconfig->{dateformat}; |
|
2562 |
$spc =~ s/\w//g; |
|
2563 |
$spc = substr($spc, 1, 1); |
|
2564 |
|
|
2565 |
if ($date =~ /\D/) { |
|
2566 |
if ($myconfig->{dateformat} =~ /^yy/) { |
|
2567 |
($yy, $mm, $dd) = split /\D/, $date; |
|
2568 |
} elsif ($myconfig->{dateformat} =~ /^mm/) { |
|
2569 |
($mm, $dd, $yy) = split /\D/, $date; |
|
2570 |
} elsif ($myconfig->{dateformat} =~ /^dd/) { |
|
2571 |
($dd, $mm, $yy) = split /\D/, $date; |
|
2572 |
} |
|
2573 |
} else { |
|
2574 |
$date = substr($date, 2); |
|
2575 |
($yy, $mm, $dd) = ($date =~ /(..)(..)(..)/); |
|
2576 |
} |
|
2577 |
|
|
2578 |
$dd *= 1; |
|
2579 |
$mm *= 1; |
|
2580 |
$yy = ($yy < 70) ? $yy + 2000 : $yy; |
|
2581 |
$yy = ($yy >= 70 && $yy <= 99) ? $yy + 1900 : $yy; |
|
2582 |
|
|
2583 |
$main::lxdebug->leave_sub(); |
|
2584 |
return ($yy, $mm, $dd); |
|
2585 |
} |
|
2586 |
|
|
2587 |
sub reformat_date { |
|
2588 |
$main::lxdebug->enter_sub(); |
|
2589 |
|
|
2590 |
my ($self, $myconfig, $date, $output_format, $longformat) = @_; |
|
2591 |
|
|
2592 |
$main::lxdebug->leave_sub() and return "" unless ($date); |
|
2593 |
|
|
2594 |
my ($yy, $mm, $dd) = $self->parse_date($myconfig, $date); |
|
2595 |
|
|
2596 |
$output_format =~ /d+/; |
|
2597 |
substr($output_format, $-[0], $+[0] - $-[0]) = |
|
2598 |
sprintf("%0" . (length($&)) . "d", $dd); |
|
2599 |
|
|
2600 |
$output_format =~ /m+/; |
|
2601 |
substr($output_format, $-[0], $+[0] - $-[0]) = |
|
2602 |
sprintf("%0" . (length($&)) . "d", $mm); |
|
2603 |
|
|
2604 |
$output_format =~ /y+/; |
|
2605 |
if (length($&) == 2) { |
|
2606 |
$yy -= $yy >= 2000 ? 2000 : 1900; |
|
2607 |
} |
|
2608 |
substr($output_format, $-[0], $+[0] - $-[0]) = |
|
2609 |
sprintf("%0" . (length($&)) . "d", $yy); |
|
2610 |
|
|
2611 |
$main::lxdebug->leave_sub(); |
|
2612 |
|
|
2613 |
return $output_format; |
|
2614 |
} |
|
2615 |
|
|
2616 | 2416 |
1; |
SL/InstallationCheck.pm | ||
---|---|---|
11 | 11 |
{ "name" => "HTML::Template", "url" => "http://search.cpan.org/~samtregar/" }, |
12 | 12 |
{ "name" => "Archive::Zip", "url" => "http://search.cpan.org/~adamk/" }, |
13 | 13 |
{ "name" => "Text::Iconv", "url" => "http://search.cpan.org/~mpiotr/" }, |
14 |
{ "name" => "Klaus", "url" => "http://dum.my/" }, |
|
15 | 14 |
); |
16 | 15 |
|
17 | 16 |
sub module_available { |
... | ... | |
27 | 26 |
sub test_all_modules { |
28 | 27 |
my @missing_modules; |
29 | 28 |
|
30 |
map({ push(@missing_modules, $_) unless (module_available($_)); } |
|
29 |
map({ push(@missing_modules, $_) unless (module_available($_->{"name"})); }
|
|
31 | 30 |
@required_modules); |
32 | 31 |
|
33 | 32 |
return @missing_modules; |
SL/Locale.pm | ||
---|---|---|
1 |
#==================================================================== |
|
2 |
# LX-Office ERP |
|
3 |
# Copyright (C) 2004 |
|
4 |
# Based on SQL-Ledger Version 2.1.9 |
|
5 |
# Web http://www.lx-office.org |
|
6 |
# |
|
7 |
#===================================================================== |
|
8 |
# SQL-Ledger Accounting |
|
9 |
# Copyright (C) 1998-2002 |
|
10 |
# |
|
11 |
# Author: Dieter Simader |
|
12 |
# Email: dsimader@sql-ledger.org |
|
13 |
# Web: http://www.sql-ledger.org |
|
14 |
# |
|
15 |
# Contributors: Thomas Bayen <bayen@gmx.de> |
|
16 |
# Antti Kaihola <akaihola@siba.fi> |
|
17 |
# Moritz Bunkus (tex code) |
|
18 |
# |
|
19 |
# This program is free software; you can redistribute it and/or modify |
|
20 |
# it under the terms of the GNU General Public License as published by |
|
21 |
# the Free Software Foundation; either version 2 of the License, or |
|
22 |
# (at your option) any later version. |
|
23 |
# |
|
24 |
# This program is distributed in the hope that it will be useful, |
|
25 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
26 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
27 |
# GNU General Public License for more details. |
|
28 |
# You should have received a copy of the GNU General Public License |
|
29 |
# along with this program; if not, write to the Free Software |
|
30 |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|
31 |
#====================================================================== |
|
32 |
# |
|
33 |
# Translations and number/date formatting |
|
34 |
# |
|
35 |
#====================================================================== |
|
36 |
|
|
37 |
package Locale; |
|
38 |
|
|
39 |
use SL::LXDebug; |
|
40 |
|
|
41 |
sub new { |
|
42 |
$main::lxdebug->enter_sub(); |
|
43 |
|
|
44 |
my ($type, $country, $NLS_file) = @_; |
|
45 |
my $self = {}; |
|
46 |
|
|
47 |
if ($country && -d "locale/$country") { |
|
48 |
local *IN; |
|
49 |
$self->{countrycode} = $country; |
|
50 |
if (open(IN, "locale/$country/$NLS_file")) { |
|
51 |
my $code = join("", <IN>); |
|
52 |
eval($code); |
|
53 |
close(IN); |
|
54 |
} |
|
55 |
} |
|
56 |
|
|
57 |
$self->{NLS_file} = $NLS_file; |
|
58 |
|
|
59 |
push @{ $self->{LONG_MONTH} }, |
|
60 |
("January", "February", "March", "April", |
|
61 |
"May ", "June", "July", "August", |
|
62 |
"September", "October", "November", "December"); |
|
63 |
push @{ $self->{SHORT_MONTH} }, |
|
64 |
(qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)); |
|
65 |
|
|
66 |
$main::lxdebug->leave_sub(); |
|
67 |
|
|
68 |
bless $self, $type; |
|
69 |
} |
|
70 |
|
|
71 |
sub text { |
|
72 |
my ($self, $text) = @_; |
|
73 |
|
|
74 |
return (exists $self->{texts}{$text}) ? $self->{texts}{$text} : $text; |
|
75 |
} |
|
76 |
|
|
77 |
sub findsub { |
|
78 |
$main::lxdebug->enter_sub(); |
|
79 |
|
|
80 |
my ($self, $text) = @_; |
|
81 |
|
|
82 |
if (exists $self->{subs}{$text}) { |
|
83 |
$text = $self->{subs}{$text}; |
|
84 |
} else { |
|
85 |
if ($self->{countrycode} && $self->{NLS_file}) { |
|
86 |
Form->error( |
|
87 |
"$text not defined in locale/$self->{countrycode}/$self->{NLS_file}"); |
|
88 |
} |
|
89 |
} |
|
90 |
|
|
91 |
$main::lxdebug->leave_sub(); |
|
92 |
|
|
93 |
return $text; |
|
94 |
} |
|
95 |
|
|
96 |
sub date { |
|
97 |
$main::lxdebug->enter_sub(); |
|
98 |
|
|
99 |
my ($self, $myconfig, $date, $longformat) = @_; |
|
100 |
|
|
101 |
my $longdate = ""; |
|
102 |
my $longmonth = ($longformat) ? 'LONG_MONTH' : 'SHORT_MONTH'; |
|
103 |
|
|
104 |
if ($date) { |
|
105 |
|
|
106 |
# get separator |
|
107 |
$spc = $myconfig->{dateformat}; |
|
108 |
$spc =~ s/\w//g; |
|
109 |
$spc = substr($spc, 1, 1); |
|
110 |
|
|
111 |
if ($date =~ /\D/) { |
|
112 |
if ($myconfig->{dateformat} =~ /^yy/) { |
|
113 |
($yy, $mm, $dd) = split /\D/, $date; |
|
114 |
} |
|
115 |
if ($myconfig->{dateformat} =~ /^mm/) { |
|
116 |
($mm, $dd, $yy) = split /\D/, $date; |
|
117 |
} |
|
118 |
if ($myconfig->{dateformat} =~ /^dd/) { |
|
119 |
($dd, $mm, $yy) = split /\D/, $date; |
|
120 |
} |
|
121 |
} else { |
|
122 |
$date = substr($date, 2); |
|
123 |
($yy, $mm, $dd) = ($date =~ /(..)(..)(..)/); |
|
124 |
} |
|
125 |
|
|
126 |
$dd *= 1; |
|
127 |
$mm--; |
|
128 |
$yy = ($yy < 70) ? $yy + 2000 : $yy; |
|
129 |
$yy = ($yy >= 70 && $yy <= 99) ? $yy + 1900 : $yy; |
|
130 |
|
|
131 |
if ($myconfig->{dateformat} =~ /^dd/) { |
|
132 |
if (defined $longformat && $longformat == 0) { |
|
133 |
$mm++; |
|
134 |
$dd = "0$dd" if ($dd < 10); |
|
135 |
$mm = "0$mm" if ($mm < 10); |
|
136 |
$longdate = "$dd$spc$mm$spc$yy"; |
|
137 |
} else { |
|
138 |
$longdate = "$dd"; |
|
139 |
$longdate .= ($spc eq '.') ? ". " : " "; |
|
140 |
$longdate .= &text($self, $self->{$longmonth}[$mm]) . " $yy"; |
|
141 |
} |
|
142 |
} elsif ($myconfig->{dateformat} eq "yyyy-mm-dd") { |
|
143 |
|
|
144 |
# Use German syntax with the ISO date style "yyyy-mm-dd" because |
|
145 |
# Lx-Office is mainly used in Germany or German speaking countries. |
|
146 |
if (defined $longformat && $longformat == 0) { |
|
147 |
$mm++; |
|
148 |
$dd = "0$dd" if ($dd < 10); |
|
149 |
$mm = "0$mm" if ($mm < 10); |
|
150 |
$longdate = "$yy-$mm-$dd"; |
|
151 |
} else { |
|
152 |
$longdate = "$dd. "; |
|
153 |
$longdate .= &text($self, $self->{$longmonth}[$mm]) . " $yy"; |
|
154 |
} |
|
155 |
} else { |
|
156 |
if (defined $longformat && $longformat == 0) { |
|
157 |
$mm++; |
|
158 |
$dd = "0$dd" if ($dd < 10); |
|
159 |
$mm = "0$mm" if ($mm < 10); |
|
160 |
$longdate = "$mm$spc$dd$spc$yy"; |
|
161 |
} else { |
|
162 |
$longdate = &text($self, $self->{$longmonth}[$mm]) . " $dd, $yy"; |
|
163 |
} |
|
164 |
} |
|
165 |
|
|
166 |
} |
|
167 |
|
|
168 |
$main::lxdebug->leave_sub(); |
|
169 |
|
|
170 |
return $longdate; |
|
171 |
} |
|
172 |
|
|
173 |
sub parse_date { |
|
174 |
$main::lxdebug->enter_sub(); |
|
175 |
|
|
176 |
my ($self, $myconfig, $date, $longformat) = @_; |
|
177 |
|
|
178 |
unless ($date) { |
|
179 |
$main::lxdebug->leave_sub(); |
|
180 |
return (); |
|
181 |
} |
|
182 |
|
|
183 |
# get separator |
|
184 |
$spc = $myconfig->{dateformat}; |
|
185 |
$spc =~ s/\w//g; |
|
186 |
$spc = substr($spc, 1, 1); |
|
187 |
|
|
188 |
if ($date =~ /\D/) { |
|
189 |
if ($myconfig->{dateformat} =~ /^yy/) { |
|
190 |
($yy, $mm, $dd) = split /\D/, $date; |
|
191 |
} elsif ($myconfig->{dateformat} =~ /^mm/) { |
|
192 |
($mm, $dd, $yy) = split /\D/, $date; |
|
193 |
} elsif ($myconfig->{dateformat} =~ /^dd/) { |
|
194 |
($dd, $mm, $yy) = split /\D/, $date; |
|
195 |
} |
|
196 |
} else { |
|
197 |
$date = substr($date, 2); |
|
198 |
($yy, $mm, $dd) = ($date =~ /(..)(..)(..)/); |
|
199 |
} |
|
200 |
|
|
201 |
$dd *= 1; |
|
202 |
$mm *= 1; |
|
203 |
$yy = ($yy < 70) ? $yy + 2000 : $yy; |
|
204 |
$yy = ($yy >= 70 && $yy <= 99) ? $yy + 1900 : $yy; |
|
205 |
|
|
206 |
$main::lxdebug->leave_sub(); |
|
207 |
return ($yy, $mm, $dd); |
|
208 |
} |
|
209 |
|
|
210 |
sub reformat_date { |
|
211 |
$main::lxdebug->enter_sub(); |
|
212 |
|
|
213 |
my ($self, $myconfig, $date, $output_format, $longformat) = @_; |
|
214 |
|
|
215 |
$main::lxdebug->leave_sub() and return "" unless ($date); |
|
216 |
|
|
217 |
my ($yy, $mm, $dd) = $self->parse_date($myconfig, $date); |
|
218 |
|
|
219 |
$output_format =~ /d+/; |
|
220 |
substr($output_format, $-[0], $+[0] - $-[0]) = |
|
221 |
sprintf("%0" . (length($&)) . "d", $dd); |
|
222 |
|
|
223 |
$output_format =~ /m+/; |
|
224 |
substr($output_format, $-[0], $+[0] - $-[0]) = |
|
225 |
sprintf("%0" . (length($&)) . "d", $mm); |
|
226 |
|
|
227 |
$output_format =~ /y+/; |
|
228 |
if (length($&) == 2) { |
|
229 |
$yy -= $yy >= 2000 ? 2000 : 1900; |
|
230 |
} |
|
231 |
substr($output_format, $-[0], $+[0] - $-[0]) = |
|
232 |
sprintf("%0" . (length($&)) . "d", $yy); |
|
233 |
|
|
234 |
$main::lxdebug->leave_sub(); |
|
235 |
|
|
236 |
return $output_format; |
|
237 |
} |
|
238 |
|
|
239 |
1; |
am.pl | ||
---|---|---|
43 | 43 |
$lxdebug = LXDebug->new(); |
44 | 44 |
|
45 | 45 |
use SL::Form; |
46 |
use SL::Locale; |
|
46 | 47 |
|
47 | 48 |
eval { require "lx-erp.conf"; }; |
48 | 49 |
|
bin/mozilla/installationcheck.pl | ||
---|---|---|
1 |
use SL::InstallationCheck; |
|
2 |
|
|
3 |
sub verify_installation { |
|
4 |
my $script = $0; |
|
5 |
$script =~ s|.*/||; |
|
6 |
|
|
7 |
return unless ($form{"action"} && ($script eq "login.pl")); |
|
8 |
|
|
9 |
my @missing_modules = SL::InstallationCheck::test_all_modules(); |
|
10 |
return if (scalar(@missing_modules) == 0); |
|
11 |
|
|
12 |
use SL::Locale; |
|
13 |
my $locale = new Locale($language, "installationcheck"); |
|
14 |
|
|
15 |
print(qq|content-type: text/html |
|
16 |
|
|
17 |
<html> |
|
18 |
<head> |
|
19 |
<link rel="stylesheet" href="css/lx-office-erp.css" type="text/css" |
|
20 |
title="Lx-Office stylesheet"> |
|
21 |
<title>| . $locale->text("One or more Perl modules missing") . qq|</title> |
|
22 |
</head> |
|
23 |
<body> |
|
24 |
|
|
25 |
<h1>| . $locale->text("One or more Perl modules missing") . qq|</h1> |
|
26 |
|
|
27 |
<p>| . $locale->text("At least one Perl module that Lx-Office ERP " . |
|
28 |
"requires for running is not installed on your " . |
|
29 |
"system.") . |
|
30 |
" " . |
|
31 |
$locale->text("Please install the below listed modules or ask your " . |
|
32 |
"system administrator to.") . |
|
33 |
" " . |
|
34 |
$locale->text("You cannot continue before all required modules are " . |
|
35 |
"installed.") . qq|</p> |
|
36 |
|
|
37 |
<p> |
|
38 |
<table> |
|
39 |
<tr> |
|
40 |
<th class="listheading">| . $locale->text("Module name") . qq|</th> |
|
41 |
<th class="listheading">| . $locale->text("Module home page") . qq|</th> |
|
42 |
</tr> |
|
43 |
|
|
44 |
|); |
|
45 |
|
|
46 |
my $odd = 1; |
|
47 |
foreach my $module (@missing_modules) { |
|
48 |
print(qq| |
|
49 |
<tr class="listrow${odd}"> |
|
50 |
<td><code>$module->{name}</code></td> |
|
51 |
<td><a href="$module->{url}">$module->{url}</a></td> |
|
52 |
</tr>|); |
|
53 |
$odd = 1 - $odd; |
|
54 |
} |
|
55 |
|
|
56 |
print(qq| |
|
57 |
</table> |
|
58 |
</p> |
|
59 |
|
|
60 |
<p>| . $locale->text("There are usually three ways to install " . |
|
61 |
"Perl modules.") . |
|
62 |
" " . |
|
63 |
$locale->text("The preferred one is to install packages provided by " . |
|
64 |
"your operating system distribution (e.g. Debian or " . |
|
65 |
"RPM packages).") . qq|</p> |
|
66 |
|
|
67 |
<p>| . $locale->text("The second way is to use Perl's CPAN module and let " . |
|
68 |
"it download and install the module for you.") . |
|
69 |
" " . |
|
70 |
$locale->text("Here's an example command line:") . qq|</p> |
|
71 |
|
|
72 |
<p><code>perl -MCPAN -e "install CGI::Ajax"</code></p> |
|
73 |
|
|
74 |
<p>| . $locale->text("The third way is to download the module from the " . |
|
75 |
"above mentioned URL and to install the module " . |
|
76 |
"manually following the installations instructions " . |
|
77 |
"contained in the source archive.") . qq|</p> |
|
78 |
|
|
79 |
</body> |
|
80 |
</html> |
|
81 |
|); |
|
82 |
exit(0); |
|
83 |
} |
|
84 |
|
|
85 |
1; |
locale/de/all | ||
---|---|---|
117 | 117 |
'Assign new units' => 'Neue Einheiten zuweisen', |
118 | 118 |
'Assign units' => 'Einheiten zuweisen', |
119 | 119 |
'Assume Tax Consultant Data in Tax Computation?' => 'Beraterdaten in UStVA ?bernehmen?', |
120 |
'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.', |
|
120 | 121 |
'Attach PDF:' => 'PDF anh?ngen', |
121 | 122 |
'Attachment' => 'als Anhang', |
122 | 123 |
'Audit Control' => 'B?cherkontrolle', |
... | ... | |
470 | 471 |
'HTML' => 'HTML', |
471 | 472 |
'Heading' => '?berschrift', |
472 | 473 |
'Help' => 'Hilfe', |
474 |
'Here\'s an example command line:' => 'Hier ist eine Kommandozeile, die als Beispiel dient:', |
|
473 | 475 |
'Hide by default' => 'Standardmäßig verstecken', |
474 | 476 |
'Hint-Missing-Preferences' => 'Bitte fehlende USTVA Einstellungen erg?nzen (Men?punkt: Programm)', |
475 | 477 |
'Hints' => 'Hinweise', |
... | ... | |
619 | 621 |
'Mobile1' => 'Mobile 1', |
620 | 622 |
'Mobile2' => 'Mobile 2', |
621 | 623 |
'Model' => 'Modell', |
624 |
'Module home page' => 'Modul-Webseite', |
|
625 |
'Module name' => 'Modulname', |
|
622 | 626 |
'Monat' => 'Monat', |
623 | 627 |
'Monthly' => 'monatlich', |
624 | 628 |
'More than one control file with the tag \'%s\' exist.' => 'Es gibt mehr als eine Kontrolldatei mit dem Tag \'%s\'.', |
... | ... | |
671 | 675 |
'Old (on the side)' => 'Alt (seitlich)', |
672 | 676 |
'On Hand' => 'Auf Lager', |
673 | 677 |
'On Order' => 'Ist bestellt', |
678 |
'One or more Perl modules missing' => 'Ein oder mehr Perl-Module fehlen', |
|
674 | 679 |
'Open' => 'Offen', |
675 | 680 |
'OpenDocument/OASIS' => 'OpenDocument/OASIS', |
676 | 681 |
'Openings' => '?ffnungszeiten', |
... | ... | |
730 | 735 |
'Please insert object dimensions below.' => 'Bitte geben Sie die Abmessungen unten ein', |
731 | 736 |
'Please insert your language values below' => 'Bitte die ?bersetzungen unten eintragen', |
732 | 737 |
'Please insert your longdescription below' => 'Bitte den Langtext eingeben', |
738 |
'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.', |
|
733 | 739 |
'Please select a customer from the list below.' => 'Bitte einen Endkunden aus der Liste ausw?hlen', |
734 | 740 |
'Please select a vendor from the list below.' => 'Bitte einen H?ndler aus der Liste ausw?hlen', |
735 | 741 |
'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 | 975 |
'The name is missing in row %d.' => 'Der Name fehlt in Zeile %d.', |
970 | 976 |
'The name is missing.' => 'Der Name fehlt.', |
971 | 977 |
'The passwords do not match.' => 'Die Passwörter stimmen nicht überein.', |
978 |
'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).', |
|
979 |
'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.', |
|
980 |
'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.', |
|
972 | 981 |
'The unit has been saved.' => 'Die Einheit wurde gespeichert.', |
973 | 982 |
'The unit in row %d has been deleted in the meantime.' => 'Die Einheit in Zeile %d ist in der Zwischentzeit gelöscht worden.', |
974 | 983 |
'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.', |
975 | 984 |
'The units have been saved.' => 'Die Einheiten wurden gespeichert.', |
976 | 985 |
'There are four tax zones.' => 'Es gibt vier Steuerzonen.', |
977 | 986 |
'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.', |
987 |
'There are usually three ways to install Perl modules.' => 'Es gibt normalerweise drei Arten, ein Perlmodul zu installieren.', |
|
978 | 988 |
'There is nothing to do in this step.' => 'In diesem Schritt gibt es nichts mehr zu tun.', |
979 | 989 |
'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.', |
980 | 990 |
'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 | 1123 |
'Yes' => 'Ja', |
1114 | 1124 |
'You are logged out!' => 'Auf Wiedersehen!', |
1115 | 1125 |
'You can also create new units now.' => 'Sie können jetzt auch neue Einheiten anlegen.', |
1126 |
'You cannot continue before all required modules are installed.' => 'Sie können nicht fortfahren, bevor alle benötigten Pakete installiert sind.', |
|
1116 | 1127 |
'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.', |
1117 | 1128 |
'You did not enter a name!' => 'Sie haben keinen Namen eingegeben!', |
1118 | 1129 |
'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.', |
locale/de/installationcheck | ||
---|---|---|
1 |
$self->{texts} = { |
|
2 |
'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.', |
|
3 |
'Here\'s an example command line:' => 'Hier ist eine Kommandozeile, die als Beispiel dient:', |
|
4 |
'Module home page' => 'Modul-Webseite', |
|
5 |
'Module name' => 'Modulname', |
|
6 |
'One or more Perl modules missing' => 'Ein oder mehr Perl-Module fehlen', |
|
7 |
'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.', |
|
8 |
'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).', |
|
9 |
'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.', |
|
10 |
'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.', |
|
11 |
'There are usually three ways to install Perl modules.' => 'Es gibt normalerweise drei Arten, ein Perlmodul zu installieren.', |
|
12 |
'You cannot continue before all required modules are installed.' => 'Sie können nicht fortfahren, bevor alle benötigten Pakete installiert sind.', |
|
13 |
}; |
|
14 |
|
|
15 |
$self->{subs} = { |
|
16 |
'verify_installation' => 'verify_installation', |
|
17 |
}; |
|
18 |
|
|
19 |
1; |
login.pl | ||
---|---|---|
74 | 74 |
exit; |
75 | 75 |
} |
76 | 76 |
|
77 |
require "bin/mozilla/installationcheck.pl"; |
|
78 |
verify_installation(); |
|
79 |
|
|
77 | 80 |
if ($form{path}) { |
78 | 81 |
$form{path} =~ s/%2f/\//gi; |
79 | 82 |
$form{path} =~ s/\.\.\///g; |
Auch abrufbar als: Unified diff
Beim Login wird jetzt ein Check durchgeführt, ob alle benötigten Perl-Module installiert sind. Wenn nicht, dann wird eine Fehlermeldung sowie eine Liste der fehlenden Module ausgegeben sowie grobe Informationen, wie man die fehlenden Module nachinstallieren kann.