Added translations 🌎

ref #113
This commit is contained in:
Nicolai Ort 2021-04-15 15:34:36 +02:00
parent 57618156b4
commit d015f97395
5 changed files with 27 additions and 14 deletions

View File

@ -33,7 +33,7 @@
if (processed_last_submit === true) {
processed_last_submit = false;
const toast = Toastify({
text: "Updating Donation",
text: $_('updating-donation'),
duration: -1,
}).showToast();
editable.donor = editable.donor.id;
@ -48,7 +48,7 @@
payment_modal_open = false;
//
Toastify({
text: "Donation updated",
text: $_('donation-updated'),
duration: 500,
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
}).showToast();
@ -73,7 +73,7 @@
payment_modal_open = false;
//
Toastify({
text: "Donation updated",
text: $_('donation-updated'),
duration: 500,
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
}).showToast();
@ -133,11 +133,11 @@
</div>
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
<h3 class="text-lg leading-6 font-medium text-gray-900">
Add or Update a payment
{$_('enter-payment')}
</h3>
<div class="mt-2 mb-6">
<p class="text-sm text-gray-500">
You can update the donation's paid amount manually or use the TODO button to use the donation's exact amount.
{$_('you-can-enter-the-donations-paid-amount-manually-or-use-the-max-button-to-use-the-donations-exact-amount')}
</p>
</div>
<div class="grid grid-cols gap-6">
@ -170,7 +170,7 @@
{#if !is_amount_valid}
<span
class="flex items-center font-medium tracking-wide text-red-500 text-xs mt-1 ml-1">
Payment amount must be greater than 0.00€
{$_('payment-amount-must-be-greater-than-0-00eur')}
</span>
{/if}
</div>

View File

@ -66,7 +66,7 @@
function submit() {
if (data_loaded === true && save_enabled) {
Toastify({
text: "Donation is being updated",
text: $_('updating-donation'),
duration: 2500,
}).showToast();
let postdata = {};
@ -83,7 +83,7 @@
Object.assign(original_data, editable);
original_data = original_data;
Toastify({
text: "updated donation",
text: $_('donation-updated'),
duration: 2500,
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
}).showToast();
@ -98,7 +98,7 @@
Object.assign(original_data, editable);
original_data = original_data;
Toastify({
text: "updated donation",
text: $_('donation-updated'),
duration: 2500,
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
}).showToast();
@ -112,7 +112,7 @@
DonationService.donationControllerRemove(original_data.id, false)
.then((resp) => {
Toastify({
text: "Donation delete",
text: $_('donation-deleted'),
duration: 500,
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
}).showToast();

View File

@ -187,7 +187,7 @@
(obj) => obj.id !== donation.id
);
Toastify({
text: 'Donation deleted',
text: $_('donation-deleted'),
duration: 500,
backgroundColor:
'linear-gradient(to right, #00b09b, #96c93d)',
@ -203,7 +203,7 @@
class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<button
on:click={() => {open_payment_modal(donation);}}
class="text-green-600 hover:text-green-900 mr-4">Add payment</button>
class="text-green-600 hover:text-green-900 mr-4">{$_('enter-payment')}</button>
<a
href="./{donation.id}"
class="text-indigo-600 hover:text-indigo-900">{$_('details')}</a>

View File

@ -438,5 +438,11 @@
"paid": "BEZAHLT",
"open": "OFFEN",
"already-paid": "Bereits bezahlt",
"unpaid": "Offen"
"unpaid": "Offen",
"enter-payment": "Zahlung eingeben",
"you-can-enter-the-donations-paid-amount-manually-or-use-the-max-button-to-use-the-donations-exact-amount": "Du kannst den Betrag der Zahlung entweder manuell eingeben oder über den MAX Button auf den Spendenbetrag setzen",
"payment-amount-must-be-greater-than-0-00eur": "Der Zahlungsbetrag muss größer als 0.00€ sein!",
"donation-updated": "Sponsoring wurde aktualisiert",
"updating-donation": "Sponsoring wird aktualisiert",
"donation-deleted": "Sponsoring gelöscht"
}

View File

@ -438,5 +438,12 @@
"paid": "PAID",
"open": "OPEN",
"already-paid": "Already paid",
"unpaid": "Unpaid"
"unpaid": "Unpaid",
"enter-payment": "Enter payment",
"add-or-update-a-payment": "Add or update a payment",
"you-can-enter-the-donations-paid-amount-manually-or-use-the-max-button-to-use-the-donations-exact-amount": "You can enter the donation's paid amount manually or use the MAX button to use the donation's exact amount.",
"payment-amount-must-be-greater-than-0-00eur": "Payment amount must be greater than 0.00€!",
"donation-updated": "Donation updated",
"updating-donation": "Updating donation",
"donation-deleted": "Donation deleted"
}