Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0292a56e

Von Tamino Steinert vor 11 Monaten hinzugefügt

  • ID 0292a56e4418e4d27d175cbb443766d44664492f
  • Vorgänger 537f8f59
  • Nachfolger 360dbe68

EmailJournal: Belegtype übersetzt anzeigen

Unterschiede anzeigen:

SL/Controller/EmailJournal.pm
181 181
  return @record_types_with_info;
182 182
}
183 183

  
184
# has do be done at runtime for translation to work
185
sub get_record_types_to_text {
186
  my @record_types_with_info = get_record_types_with_info();
187

  
188
  my %record_types_to_text = ();
189
  $record_types_to_text{$_->{record_type}} = $_->{text} for @record_types_with_info;
190
  $record_types_to_text{'catch_all'} = t8("Catch-all");
191

  
192
  return %record_types_to_text;
193
}
194

  
184 195
sub record_types_for_customer_vendor_type_and_action {
185 196
  my ($self, $customer_vendor_type, $action) = @_;
186 197
  return [
......
217 228
  }
218 229
  $self->setup_list_action_bar;
219 230
  my @record_types_with_info = $self->get_record_types_with_info();
231
  my %record_types_to_text   = $self->get_record_types_to_text();
220 232
  $self->render('email_journal/list',
221 233
                title   => $::locale->text('Email journal'),
222 234
                ENTRIES => $self->models->get,
223 235
                MODELS  => $self->models,
224 236
                RECORD_TYPES_WITH_INFO => \@record_types_with_info,
237
                RECORD_TYPES_TO_TEXT   => \%record_types_to_text,
225 238
              );
226 239
}
227 240

  
......
239 252
  }
240 253

  
241 254
  my @record_types_with_info = $self->get_record_types_with_info();
255
  my %record_types_to_text   = $self->get_record_types_to_text();
242 256

  
243 257
  my $customer_vendor = $self->find_customer_vendor_from_email($self->entry);
244 258
  my $cv_type = $customer_vendor && $customer_vendor->is_vendor ? 'vendor' : 'customer';
......
255 269
    CUSTOMER_VENDOR => , $customer_vendor,
256 270
    CV_TYPE_FOUND => $cv_type_found,
257 271
    RECORD_TYPES_WITH_INFO => \@record_types_with_info,
258
    back_to  => $back_to
272
    RECORD_TYPES_TO_TEXT   => \%record_types_to_text,
273
    back_to  => $back_to,
259 274
  );
260 275
}
261 276

  
......
764 779
  push @filter_strings, $status{ $filter->{'status:eq_ignore_empty'} } if $filter->{'status:eq_ignore_empty'};
765 780

  
766 781

  
767
  my %record_type = map { $_->{record_type} => $_->{text} } $self->get_record_types_with_info();
768
  push @filter_strings, $record_type{ $filter->{'record_type:eq_ignore_empty'} } if $filter->{'record_type:eq_ignore_empty'};
782
  my %record_type_to_text = $self->get_record_types_to_text();
783
  push @filter_strings, $record_type_to_text{ $filter->{'record_type:eq_ignore_empty'} } if $filter->{'record_type:eq_ignore_empty'};
769 784

  
770 785
  push @filter_strings, $::locale->text('Obsolete')     if $filter->{'obsolete:eq_ignore_empty'} eq '1';
771 786
  push @filter_strings, $::locale->text('Not obsolete') if $filter->{'obsolete:eq_ignore_empty'} eq '0';

Auch abrufbar als: Unified diff