Revision af853490
Von Moritz Bunkus vor etwa 18 Jahren hinzugefügt
SL/AM.pm | ||
---|---|---|
851 | 851 |
sub language { |
852 | 852 |
$main::lxdebug->enter_sub(); |
853 | 853 |
|
854 |
my ($self, $myconfig, $form) = @_; |
|
854 |
my ($self, $myconfig, $form, $return_list) = @_;
|
|
855 | 855 |
|
856 | 856 |
# connect to database |
857 | 857 |
my $dbh = $form->dbconnect($myconfig); |
... | ... | |
864 | 864 |
$sth = $dbh->prepare($query); |
865 | 865 |
$sth->execute || $form->dberror($query); |
866 | 866 |
|
867 |
my $ary = []; |
|
868 |
|
|
867 | 869 |
while (my $ref = $sth->fetchrow_hashref(NAME_lc)) { |
868 |
push @{ $form->{ALL} }, $ref;
|
|
870 |
push(@{ $ary }, $ref);
|
|
869 | 871 |
} |
870 | 872 |
|
871 | 873 |
$sth->finish; |
872 | 874 |
$dbh->disconnect; |
873 | 875 |
|
874 | 876 |
$main::lxdebug->leave_sub(); |
877 |
|
|
878 |
if ($return_list) { |
|
879 |
return @{$ary}; |
|
880 |
} else { |
|
881 |
$form->{ALL} = $ary; |
|
882 |
} |
|
875 | 883 |
} |
876 | 884 |
|
877 | 885 |
sub get_language { |
... | ... | |
2040 | 2048 |
} |
2041 | 2049 |
$sth->finish(); |
2042 | 2050 |
|
2043 |
foreach my $unit (keys(%{$units})) { |
|
2044 |
($units->{$unit}->{"${prefix}base_unit"}, $units->{$unit}->{"${prefix}factor"}) = AM->get_base_unit($units, $unit); |
|
2051 |
my $query_lang = "SELECT id, template_code FROM language ORDER BY description"; |
|
2052 |
$sth = $dbh->prepare($query_lang); |
|
2053 |
$sth->execute() || $form->dberror($query_lang); |
|
2054 |
my @languages; |
|
2055 |
while ($ref = $sth->fetchrow_hashref()) { |
|
2056 |
push(@languages, $ref); |
|
2057 |
} |
|
2058 |
$sth->finish(); |
|
2059 |
|
|
2060 |
$query_lang = "SELECT ul.localized, ul.localized_plural, l.id, l.template_code " . |
|
2061 |
"FROM units_language ul " . |
|
2062 |
"LEFT JOIN language l ON ul.language_id = l.id " . |
|
2063 |
"WHERE ul.unit = ?"; |
|
2064 |
$sth = $dbh->prepare($query_lang); |
|
2065 |
|
|
2066 |
foreach my $unit (values(%{$units})) { |
|
2067 |
($unit->{"${prefix}base_unit"}, $unit->{"${prefix}factor"}) = AM->get_base_unit($units, $unit->{"name"}); |
|
2068 |
|
|
2069 |
$unit->{"LANGUAGES"} = {}; |
|
2070 |
foreach my $lang (@languages) { |
|
2071 |
$unit->{"LANGUAGES"}->{$lang->{"template_code"}} = { "template_code" => $lang->{"template_code"} }; |
|
2072 |
} |
|
2073 |
|
|
2074 |
$sth->execute($unit->{"name"}) || $form->dberror($query_lang . " (" . $unit->{"name"} . ")"); |
|
2075 |
while ($ref = $sth->fetchrow_hashref()) { |
|
2076 |
map({ $unit->{"LANGUAGES"}->{$ref->{"template_code"}}->{$_} = $ref->{$_} } keys(%{$ref})); |
|
2077 |
} |
|
2045 | 2078 |
} |
2079 |
$sth->finish(); |
|
2046 | 2080 |
|
2047 | 2081 |
$dbh->disconnect(); |
2048 | 2082 |
|
... | ... | |
2051 | 2085 |
return $units; |
2052 | 2086 |
} |
2053 | 2087 |
|
2088 |
sub translate_units { |
|
2089 |
$main::lxdebug->enter_sub(); |
|
2090 |
|
|
2091 |
my ($self, $form, $template_code, $unit, $amount) = @_; |
|
2092 |
|
|
2093 |
my $units = $self->retrieve_units(\%main::myconfig, $form); |
|
2094 |
|
|
2095 |
my $h = $units->{$unit}->{"LANGUAGES"}->{$template_code}; |
|
2096 |
$main::lxdebug->dump(0, "klaus", $h); |
|
2097 |
my $new_unit = $unit; |
|
2098 |
if ($h) { |
|
2099 |
if (($amount != 1) && $h->{"localized_plural"}) { |
|
2100 |
$new_unit = $h->{"localized_plural"}; |
|
2101 |
} elsif ($h->{"localized"}) { |
|
2102 |
$new_unit = $h->{"localized"}; |
|
2103 |
} |
|
2104 |
} |
|
2105 |
|
|
2106 |
$main::lxdebug->leave_sub(); |
|
2107 |
|
|
2108 |
return $new_unit; |
|
2109 |
} |
|
2110 |
|
|
2054 | 2111 |
sub units_in_use { |
2055 | 2112 |
$main::lxdebug->enter_sub(); |
2056 | 2113 |
|
... | ... | |
2142 | 2199 |
sub add_unit { |
2143 | 2200 |
$main::lxdebug->enter_sub(); |
2144 | 2201 |
|
2145 |
my ($self, $myconfig, $form, $name, $base_unit, $factor, $type) = @_; |
|
2202 |
my ($self, $myconfig, $form, $name, $base_unit, $factor, $type, $languages) = @_;
|
|
2146 | 2203 |
|
2147 |
my $dbh = $form->dbconnect($myconfig); |
|
2204 |
my $dbh = $form->dbconnect_noauto($myconfig);
|
|
2148 | 2205 |
|
2149 | 2206 |
my $query = "INSERT INTO units (name, base_unit, factor, type) VALUES (?, ?, ?, ?)"; |
2150 | 2207 |
$dbh->do($query, undef, $name, $base_unit, $factor, $type) || $form->dberror($query . " ($name, $base_unit, $factor, $type)"); |
2208 |
|
|
2209 |
if ($languages) { |
|
2210 |
$query = "INSERT INTO units_language (unit, language_id, localized, localized_plural) VALUES (?, ?, ?, ?)"; |
|
2211 |
my $sth = $dbh->prepare($query); |
|
2212 |
foreach my $lang (@{$languages}) { |
|
2213 |
my @values = ($name, $lang->{"id"}, $lang->{"localized"}, $lang->{"localized_plural"}); |
|
2214 |
$sth->execute(@values) || $form->dberror($query . " (" . join(", ", @values) . ")"); |
|
2215 |
} |
|
2216 |
$sth->finish(); |
|
2217 |
} |
|
2218 |
|
|
2219 |
$dbh->commit(); |
|
2151 | 2220 |
$dbh->disconnect(); |
2152 | 2221 |
|
2153 | 2222 |
$main::lxdebug->leave_sub(); |
... | ... | |
2162 | 2231 |
|
2163 | 2232 |
my ($base_unit, $unit, $sth, $query); |
2164 | 2233 |
|
2234 |
$query = "DELETE FROM units_language"; |
|
2235 |
$dbh->do($query) || $form->dberror($query); |
|
2236 |
|
|
2165 | 2237 |
if ($delete_units && (0 != scalar(@{$delete_units}))) { |
2166 |
$query = "DELETE FROM units WHERE name = ?";
|
|
2167 |
$sth = $dbh->prepare($query);
|
|
2168 |
map({ $sth->execute($_) || $form->dberror($query . " ($_)"); } @{$delete_units});
|
|
2169 |
$sth->finish();
|
|
2238 |
$query = "DELETE FROM units WHERE name = (";
|
|
2239 |
map({ $query .= "?," } @{$delete_units});
|
|
2240 |
substr($query, -1, 1) = ")";
|
|
2241 |
$dbh->do($query, undef, @{$delete_units}) || $form->dberror($query . " ($_)");
|
|
2170 | 2242 |
} |
2171 | 2243 |
|
2172 | 2244 |
$query = "UPDATE units SET name = ?, base_unit = ?, factor = ? WHERE name = ?"; |
2173 | 2245 |
$sth = $dbh->prepare($query); |
2174 | 2246 |
|
2247 |
my $query_lang = "INSERT INTO units_language (unit, language_id, localized, localized_plural) VALUES (?, ?, ?, ?)"; |
|
2248 |
my $sth_lang = $dbh->prepare($query_lang); |
|
2249 |
|
|
2175 | 2250 |
foreach $unit (values(%{$units})) { |
2176 | 2251 |
$unit->{"depth"} = 0; |
2177 | 2252 |
my $base_unit = $unit; |
... | ... | |
2182 | 2257 |
} |
2183 | 2258 |
|
2184 | 2259 |
foreach $unit (sort({ $a->{"depth"} <=> $b->{"depth"} } values(%{$units}))) { |
2260 |
if ($unit->{"LANGUAGES"}) { |
|
2261 |
foreach my $lang (@{$unit->{"LANGUAGES"}}) { |
|
2262 |
next unless ($lang->{"id"} && $lang->{"localized"}); |
|
2263 |
my @values = ($unit->{"name"}, $lang->{"id"}, $lang->{"localized"}, $lang->{"localized_plural"}); |
|
2264 |
$sth_lang->execute(@values) || $form->dberror($query_lang . " (" . join(", ", @values) . ")"); |
|
2265 |
} |
|
2266 |
} |
|
2267 |
|
|
2185 | 2268 |
next if ($unit->{"unchanged_unit"}); |
2186 | 2269 |
|
2187 | 2270 |
my @values = ($unit->{"name"}, $unit->{"base_unit"}, $unit->{"factor"}, $unit->{"old_name"}); |
... | ... | |
2189 | 2272 |
} |
2190 | 2273 |
|
2191 | 2274 |
$sth->finish(); |
2275 |
$sth_lang->finish(); |
|
2192 | 2276 |
$dbh->commit(); |
2193 | 2277 |
$dbh->disconnect(); |
2194 | 2278 |
|
SL/CT.pm | ||
---|---|---|
37 | 37 |
|
38 | 38 |
package CT; |
39 | 39 |
use Data::Dumper; |
40 |
|
|
40 |
use SL::DBUtils; |
|
41 | 41 |
|
42 | 42 |
sub get_tuple { |
43 | 43 |
$main::lxdebug->enter_sub(); |
... | ... | |
373 | 373 |
$form->{obsolete} *= 1; |
374 | 374 |
$form->{business} *= 1; |
375 | 375 |
$form->{salesman_id} *= 1; |
376 |
$form->{language_id} *= 1; |
|
377 | 376 |
$form->{payment_id} *= 1; |
378 | 377 |
$form->{taxzone_id} *= 1; |
379 | 378 |
$form->{creditlimit} = $form->parse_amount($myconfig, $form->{creditlimit}); |
... | ... | |
472 | 471 |
ustid = '$form->{ustid}', |
473 | 472 |
username = '$form->{username}', |
474 | 473 |
salesman_id = '$form->{salesman_id}', |
475 |
language_id = '$form->{language_id}',
|
|
474 |
language_id = | . conv_i($form->{language_id}, "NULL") . qq|,
|
|
476 | 475 |
payment_id = '$form->{payment_id}', |
477 | 476 |
taxzone_id = '$form->{taxzone_id}', |
478 | 477 |
user_password = | . $dbh->quote($form->{user_password}) . qq|, |
... | ... | |
518 | 517 |
$dbh->do($query) || $form->dberror($query); |
519 | 518 |
} |
520 | 519 |
} |
521 |
print(STDERR "SHIPTO_ID $form->{shipto_id}\n"); |
|
522 | 520 |
# add shipto |
523 | 521 |
$form->add_shipto($dbh, $form->{id}, "CT"); |
524 | 522 |
|
... | ... | |
553 | 551 |
$form->{obsolete} *= 1; |
554 | 552 |
$form->{business} *= 1; |
555 | 553 |
$form->{payment_id} *= 1; |
556 |
$form->{language_id} *= 1; |
|
557 | 554 |
$form->{taxzone_id} *= 1; |
558 | 555 |
$form->{creditlimit} = $form->parse_amount($myconfig, $form->{creditlimit}); |
559 | 556 |
|
... | ... | |
626 | 623 |
ustid = '$form->{ustid}', |
627 | 624 |
payment_id = '$form->{payment_id}', |
628 | 625 |
taxzone_id = '$form->{taxzone_id}', |
629 |
language_id = '$form->{language_id}',
|
|
626 |
language_id = | . conv_i($form->{language_id}, "NULL") . qq|,
|
|
630 | 627 |
username = '$form->{username}', |
631 | 628 |
user_password = '$form->{user_password}', |
632 | 629 |
v_customer_id = '$form->{v_customer_id}' |
bin/mozilla/am.pl | ||
---|---|---|
3531 | 3531 |
AM->units_in_use(\%myconfig, $form, $units); |
3532 | 3532 |
map({ $units->{$_}->{"BASE_UNIT_DDBOX"} = AM->unit_select_data($units, $units->{$_}->{"base_unit"}, 1); } keys(%{$units})); |
3533 | 3533 |
|
3534 |
@languages = AM->language(\%myconfig, $form, 1); |
|
3535 |
|
|
3534 | 3536 |
@unit_list = (); |
3535 | 3537 |
foreach $name (sort({ lc($a) cmp lc($b) } grep({ !$units->{$_}->{"base_unit"} } keys(%{$units})))) { |
3536 | 3538 |
map({ push(@unit_list, $units->{$_}); } |
3537 | 3539 |
sort({ ($units->{$a}->{"resolved_factor"} * 1) <=> ($units->{$b}->{"resolved_factor"} * 1) } |
3538 | 3540 |
grep({ $units->{$_}->{"resolved_base_unit"} eq $name } keys(%{$units})))); |
3539 | 3541 |
} |
3540 |
map({ $_->{"factor"} = $form->format_amount(\%myconfig, $_->{"factor"}, 5) if ($_->{"factor"}); } @unit_list); |
|
3542 |
my $i = 1; |
|
3543 |
foreach (@unit_list) { |
|
3544 |
$_->{"factor"} = $form->format_amount(\%myconfig, $_->{"factor"}, 5) if ($_->{"factor"}); |
|
3545 |
$_->{"UNITLANGUAGES"} = []; |
|
3546 |
foreach my $lang (@languages) { |
|
3547 |
push(@{ $_->{"UNITLANGUAGES"} }, |
|
3548 |
{ "idx" => $i, |
|
3549 |
"unit" => $_->{"name"}, |
|
3550 |
"language_id" => $lang->{"id"}, |
|
3551 |
"localized" => $_->{"LANGUAGES"}->{$lang->{"template_code"}}->{"localized"}, |
|
3552 |
"localized_plural" => $_->{"LANGUAGES"}->{$lang->{"template_code"}}->{"localized_plural"}, |
|
3553 |
}); |
|
3554 |
} |
|
3555 |
$i++; |
|
3556 |
} |
|
3541 | 3557 |
|
3542 | 3558 |
$units = AM->retrieve_units(\%myconfig, $form, $form->{"unit_type"}); |
3543 | 3559 |
$ddbox = AM->unit_select_data($units, undef, 1); |
3544 | 3560 |
|
3545 | 3561 |
$form->{"title"} = sprintf($locale->text("Add and edit %s"), $form->{"unit_type"} eq "dimension" ? $locale->text("dimension units") : $locale->text("service units")); |
3546 | 3562 |
$form->header(); |
3547 |
print($form->parse_html_template("am/edit_units", { "UNITS" => \@unit_list, "NEW_BASE_UNIT_DDBOX" => $ddbox })); |
|
3563 |
print($form->parse_html_template("am/edit_units", |
|
3564 |
{ "UNITS" => \@unit_list, |
|
3565 |
"NEW_BASE_UNIT_DDBOX" => $ddbox, |
|
3566 |
"LANGUAGES" => \@languages })); |
|
3548 | 3567 |
|
3549 | 3568 |
$lxdebug->leave_sub(); |
3550 | 3569 |
} |
... | ... | |
3566 | 3585 |
$base_unit = $form->{"new_base_unit"}; |
3567 | 3586 |
} |
3568 | 3587 |
|
3569 |
AM->add_unit(\%myconfig, $form, $form->{"new_name"}, $base_unit, $factor, $form->{"unit_type"}); |
|
3588 |
my @languages; |
|
3589 |
foreach my $lang (AM->language(\%myconfig, $form, 1)) { |
|
3590 |
next unless ($form->{"new_localized_$lang->{id}"} || $form->{"new_localized_plural_$lang->{id}"}); |
|
3591 |
push(@languages, { "id" => $lang->{"id"}, |
|
3592 |
"localized" => $form->{"new_localized_$lang->{id}"}, |
|
3593 |
"localized_plural" => $form->{"new_localized_plural_$lang->{id}"}, |
|
3594 |
}); |
|
3595 |
} |
|
3596 |
|
|
3597 |
AM->add_unit(\%myconfig, $form, $form->{"new_name"}, $base_unit, $factor, $form->{"unit_type"}, \@languages); |
|
3570 | 3598 |
|
3571 | 3599 |
$form->{"saved_message"} = $locale->text("The unit has been saved."); |
3572 | 3600 |
|
... | ... | |
3575 | 3603 |
$lxdebug->leave_sub(); |
3576 | 3604 |
} |
3577 | 3605 |
|
3606 |
sub set_unit_languages { |
|
3607 |
$lxdebug->enter_sub(); |
|
3608 |
|
|
3609 |
my ($unit, $languages, $idx) = @_; |
|
3610 |
|
|
3611 |
$unit->{"LANGUAGES"} = []; |
|
3612 |
|
|
3613 |
foreach my $lang (@{$languages}) { |
|
3614 |
push(@{ $unit->{"LANGUAGES"} }, |
|
3615 |
{ "id" => $lang->{"id"}, |
|
3616 |
"localized" => $form->{"localized_${idx}_$lang->{id}"}, |
|
3617 |
"localized_plural" => $form->{"localized_plural_${idx}_$lang->{id}"}, |
|
3618 |
}); |
|
3619 |
} |
|
3620 |
|
|
3621 |
$lxdebug->leave_sub(); |
|
3622 |
} |
|
3623 |
|
|
3578 | 3624 |
sub save_unit { |
3579 | 3625 |
$lxdebug->enter_sub(); |
3580 | 3626 |
|
3581 | 3627 |
$old_units = AM->retrieve_units(\%myconfig, $form, $form->{"unit_type"}, "resolved_"); |
3582 | 3628 |
AM->units_in_use(\%myconfig, $form, $old_units); |
3583 | 3629 |
|
3630 |
@languages = AM->language(\%myconfig, $form, 1); |
|
3631 |
|
|
3584 | 3632 |
$new_units = {}; |
3585 | 3633 |
@delete_units = (); |
3586 | 3634 |
foreach $i (1..($form->{"rowcount"} * 1)) { |
... | ... | |
3592 | 3640 |
if ($form->{"unchangeable_$i"}) { |
3593 | 3641 |
$new_units->{$form->{"old_name_$i"}} = $old_units->{$form->{"old_name_$i"}}; |
3594 | 3642 |
$new_units->{$form->{"old_name_$i"}}->{"unchanged_unit"} = 1; |
3643 |
set_unit_languages($new_units->{$form->{"old_name_$i"}}, \@languages, $i); |
|
3595 | 3644 |
next; |
3596 | 3645 |
} |
3597 | 3646 |
|
... | ... | |
3610 | 3659 |
my %h = map({ $_ => $form->{"${_}_$i"} } qw(name base_unit factor old_name)); |
3611 | 3660 |
$new_units->{$form->{"name_$i"}} = \%h; |
3612 | 3661 |
$new_units->{$form->{"name_$i"}}->{"row"} = $i; |
3662 |
set_unit_languages($new_units->{$form->{"old_name_$i"}}, \@languages, $i); |
|
3613 | 3663 |
} |
3614 | 3664 |
|
3615 | 3665 |
foreach $unit (values(%{$new_units})) { |
bin/mozilla/io.pl | ||
---|---|---|
1796 | 1796 |
|| $form->{formname} eq 'request_quotation') { |
1797 | 1797 |
$form->{shiptoname} = $myconfig{company}; |
1798 | 1798 |
$form->{shiptostreet} = $myconfig{address}; |
1799 |
} else {
|
|
1799 |
} else { |
|
1800 | 1800 |
map { $form->{"shipto$_"} = $form->{$_} } @a; |
1801 | 1801 |
} |
1802 | 1802 |
} |
... | ... | |
1811 | 1811 |
$form->{printer_code} = $form->get_printer_code(\%myconfig); |
1812 | 1812 |
|
1813 | 1813 |
if ($form->{language} ne "") { |
1814 |
map({ $form->{"unit"}->[$_] = |
|
1815 |
AM->translate_units($form, $form->{"language"}, |
|
1816 |
$form->{"unit"}->[$_], $form->{"qty"}->[$_]); } |
|
1817 |
(0..scalar(@{$form->{"unit"}}) - 1)); |
|
1814 | 1818 |
$form->{language} = "_" . $form->{language}; |
1815 | 1819 |
} |
1816 | 1820 |
|
doc/changelog | ||
---|---|---|
1 | 1 |
#################################### |
2 | 2 |
# Veraenderungen von Lx-Office ERP # |
3 | 3 |
#################################### |
4 |
????-??-?? - Version 2.4.? |
|
5 |
- Ersetzen der Einheitennamen anhand der Vorlagensprache |
|
6 |
- Umformartierungen von Zahlen und Datumgsangaben anhand der |
|
7 |
Vorlagensprache |
|
8 |
|
|
4 | 9 |
2006-12-12 - Version 2.4.0 |
5 | 10 |
- USTVA jetzt mit Taxbird und Winston Anbindung (als Templates verf?gbar) |
6 | 11 |
- Neues Steuersystem f?r beliebig viele Steuers?tze pro Konto |
locale/de/all | ||
---|---|---|
736 | 736 |
'Please select a customer from the list below.' => 'Bitte einen Endkunden aus der Liste ausw?hlen', |
737 | 737 |
'Please select a vendor from the list below.' => 'Bitte einen H?ndler aus der Liste ausw?hlen', |
738 | 738 |
'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.', |
739 |
'Plural' => 'Plural', |
|
739 | 740 |
'Port' => 'Port', |
740 | 741 |
'Port missing!' => 'Portangabe fehlt!', |
741 | 742 |
'Post' => 'Buchen', |
... | ... | |
1148 | 1149 |
'month' => 'monatliche Abgabe', |
1149 | 1150 |
'none (pricegroup)' => 'keine', |
1150 | 1151 |
'number' => 'Nummer', |
1152 |
'plural first char' => 'P', |
|
1151 | 1153 |
'posted!' => 'gebucht', |
1152 | 1154 |
'prices updated!' => ' Preise aktualisiert!', |
1153 | 1155 |
'quarter' => 'viertelj?hrliche (quartalsweise) Abgabe', |
... | ... | |
1158 | 1160 |
'sent' => 'gesendet', |
1159 | 1161 |
'sent to printer' => 'an Drucker geschickt', |
1160 | 1162 |
'service units' => 'Dienstleistungseinheiten', |
1163 |
'singular first char' => 'S', |
|
1161 | 1164 |
'soldtotal' => 'Verkaufte Anzahl', |
1162 | 1165 |
'successfully created!' => 'wurde erfolgreich erstellt', |
1163 | 1166 |
'successfully deleted!' => 'wurde erfolgreich gel?scht', |
locale/de/am | ||
---|---|---|
375 | 375 |
'select_part' => 'select_part', |
376 | 376 |
'select_part_internal' => 'select_part_internal', |
377 | 377 |
'set_longdescription' => 'set_longdescription', |
378 |
'set_unit_languages' => 'set_unit_languages', |
|
378 | 379 |
'sic_header' => 'sic_header', |
379 | 380 |
'vendor_selection' => 'vendor_selection', |
380 | 381 |
'warehouse_header' => 'warehouse_header', |
sql/Pg-upgrade/Pg-upgrade-2.4.0.1-2.4.0.2.sql | ||
---|---|---|
1 |
CREATE TABLE units_language ( |
|
2 |
unit varchar (20) NOT NULL, |
|
3 |
language_id integer NOT NULL, |
|
4 |
localized varchar (20), |
|
5 |
localized_plural varchar (20), |
|
6 |
|
|
7 |
FOREIGN KEY (unit) REFERENCES units (name), |
|
8 |
FOREIGN KEY (language_id) REFERENCES language (id) |
|
9 |
); |
|
10 |
CREATE INDEX units_name_idx ON units (name); |
|
11 |
CREATE INDEX units_language_unit_idx ON units_language (unit); |
templates/webpages/am/edit_units_de.html | ||
---|---|---|
56 | 56 |
<th align="right">Faktor</th> |
57 | 57 |
<td><input name="new_factor"></td> |
58 | 58 |
</tr> |
59 |
|
|
60 |
<TMPL_LOOP LANGUAGES> |
|
61 |
<tr> |
|
62 |
<th align="right"><TMPL_VAR description></th> |
|
63 |
<td><input name="new_localized_<TMPL_VAR id>" size="20" maxlength="20"></td> |
|
64 |
<th align="right">Plural</th> |
|
65 |
<td><input name="new_localized_plural_<TMPL_VAR id>" size="20" maxlength="20"></td> |
|
66 |
</tr> |
|
67 |
</TMPL_LOOP> |
|
59 | 68 |
</table> |
60 | 69 |
|
61 | 70 |
<input type="submit" class="submit" name="action" value="Erfassen"> |
... | ... | |
77 | 86 |
gelöscht. |
78 | 87 |
</p> |
79 | 88 |
|
89 |
<p> |
|
90 |
Bei den Übersetzungen können Sie unterschiedliche |
|
91 |
Varianten für singular und plural angeben (z.B. "day" |
|
92 |
und "days"). |
|
93 |
</p> |
|
94 |
|
|
80 | 95 |
<table> |
81 | 96 |
<tr> |
82 | 97 |
<th class="listheading"> </th> |
... | ... | |
84 | 99 |
<th class="listheading">Einheit</th> |
85 | 100 |
<th class="listheading">Basiseinheit</th> |
86 | 101 |
<th class="listheading">Faktor</th> |
102 |
<TMPL_LOOP LANGUAGES> |
|
103 |
<th class="listheading"><TMPL_VAR description></th> |
|
104 |
</TMPL_LOOP> |
|
87 | 105 |
</tr> |
88 | 106 |
|
89 | 107 |
<TMPL_LOOP NAME=UNITS> |
... | ... | |
105 | 123 |
<td align="center"><input type="checkbox" name="delete_<TMPL_VAR NAME=__counter__>"></td> |
106 | 124 |
<td> |
107 | 125 |
<input type="hidden" name="old_name_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=name>"> |
108 |
<input name="name_<TMPL_VAR NAME=__counter__>" size="20" maxlength="20" value="<TMPL_VAR NAME=name>">
|
|
126 |
<input name="name_<TMPL_VAR NAME=__counter__>" size="10" maxlength="20" value="<TMPL_VAR NAME=name>">
|
|
109 | 127 |
</td> |
110 | 128 |
<td> |
111 | 129 |
<select name="base_unit_<TMPL_VAR NAME=__counter__>"> |
112 | 130 |
<TMPL_LOOP NAME=BASE_UNIT_DDBOX><option <TMPL_VAR NAME=selected>><TMPL_VAR NAME=name></option></TMPL_LOOP> |
113 | 131 |
</select> |
114 | 132 |
</td> |
115 |
<td><input name="factor_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=factor>"></td> |
|
116 |
|
|
133 |
<td><input name="factor_<TMPL_VAR NAME=__counter__>" size="8" value="<TMPL_VAR NAME=factor>"></td> |
|
117 | 134 |
</TMPL_IF> |
135 |
|
|
136 |
<TMPL_LOOP UNITLANGUAGES> |
|
137 |
<td> |
|
138 |
S: |
|
139 |
<input name="localized_<TMPL_VAR idx>_<TMPL_VAR language_id>" value="<TMPL_VAR localized>" size="6" maxlength="20"> |
|
140 |
P: |
|
141 |
<input name="localized_plural_<TMPL_VAR idx>_<TMPL_VAR language_id>" value="<TMPL_VAR localized_plural>" size="6" maxlength="20"> |
|
142 |
</td> |
|
143 |
</TMPL_LOOP> |
|
118 | 144 |
</tr> |
119 | 145 |
|
120 | 146 |
<TMPL_IF NAME=__last__><input type="hidden" name="rowcount" value="<TMPL_VAR NAME=__counter__>"></TMPL_IF> |
templates/webpages/am/edit_units_master.html | ||
---|---|---|
56 | 56 |
<th align="right"><translate>Factor</translate></th> |
57 | 57 |
<td><input name="new_factor"></td> |
58 | 58 |
</tr> |
59 |
|
|
60 |
<TMPL_LOOP LANGUAGES> |
|
61 |
<tr> |
|
62 |
<th align="right"><TMPL_VAR description></th> |
|
63 |
<td><input name="new_localized_<TMPL_VAR id>" size="20" maxlength="20"></td> |
|
64 |
<th align="right"><translate>Plural</translate></th> |
|
65 |
<td><input name="new_localized_plural_<TMPL_VAR id>" size="20" maxlength="20"></td> |
|
66 |
</tr> |
|
67 |
</TMPL_LOOP> |
|
59 | 68 |
</table> |
60 | 69 |
|
61 | 70 |
<input type="submit" class="submit" name="action" value="<translate>Add</translate>"> |
... | ... | |
77 | 86 |
gelöscht. |
78 | 87 |
</p> |
79 | 88 |
|
89 |
<p> |
|
90 |
Bei den Übersetzungen können Sie unterschiedliche |
|
91 |
Varianten für singular und plural angeben (z.B. "day" |
|
92 |
und "days"). |
|
93 |
</p> |
|
94 |
|
|
80 | 95 |
<table> |
81 | 96 |
<tr> |
82 | 97 |
<th class="listheading"> </th> |
... | ... | |
84 | 99 |
<th class="listheading"><translate>Unit</translate></th> |
85 | 100 |
<th class="listheading"><translate>Base unit</translate></th> |
86 | 101 |
<th class="listheading"><translate>Factor</translate></th> |
102 |
<TMPL_LOOP LANGUAGES> |
|
103 |
<th class="listheading"><TMPL_VAR description></th> |
|
104 |
</TMPL_LOOP> |
|
87 | 105 |
</tr> |
88 | 106 |
|
89 | 107 |
<TMPL_LOOP NAME=UNITS> |
... | ... | |
105 | 123 |
<td align="center"><input type="checkbox" name="delete_<TMPL_VAR NAME=__counter__>"></td> |
106 | 124 |
<td> |
107 | 125 |
<input type="hidden" name="old_name_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=name>"> |
108 |
<input name="name_<TMPL_VAR NAME=__counter__>" size="20" maxlength="20" value="<TMPL_VAR NAME=name>">
|
|
126 |
<input name="name_<TMPL_VAR NAME=__counter__>" size="10" maxlength="20" value="<TMPL_VAR NAME=name>">
|
|
109 | 127 |
</td> |
110 | 128 |
<td> |
111 | 129 |
<select name="base_unit_<TMPL_VAR NAME=__counter__>"> |
112 | 130 |
<TMPL_LOOP NAME=BASE_UNIT_DDBOX><option <TMPL_VAR NAME=selected>><TMPL_VAR NAME=name></option></TMPL_LOOP> |
113 | 131 |
</select> |
114 | 132 |
</td> |
115 |
<td><input name="factor_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=factor>"></td> |
|
116 |
|
|
133 |
<td><input name="factor_<TMPL_VAR NAME=__counter__>" size="8" value="<TMPL_VAR NAME=factor>"></td> |
|
117 | 134 |
</TMPL_IF> |
135 |
|
|
136 |
<TMPL_LOOP UNITLANGUAGES> |
|
137 |
<td> |
|
138 |
<translate>singular first char</translate>: |
|
139 |
<input name="localized_<TMPL_VAR idx>_<TMPL_VAR language_id>" value="<TMPL_VAR localized>" size="6" maxlength="20"> |
|
140 |
<translate>plural first char</translate>: |
|
141 |
<input name="localized_plural_<TMPL_VAR idx>_<TMPL_VAR language_id>" value="<TMPL_VAR localized_plural>" size="6" maxlength="20"> |
|
142 |
</td> |
|
143 |
</TMPL_LOOP> |
|
118 | 144 |
</tr> |
119 | 145 |
|
120 | 146 |
<TMPL_IF NAME=__last__><input type="hidden" name="rowcount" value="<TMPL_VAR NAME=__counter__>"></TMPL_IF> |
Auch abrufbar als: Unified diff
Verwalten von Einheitennamen für jede angelegte Sprache. Beim Druck werden die Einheitennamen durch diejenigen ersetzt, die für die ausgewählte Ausgabesprache gespeichert sind.