refactoring, add language keys

This commit is contained in:
Steffen Mahler 2020-06-05 08:19:13 +02:00
parent dcc6ae3f94
commit a735180f38
11 changed files with 26 additions and 8 deletions

View File

@ -219,7 +219,7 @@ class Cart
$cart = $this->cartRepository->create($cartData);
if (! $cart) {
session()->flash('error', trans('shop::app.checkout.cart.create-error'));
session()->flash('error', __('shop::app.checkout.cart.create-error'));
return;
}
@ -245,19 +245,19 @@ class Cart
}
if ($item->product && $item->product->status === 0) {
throw new \Exception(trans('shop::app.checkout.cart.item.inactive'));
throw new \Exception(__('shop::app.checkout.cart.item.inactive'));
}
if ($quantity <= 0) {
$this->removeItem($itemId);
throw new \Exception(trans('shop::app.checkout.cart.quantity.illegal'));
throw new \Exception(__('shop::app.checkout.cart.quantity.illegal'));
}
$item->quantity = $quantity;
if (! $this->isItemHaveQuantity($item)) {
throw new \Exception(trans('shop::app.checkout.cart.quantity.inventory_warning'));
throw new \Exception(__('shop::app.checkout.cart.quantity.inventory_warning'));
}
Event::dispatch('checkout.cart.update.before', $item);
@ -822,7 +822,7 @@ class Cart
}
}
session()->flash('info', trans('shop::app.checkout.cart.item.inactive'));
session()->flash('info', __('shop::app.checkout.cart.item.inactive'));
}
}
$cart->save();

View File

@ -461,6 +461,8 @@ return [
'success' => 'تم بنجاح إضافة العنصر إلى العربة',
'success-remove' => 'تم إزالة العنصر بنجاح من العربة',
'error-add' => 'لا يمكن إضافة العنصر إلى العربة ، رجاء حاول مرة أخرى ',
'inactive' => 'An item is inactive and was removed from cart.',
'inactive-add' => 'Inactive item cannot be added to cart.',
],
'quantity-error' => 'الكمية المطلوبة غير متوفرة',
'cart-subtotal' => 'المجموع الفرعي للمشتريات',

View File

@ -459,7 +459,7 @@ return [
'success-remove' => 'Artikel wurde erfolgreich aus dem Warenkorb entfernt',
'error-add' => 'Artikel kann nicht zum Warenkorb hinzugefügt werden. Bitte versuchen Sie es später erneut',
'inactive' => 'Ein Artikel ist inaktiv und wurde aus dem Warenkorb entfernt.',
'inactive-add' => 'Ein inactiver Artikel kann nicht zum Warenkorb hinzugefügt werde.',
'inactive-add' => 'Ein inaktiver Artikel kann nicht zum Warenkorb hinzugefügt werde.',
],
'quantity-error' => 'Die angeforderte Menge ist nicht verfügbar',
'cart-subtotal' => 'Warenkorb Zwischensumme',

View File

@ -428,6 +428,8 @@ return [
'success' => 'El artículp se añadió a la cesta',
'success-remove' => 'El artículo se eliminó de la cesta',
'error-add' => 'El artículo no se puede añadir a la cesta, inténtelo más tarde',
'inactive' => 'An item is inactive and was removed from cart.',
'inactive-add' => 'Inactive item cannot be added to cart.',
],
'quantity-error' => 'La cantidad solicitada no está disponible',
'cart-subtotal' => 'Total parcial',

View File

@ -460,6 +460,8 @@ return [
'success' => 'مورد با موفقیت به سبد خرید اضافه شد',
'success-remove' => 'مورد با موفقیت از سبد خرید حذف شد',
'error-add' => 'لطفاً موردی را به سبد خرید اضافه نکرد ، لطفا بعداً دوباره امتحان کنید',
'inactive' => 'An item is inactive and was removed from cart.',
'inactive-add' => 'Inactive item cannot be added to cart.',
],
'quantity-error' => 'مقدار درخواستی در دسترس نیست',

View File

