backend language strings updates

This commit is contained in:
Čarodej
2022-03-20 14:26:53 +01:00
parent 881facc867
commit 73ef6e6c1f
27 changed files with 257 additions and 116 deletions
@@ -18,23 +18,23 @@ class BillingAlertTriggeredNotification extends Notification implements ShouldQu
public function toMail(): MailMessage
{
return (new MailMessage)
->subject(__('Your billing alert has been reached!'))
->greeting(__('Hi there'))
->line(__('The billing alert you set previously has been reached. Please go to your user account and revise your spending'))
->action(__('Show Billing'), url('/user/settings/billing'));
->subject(__t('billing_alert_reached_long'))
->greeting(__t('hello'))
->line(__t('billing_alert_reached_long_note'))
->action(__t('show_billing'), url('/user/settings/billing'));
}
public function toArray(): array
{
return [
'category' => 'billing-alert',
'title' => 'billing Alert Reached!',
'description' => 'The billing alert you set previously has been reached. Please revise your spending.',
'title' => __t('billing_alert_reached_short'),
'description' => __t('billing_alert_reached_short_note'),
'action' => [
'type' => 'route',
'params' => [
'route' => 'Billing',
'button' => 'Show Billing',
'route' => __t('billing'),
'button' => __t('show_billing'),
],
],
];
@@ -34,8 +34,8 @@ class BonusCreditAddedNotification extends Notification implements ShouldQueue
{
return [
'category' => 'gift',
'title' => "You Received {$this->bonus}",
'description' => "You received credit bonus $this->bonus from us. Happy spending!",
'title' => __t('you_received_bonus', ['bonus' => $this->bonus]),
'description' => __t('you_received_bonus_note', ['bonus' => $this->bonus]),
];
}
}
@@ -0,0 +1,26 @@
<?php
namespace Domain\Subscriptions\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
class ChargeFromCreditCardFailedAgainNotification extends Notification implements ShouldQueue
{
use Queueable;
public function via(): array
{
return ['mail'];
}
public function toMail(): MailMessage
{
return (new MailMessage)
->subject(__t('charge_from_card_failed_again_subject'))
->greeting(__t('hello'))
->line(__t('charge_from_card_failed_again_line'))
->action(__t('charge_from_card_failed_again_action'), url('/user/settings/billing'));
}
}
@@ -0,0 +1,26 @@
<?php
namespace Domain\Subscriptions\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
class ChargeFromCreditCardFailedNotification extends Notification implements ShouldQueue
{
use Queueable;
public function via(): array
{
return ['mail'];
}
public function toMail(): MailMessage
{
return (new MailMessage)
->subject(__t('charge_from_card_failed_subject'))
->greeting(__t('hello'))
->line(__t('charge_from_card_failed_line'))
->action(__t('charge_from_card_failed_action'), url('/user/settings/billing'));
}
}
@@ -0,0 +1,31 @@
<?php
namespace Domain\Subscriptions\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
class ConfirmStripePaymentNotification extends Notification implements ShouldQueue
{
use Queueable;
public function __construct(
public array $payload
) {
}
public function via(): array
{
return ['mail'];
}
public function toMail(): MailMessage
{
return (new MailMessage)
->subject(__t('confirm_payment'))
->greeting(__t('confirm_payment_greeting', ['amount' => $this->payload['amount']]))
->line(__t('confirm_payment_line'))
->action(__t('confirm_payment_action'), $this->payload['url']);
}
}
@@ -18,23 +18,23 @@ class InsufficientBalanceNotification extends Notification implements ShouldQueu
public function toMail(): MailMessage
{
return (new MailMessage)
->subject(__('Uh-oh! Your credit withdrawal for your pre-paid subscription failed'))
->greeting(__('Hi there'))
->line(__("It looks like your subscription credit withdrawal for your account didn't go through. Please make sure you have sufficient funds on your account and we'll give it another try!"))
->action(__('Fund Your Account'), url('/user/settings/billing'));
->subject(__t('withdrawal_failed_long'))
->greeting(__t('hello'))
->line(__t('withdrawal_failed_long_note'))
->action(__t('fund_your_account'), url('/user/settings/billing'));
}
public function toArray(): array
{
return [
'category' => 'insufficient-balance',
'title' => 'Withdrawal failed',
'description' => "Your credit withdrawal for your account didn't go through. Please make sure you have sufficient funds on your account.",
'title' => __t('withdrawal_failed_short'),
'description' => __t('withdrawal_failed_short_note'),
'action' => [
'type' => 'route',
'params' => [
'route' => 'Billing',
'button' => 'Show Billing',
'route' => __t('billing'),
'button' => __t('show_billing'),
],
],
];
@@ -24,23 +24,23 @@ class SubscriptionWasCreatedNotification extends Notification implements ShouldQ
public function toMail(): MailMessage
{
return (new MailMessage)
->subject(__("Your subscription {$this->subscription->plan->name} has been successfully created"))
->greeting(__('Hi there'))
->line(__("You have been successfully subscribed to your {$this->subscription->plan->name} subscription. Now you can take full advantage of our platform."))
->action(__('Go to Subscription'), url('/user/settings/billing'));
->subject(__t('subscription_created_long', ['plan' => $this->subscription->plan->name]))
->greeting(__t('hello'))
->line(__t('subscription_created_long_note', ['plan' => $this->subscription->plan->name]))
->action(__t('go_to_subscription'), url('/user/settings/billing'));
}
public function toArray(): array
{
return [
'category' => 'subscription-created',
'title' => 'Subscription Has Been Created',
'description' => "Your subscription {$this->subscription->plan->name} has been successfully created",
'title' => __t('subscription_created_short'),
'description' => __t('subscription_created_short_note', ['plan' => $this->subscription->plan->name]),
'action' => [
'type' => 'route',
'params' => [
'route' => 'Billing',
'button' => 'Show Billing',
'route' => __t('billing'),
'button' => __t('show_billing'),
],
],
];