Refactor MemberTransferSettingsView to utilize computed properties for bulk wrapper and template descriptions, enhancing localization handling with placeholders.
This commit is contained in:
@@ -162,7 +162,7 @@
|
||||
<div class="template-explanation">
|
||||
<p class="template-intro">
|
||||
<strong>{{ $t('memberTransfer.bulkWrapperWhat') }}</strong><br>
|
||||
{{ $t('memberTransfer.bulkWrapperDescription', ['{{members}}']) }}
|
||||
{{ bulkWrapperDescriptionText }}
|
||||
</p>
|
||||
<div class="template-examples">
|
||||
<div class="example-section">
|
||||
@@ -207,7 +207,7 @@
|
||||
<div class="template-explanation">
|
||||
<p class="template-intro">
|
||||
<strong>{{ $t('memberTransfer.templateWhat') }}</strong><br>
|
||||
{{ $t('memberTransfer.templateDescription', ['{{firstName}}']) }}
|
||||
{{ templateDescriptionText }}
|
||||
</p>
|
||||
<div class="template-examples">
|
||||
<div class="example-section">
|
||||
@@ -365,6 +365,16 @@ address={{address}}`;
|
||||
return '{"members": [{{members}}]}';
|
||||
},
|
||||
|
||||
bulkWrapperDescriptionText() {
|
||||
// Ersetze {0} durch {{members}} im übersetzten Text
|
||||
return this.$t('memberTransfer.bulkWrapperDescription').replace('{0}', '{{members}}');
|
||||
},
|
||||
|
||||
templateDescriptionText() {
|
||||
// Ersetze {0} durch {{firstName}} im übersetzten Text
|
||||
return this.$t('memberTransfer.templateDescription').replace('{0}', '{{firstName}}');
|
||||
},
|
||||
|
||||
templatePlaceholder() {
|
||||
if (this.config.transferFormat === 'json') {
|
||||
return '{"firstName": "{{firstName}}", "lastName": "{{lastName}}", "geburtsdatum": "{{geburtsdatum}}", "email": "{{email}}", "phone": "{{phone}}", "address": "{{address}}"}';
|
||||
|
||||
Reference in New Issue
Block a user