Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 36c9b4e8

Von Moritz Bunkus vor fast 14 Jahren hinzugefügt

  • ID 36c9b4e8c186084f8ae64f7d539803c5c0ae3401
  • Vorgänger 39d61f60
  • Nachfolger 7ad94275

Bearbeiten von Übersetzungen des Präfixes für SEPA-Überweisungsbetreffs

Unterschiede anzeigen:

bin/mozilla/generictranslations.pl
71 71
  $main::lxdebug->leave_sub();
72 72
}
73 73

  
74
sub edit_sepa_strings {
75
  $main::lxdebug->enter_sub();
76

  
77
  $main::auth->assert('config');
78

  
79
  my $form     = $main::form;
80
  my $locale   = $main::locale;
81

  
82
  $form->get_lists('languages' => 'LANGUAGES');
83

  
84
  my $translation_list = GenericTranslations->list(translation_type => 'sepa_remittance_info_pfx');
85
  my %translations     = map { ( ($_->{language_id} || 'default') => $_->{translation} ) } @{ $translation_list };
86

  
87
  unshift @{ $form->{LANGUAGES} }, { 'id' => 'default', };
88

  
89
  foreach my $language (@{ $form->{LANGUAGES} }) {
90
    $language->{translation} = $translations{$language->{id}};
91
  }
92

  
93
  $form->{title} = $locale->text('Edit SEPA strings');
94
  $form->header();
95
  print $form->parse_html_template('generictranslations/edit_sepa_strings');
96

  
97
  $main::lxdebug->leave_sub();
98
}
99

  
100
sub save_sepa_strings {
101
  $main::lxdebug->enter_sub();
102

  
103
  $main::auth->assert('config');
104

  
105
  my $form     = $main::form;
106
  my $locale   = $main::locale;
107

  
108
  $form->get_lists('languages' => 'LANGUAGES');
109

  
110
  unshift @{ $form->{LANGUAGES} }, { };
111

  
112
  foreach my $language (@{ $form->{LANGUAGES} }) {
113
    GenericTranslations->save('translation_type' => 'sepa_remittance_info_pfx',
114
                              'translation_id'   => undef,
115
                              'language_id'      => $language->{id},
116
                              'translation'      => $form->{"translation__" . ($language->{id} || 'default')},);
117
  }
118

  
119
  $form->{message} = $locale->text('The SEPA strings have been saved.');
120

  
121
  edit_sepa_strings();
122

  
123
  $main::lxdebug->leave_sub();
124
}
125

  
74 126
1;

Auch abrufbar als: Unified diff