From 342c0c281698454445a63cf6e2b4de3a65f56107 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 16 Aug 2013 15:26:55 +0200 Subject: [PATCH] =?utf8?q?gew=C3=A4hlte/voreingestellte=20Zeilenkennung=20?= =?utf8?q?in=20der=20Hilfe/Beispieldatei=20anzeigen=20...?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit und voreingestellte Zeilenkennung übersetzen. --- SL/Controller/CsvImport/BaseMulti.pm | 2 +- SL/Controller/CsvImport/Order.pm | 10 +++++----- SL/DB/CsvImportProfile.pm | 4 ++-- locale/de/all | 1 + locale/en/all | 1 + 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/SL/Controller/CsvImport/BaseMulti.pm b/SL/Controller/CsvImport/BaseMulti.pm index 92faaa993..c958cb90a 100644 --- a/SL/Controller/CsvImport/BaseMulti.pm +++ b/SL/Controller/CsvImport/BaseMulti.pm @@ -163,7 +163,7 @@ sub init_profile { $prof{ 'cvar_' . $_->name } = '' for @{ $self->all_cvar_configs }; $class =~ m/^SL::DB::(.+)/; - push @profile, {'profile' => \%prof, 'class' => $class, 'row_ident' => $1}; + push @profile, {'profile' => \%prof, 'class' => $class, 'row_ident' => $::locale->text($1)}; } \@profile; diff --git a/SL/Controller/CsvImport/Order.pm b/SL/Controller/CsvImport/Order.pm index 694a21827..e46c14170 100644 --- a/SL/Controller/CsvImport/Order.pm +++ b/SL/Controller/CsvImport/Order.pm @@ -46,13 +46,13 @@ sub init_profile { my $profile = $self->SUPER::init_profile; - # SUPER::init_profile sets row_ident to the class name + # SUPER::init_profile sets row_ident to the translated class name # overwrite it with the user specified settings foreach my $p (@{ $profile }) { - if ($p->{row_ident} eq 'Order') { + if ($p->{row_ident} eq $::locale->text('Order')) { $p->{row_ident} = $self->settings->{'order_column'}; } - if ($p->{row_ident} eq 'OrderItem') { + if ($p->{row_ident} eq $::locale->text('OrderItem')) { $p->{row_ident} = $self->settings->{'item_column'}; } } @@ -79,7 +79,7 @@ sub setup_displayable_columns { $self->SUPER::setup_displayable_columns; $self->add_displayable_columns($self->settings->{'order_column'}, - { name => 'datatype', description => $::locale->text('Zeilenkennung') }, + { name => 'datatype', description => $self->settings->{'order_column'} }, { name => 'closed', description => $::locale->text('Closed') }, { name => 'curr', description => $::locale->text('Currency') }, { name => 'cusordnumber', description => $::locale->text('Customer Order Number') }, @@ -123,7 +123,7 @@ sub setup_displayable_columns { ); $self->add_displayable_columns($self->settings->{'item_column'}, - { name => 'datatype', description => $::locale->text('Zeilenkennung') }, + { name => 'datatype', description => $self->settings->{'item_column'} }, { name => 'cusordnumber', description => $::locale->text('Customer Order Number') }, { name => 'description', description => $::locale->text('Description') }, { name => 'discount', description => $::locale->text('Discount') }, diff --git a/SL/DB/CsvImportProfile.pm b/SL/DB/CsvImportProfile.pm index 5a79809b4..1902a51ec 100644 --- a/SL/DB/CsvImportProfile.pm +++ b/SL/DB/CsvImportProfile.pm @@ -55,8 +55,8 @@ sub set_defaults { apply_buchungsgruppe => 'all', ); } elsif ($self->type eq 'orders') { - $self->_set_defaults(order_column => 'Order', - item_column => 'OrderItem', + $self->_set_defaults(order_column => $::locale->text('Order'), + item_column => $::locale->text('OrderItem'), max_amount_diff => 0.02, ); } else { diff --git a/locale/de/all b/locale/de/all index ea2c59635..91a7ffc0b 100755 --- a/locale/de/all +++ b/locale/de/all @@ -1413,6 +1413,7 @@ $self->{texts} = { 'Options' => 'Optionen', 'Or download the whole Installation Documentation as PDF (350kB) for off-line study (currently in German Language): ' => 'Oder laden Sie die komplette Installationsbeschreibung als PDF (350kB) herunter: ', 'Order' => 'Auftrag', + 'OrderItem' => 'Position', 'Order Date' => 'Auftragsdatum', 'Order Date missing!' => 'Auftragsdatum fehlt!', 'Order Number' => 'Auftragsnummer', diff --git a/locale/en/all b/locale/en/all index 38be9b36e..3ae25b3bd 100644 --- a/locale/en/all +++ b/locale/en/all @@ -1318,6 +1318,7 @@ $self->{texts} = { 'Options' => '', 'Or download the whole Installation Documentation as PDF (350kB) for off-line study (currently in German Language): ' => '', 'Order' => '', + 'OrderItem' => '', 'Order Date' => '', 'Order Date missing!' => '', 'Order Number' => '', -- 2.20.1