@ -460,6 +460,8 @@ return [
'success' => 'Prodotto aggiunto al carrello.',
'success-remove' => 'Prodotto rimosso dal carrello.',
'error-add' => 'Il prodotto non può essere aggiunto al carrello, prova ancora.',
'inactive' => 'An item is inactive and was removed from cart.',
'inactive-add' => 'Inactive item cannot be added to cart.',
],
'quantity-error' => 'La quantità richiesta non è disponibile.',
'cart-subtotal' => 'Subtotale Carrello',
@ -672,7 +674,7 @@ return [
'subject' => 'Email Iscrizione',
'greeting' => ' Benvenuto ' . config('app.name') . ' - Email Iscrizione',
'unsubscribe' => 'Cancellati',
'summary' => 'Grazie per avere scelto di ricevere le nostre email. È passato un po\' di tempo da quando hai letto le email di ' . config('app.name') . '. Non è un nostro desidero inondare la tua casella email con le nostre comunicazioni. Se desideri comunque
'summary' => 'Grazie per avere scelto di ricevere le nostre email. È passato un po\' di tempo da quando hai letto le email di ' . config('app.name') . '. Non è un nostro desidero inondare la tua casella email con le nostre comunicazioni. Se desideri comunque
non ricevere più le nostre news clicca il bottone qui sotto.'
]
]

View File

@ -422,6 +422,8 @@ return [
'success' => 'アイテムがカートに追加されました。',
'success-remove' => 'アイテムがカートから削除されました。',
'error-add' => 'アイテムをカートに追加できません。しばらくしてから再度お試し下さい。',
'inactive' => 'An item is inactive and was removed from cart.',
'inactive-add' => 'Inactive item cannot be added to cart.',
],
'quantity-error' => 'ご希望の数量の在庫が現在ございません。',
'cart-subtotal' => '小計',

View File

@ -465,6 +465,8 @@ return [
'success' => 'Artikel is succesvol toegevoegd aan winkelwagen.',
'success-remove' => 'Item is met succes uit de winkelwagen verwijderd.',
'error-add' => 'Item kan niet aan winkelwagen worden toegevoegd. Probeer het later opnieuw.',
'inactive' => 'An item is inactive and was removed from cart.',
'inactive-add' => 'Inactive item cannot be added to cart.',
],
'quantity-error' => 'Gevraagde hoeveelheid is niet beschikbaar.',
'cart-subtotal' => 'Subtotaal',

View File

@ -459,6 +459,8 @@ return [
'success' => 'Produkt został pomyślnie dodany do koszyka.',
'success-remove' => 'Produkt został pomyślnie usunięty z koszyka.',
'error-add' => 'Nie można dodać produktu do koszyka, spróbuj ponownie później.',
'inactive' => 'An item is inactive and was removed from cart.',
'inactive-add' => 'Inactive item cannot be added to cart.',
],
'quantity-error' => 'Żądana ilość nie jest dostępna.',
'cart-subtotal' => 'Suma częściowa koszyka',

View File

@ -450,6 +450,8 @@ return [
'success' => 'Item foi adicionado com sucesso ao carrinho',
'success-remove' => 'Item foi removido com sucesso do carrinho',
'error-add' => 'Item não pode ser adicionado ao carrinho, por favor, tente novamente mais tarde',
'inactive' => 'An item is inactive and was removed from cart.',
'inactive-add' => 'Inactive item cannot be added to cart.',
],
'quantity-error' => 'Quantidade solicitada não está disponível',
'cart-subtotal' => 'Subtotal do carrinho',

View File

@ -459,6 +459,8 @@ return [
'success' => 'Ürün başarıyla sepete eklendi.',
'success-remove' => 'Ürün sepetten başarıyla kaldırıldı.',
'error-add' => 'Ürün sepete eklenirken hata oluştu, lütfen tekrar deneyin.',
'inactive' => 'An item is inactive and was removed from cart.',
'inactive-add' => 'Inactive item cannot be added to cart.',
],
'quantity-error' => 'Girilen miktar mevcut değil.',
'cart-subtotal' => 'Sepet Ara Toplam',
@ -572,7 +574,7 @@ return [
'final-summary' => 'Bizi tercih ettiğiniz için teşekkür ederiz. Ürün kargoya teslim edildikten sonra takip numarası iletilecektir.',
'help' => 'Soru ve görüşleriniz için lütfen bizimle iletişime geçiniz: :support_email',
'thanks' => 'Teşekkürler!',
'comment' => [
'subject' => 'Siparişinize yeni yorum yapıldı.',
'dear' => 'Sayın :customer_name',