From 36c9b4e8c186084f8ae64f7d539803c5c0ae3401 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 3 Dec 2010 16:08:56 +0100 Subject: [PATCH] =?utf8?q?Bearbeiten=20von=20=C3=9Cbersetzungen=20des=20Pr?= =?utf8?q?=C3=A4fixes=20f=C3=BCr=20SEPA-=C3=9Cberweisungsbetreffs?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/generictranslations.pl | 52 +++++++++++++++++++ locale/de/all | 4 ++ menu.ini | 4 ++ .../edit_sepa_strings.html | 46 ++++++++++++++++ 4 files changed, 106 insertions(+) create mode 100644 templates/webpages/generictranslations/edit_sepa_strings.html diff --git a/bin/mozilla/generictranslations.pl b/bin/mozilla/generictranslations.pl index 385ce8094..7b8d4a196 100644 --- a/bin/mozilla/generictranslations.pl +++ b/bin/mozilla/generictranslations.pl @@ -71,4 +71,56 @@ sub save_greetings { $main::lxdebug->leave_sub(); } +sub edit_sepa_strings { + $main::lxdebug->enter_sub(); + + $main::auth->assert('config'); + + my $form = $main::form; + my $locale = $main::locale; + + $form->get_lists('languages' => 'LANGUAGES'); + + my $translation_list = GenericTranslations->list(translation_type => 'sepa_remittance_info_pfx'); + my %translations = map { ( ($_->{language_id} || 'default') => $_->{translation} ) } @{ $translation_list }; + + unshift @{ $form->{LANGUAGES} }, { 'id' => 'default', }; + + foreach my $language (@{ $form->{LANGUAGES} }) { + $language->{translation} = $translations{$language->{id}}; + } + + $form->{title} = $locale->text('Edit SEPA strings'); + $form->header(); + print $form->parse_html_template('generictranslations/edit_sepa_strings'); + + $main::lxdebug->leave_sub(); +} + +sub save_sepa_strings { + $main::lxdebug->enter_sub(); + + $main::auth->assert('config'); + + my $form = $main::form; + my $locale = $main::locale; + + $form->get_lists('languages' => 'LANGUAGES'); + + unshift @{ $form->{LANGUAGES} }, { }; + + foreach my $language (@{ $form->{LANGUAGES} }) { + GenericTranslations->save('translation_type' => 'sepa_remittance_info_pfx', + 'translation_id' => undef, + 'language_id' => $language->{id}, + 'translation' => $form->{"translation__" . ($language->{id} || 'default')},); + } + + $form->{message} = $locale->text('The SEPA strings have been saved.'); + + edit_sepa_strings(); + + $main::lxdebug->leave_sub(); +} + 1; diff --git a/locale/de/all b/locale/de/all index 55eb698a5..d4255175c 100644 --- a/locale/de/all +++ b/locale/de/all @@ -647,6 +647,7 @@ $self->{texts} = { 'Edit Purchase Order' => 'Lieferantenaufrag bearbeiten', 'Edit Quotation' => 'Angebot bearbeiten', 'Edit Request for Quotation' => 'Anfrage bearbeiten', + 'Edit SEPA strings' => 'Begriffe bei SEPA-Überweisungen bearbeiten', 'Edit Sales Delivery Order' => 'Lieferschein (Verkauf) bearbeiten', 'Edit Sales Invoice' => 'Rechnung bearbeiten', 'Edit Sales Order' => 'Auftrag bearbeiten', @@ -1347,6 +1348,7 @@ $self->{texts} = { 'Reference missing!' => 'Referenz fehlt!', 'Release From Stock' => 'Lagerausgang', 'Remaining' => 'Rest', + 'Remittance information prefix' => 'Verwendungszweckvorbelegung (Präfix)', 'Removal' => 'Entnahme', 'Removal from Warehouse' => 'Lagerentnahme', 'Removal from warehouse' => 'Entnahme aus Lager', @@ -1386,6 +1388,7 @@ $self->{texts} = { 'SEPA XML download' => 'SEPA-XML-Download', 'SEPA creditor ID' => 'SEPA-Kreditoren-Identifikation', 'SEPA exports:' => 'SEPA-Exporte:', + 'SEPA strings' => 'SEPA-Überweisungen', 'Saldo Credit' => 'Saldo Haben', 'Saldo Debit' => 'Saldo Soll', 'Saldo neu' => 'Saldo neu', @@ -1589,6 +1592,7 @@ $self->{texts} = { 'The GL transaction #1 has been deleted.' => 'Die Dialogbuchung #1 wurde gelöscht.', 'The LDAP server "#1:#2" is unreachable. Please check config/authentication.pl.' => 'Der LDAP-Server "#1:#2" ist nicht erreichbar. Bitte überprüfen Sie die Angaben in config/authentication.pl.', 'The SEPA export has been created.' => 'Der SEPA-Export wurde erstellt', + 'The SEPA strings have been saved.' => 'Die bei SEPA-Überweisungen verwendeten Begriffe wurden gespeichert.', 'The access rights have been saved.' => 'Die Zugriffsrechte wurden gespeichert.', 'The account 3804 already exists, the update will be skipped.' => 'Das Konto 3804 existiert schon, das Update wird übersprungen.', 'The account 3804 will not be added automatically.' => 'Das Konto 3804 wird nicht automatisch hinzugefügt.', diff --git a/menu.ini b/menu.ini index dd763b2de..7ca0fa173 100644 --- a/menu.ini +++ b/menu.ini @@ -685,6 +685,10 @@ action=list_language module=generictranslations.pl action=edit_greetings +[System--Languages--SEPA strings] +module=generictranslations.pl +action=edit_sepa_strings + [System--Payment Terms] module=menu.pl diff --git a/templates/webpages/generictranslations/edit_sepa_strings.html b/templates/webpages/generictranslations/edit_sepa_strings.html new file mode 100644 index 000000000..c6acd8446 --- /dev/null +++ b/templates/webpages/generictranslations/edit_sepa_strings.html @@ -0,0 +1,46 @@ +[%- USE T8 %] +[% USE HTML %] + +

+

[% HTML.escape(title) %]
+

+ + [%- IF message %] +

+ [% HTML.escape(message) %] +

+ [%- END %] + +
+ + + + + + + + + [%- FOREACH language = LANGUAGES %] + + + + + [%- END %] + +
 [% 'Remittance information prefix' | $T8 %]
+ [%- IF language.id == 'default' %] + [% 'Default (no language selected)' | $T8 %] + [%- ELSE %] + [%- HTML.escape(language.description) %] + [%- END %] +
+ +

+ + +

+ +
+ + + -- 2.20.1