mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
backend language strings updates
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
APP_NAME=Laravel
|
||||
APP_ENV=local
|
||||
APP_KEY=base64:pmWS5U7+noTCU5suzjqHJ6JLy97iftEZhwvX+pEZKKs=
|
||||
APP_KEY=base64:YxwN4ge+hJYN/J9RTxCcgUdPZ3zBMUVWmzU71vwjU9Y=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
APP_DEMO=false
|
||||
|
||||
@@ -11,7 +11,7 @@ return [
|
||||
'plan_description' => 'Plan description',
|
||||
'type_plan_name' => 'Type plan name',
|
||||
'plan_name' => 'Plan name',
|
||||
'plan_price' => 'Plan price',
|
||||
'plan_price' => 'Plan price',
|
||||
'admin_page_plans.form.status_help' => 'Status of your plan availability on website.',
|
||||
'admin_page_plans.form.storage' => 'Storage Capacity in GB',
|
||||
'admin_page_plans.form.storage_helper' => "You have to type only number e.g. value '5' means, user will have 5GB of storage capacity.",
|
||||
@@ -228,6 +228,42 @@ return [
|
||||
'interval.year' => 'Yearly',
|
||||
'interval.month' => 'Monthly',
|
||||
'subscriptions' => 'Subscriptions',
|
||||
'show_billing' => 'Show Billing',
|
||||
'billing_alert_reached_short' => 'Billing Alert Reached!',
|
||||
'billing_alert_reached_short_note' => 'The billing alert you set previously has been reached. Please revise your spending.',
|
||||
'billing_alert_reached_long' => 'Your billing alert has been reached!',
|
||||
'billing_alert_reached_long_note' => 'The billing alert you set previously has been reached. Please go to your user account and revise your spending',
|
||||
'you_received_bonus' => 'You Received {bonus}',
|
||||
'you_received_bonus_note' => 'You received credit bonus {bonus} from us. Happy spending!',
|
||||
'you_received_registration_bonus_note' => 'You received credit bonus {bonus} for your registration. Happy spending!',
|
||||
'withdrawal_failed_short' => 'Withdrawal Failed',
|
||||
'withdrawal_failed_short_note' => "Your credit withdrawal for your account didn't go through. Please make sure you have sufficient funds on your account.",
|
||||
'withdrawal_failed_long' => 'Uh-oh! Your credit withdrawal for your pre-paid subscription failed',
|
||||
'withdrawal_failed_long_note' => "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!",
|
||||
'fund_your_account' => 'Fund Your Account',
|
||||
'subscription_created_short' => 'Subscription Has Been Created',
|
||||
'subscription_created_short_note' => 'Your subscription {plan} has been successfully created',
|
||||
'subscription_created_long' => 'Your subscription {plan} has been successfully created',
|
||||
'subscription_created_long_note' => 'You have been successfully subscribed to your {plan} subscription. Now you can take full advantage of our platform.',
|
||||
'go_to_subscription' => 'Go to Subscription',
|
||||
'charge_from_card_failed_subject' => 'Uh-oh! Your withdrawal from your credit card for pre-paid subscription failed',
|
||||
'charge_from_card_failed_line' => "It looks like withdrawal from your credit card for pre-paid subscription for your account didn't go through. Please check your credit card or register new credit card for your account and we'll give it another try!",
|
||||
'charge_from_card_failed_action' => 'Go to Billing Settings',
|
||||
'charge_from_card_failed_again_subject' => 'Uh-oh! Your withdrawal from your credit card for pre-paid subscription failed once again',
|
||||
'charge_from_card_failed_again_line' => "It looks like withdrawal from your credit card for pre-paid subscription for your account didn't go through once again. Please check your credit card or register new credit card for your account and we'll give it another try!",
|
||||
'charge_from_card_failed_again_action' => 'Update Your Payment Information',
|
||||
'confirm_payment' => 'Confirm Payment',
|
||||
'confirm_payment_greeting' => 'Confirm your {amount} payment',
|
||||
'confirm_payment_line' => 'Extra confirmation is needed to process your payment. Please continue to the payment page by clicking on the button below.',
|
||||
'confirm_payment_action' => 'Confirm Payment',
|
||||
'registration_bonus' => 'Registration Bonus',
|
||||
'number' => 'Number',
|
||||
'head_office' => 'Head Office',
|
||||
'vat_id' => 'VAT ID',
|
||||
'date_of_issue' => 'Date of issue',
|
||||
'period' => 'Period',
|
||||
'Description' => 'description',
|
||||
'generated_by' => 'Generated by',
|
||||
],
|
||||
'regular' => [
|
||||
'type' => 'Type',
|
||||
@@ -660,6 +696,7 @@ return [
|
||||
'upload_folder' => 'Upload Folder',
|
||||
'member' => 'Members',
|
||||
'request_for_upload' => '{name} is Asking You For Files',
|
||||
'upload_request' => 'Upload Request',
|
||||
'request_for_upload_success' => 'Upload Request for {name} was Fulfilled Successfully',
|
||||
'request_for_upload_expired' => 'Upload Request Expired',
|
||||
'automatically_uploads_for_file_request' => 'Your files will be uploaded automatically and after that, you can organize your files in folders.',
|
||||
@@ -825,7 +862,6 @@ return [
|
||||
'update_profile_settings' => 'Update Profile Settings',
|
||||
'update_security_api' => 'Update Security & API',
|
||||
'show_storage_details' => 'Show Storage Details',
|
||||
'show_billing' => 'Show Billing',
|
||||
'empty_your_trash' => 'Empty Your Trash',
|
||||
'toggle_grid_list_view' => 'Toggle Grid/List View',
|
||||
'toggle_dark_light_mode' => 'Toggle Dark/Light Mode',
|
||||
@@ -864,8 +900,31 @@ return [
|
||||
'active' => 'Active',
|
||||
'archived' => 'Archived',
|
||||
'inactive' => 'Inactive',
|
||||
'total_x_of_x_used' => 'Total ${use} of ${total} Used',
|
||||
'total_x_of_x_members' => 'Total ${use} of ${total} Members',
|
||||
'go_back_from_x' => 'Go back from {location}',
|
||||
'total_x_of_x_used' => 'Total ${use} of ${total} Used',
|
||||
'total_x_of_x_members' => 'Total ${use} of ${total} Members',
|
||||
'go_back_from_x' => 'Go back from {location}',
|
||||
'new_team_invitation' => 'New Team Invitation',
|
||||
'x_invite_to_join_team' => "{name} invite you to join into Team Folder.",
|
||||
'team_invitation_notify_title' => 'You are invited to collaboration with team folder in {app}',
|
||||
'team_invitation_notify_desc' => 'You are invited to collaboration with team folder',
|
||||
'team_invitation_notify_desc_without_account' => 'You are invited to collaboration with team folder. But at first, you have to create an account to proceed into team folder.',
|
||||
'join_into_team_folder' => 'Join into Team Folder',
|
||||
'join_and_create_account' => 'Join & Create an Account',
|
||||
'file_request_filled' => 'File Request Filled',
|
||||
'file_request_filled_desc' => "Your file request for '{name}' folder was filled successfully.",
|
||||
'show_files' => 'Show Files',
|
||||
'file_request_filled_mail' => "Your file request was fulfilled in your '{name}' folder",
|
||||
'file_request_filled_mail_note' => "We are emailing you because your file request was fulfilled. Please click on the link below to show uploaded files.",
|
||||
'thanks_salutation' => 'Thank you for using our application!',
|
||||
'upload_your_files' => 'Upload your Files',
|
||||
'file_request_optional_message' => "PS: {name} left you a message: {notes}",
|
||||
'file_request_notify_title' => '{name} Request You for File Upload',
|
||||
'file_request_notify_description' => "We are emailing you because {name} requested files from you. Please click on the link below and upload your files for {name}.",
|
||||
'user_action_not_allowed' => 'This user action is not allowed.',
|
||||
'pcs.' => 'Pcs.',
|
||||
'mem.' => 'Mem.',
|
||||
'password_doesnt_match' => 'The provided password does not match your current password.',
|
||||
'amount' => 'Amount',
|
||||
'upload_request_default_folder' => 'Upload Request from {timestamp}',
|
||||
],
|
||||
];
|
||||
|
||||
@@ -23,11 +23,11 @@ return [
|
||||
],
|
||||
|
||||
'notifications' => [
|
||||
'ChargeFromCreditCardFailedAgainNotification' => \VueFileManager\Subscription\Domain\FailedPayments\Notifications\ChargeFromCreditCardFailedAgainNotification::class,
|
||||
'ChargeFromCreditCardFailedNotification' => \VueFileManager\Subscription\Domain\FailedPayments\Notifications\ChargeFromCreditCardFailedNotification::class,
|
||||
'ConfirmStripePaymentNotification' => \VueFileManager\Subscription\Support\Miscellaneous\Stripe\Notifications\ConfirmStripePaymentNotification::class,
|
||||
'ChargeFromCreditCardFailedAgainNotification' => \Domain\Subscriptions\Notifications\ChargeFromCreditCardFailedAgainNotification::class,
|
||||
'ChargeFromCreditCardFailedNotification' => \Domain\Subscriptions\Notifications\ChargeFromCreditCardFailedNotification::class,
|
||||
'SubscriptionWasCreatedNotification' => \Domain\Subscriptions\Notifications\SubscriptionWasCreatedNotification::class,
|
||||
'BillingAlertTriggeredNotification' => \Domain\Subscriptions\Notifications\BillingAlertTriggeredNotification::class,
|
||||
'ConfirmStripePaymentNotification' => \Domain\Subscriptions\Notifications\ConfirmStripePaymentNotification::class,
|
||||
'InsufficientBalanceNotification' => \Domain\Subscriptions\Notifications\InsufficientBalanceNotification::class,
|
||||
'BonusCreditAddedNotification' => \Domain\Subscriptions\Notifications\BonusCreditAddedNotification::class,
|
||||
],
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
{{ __t('invoice') }}
|
||||
</h1>
|
||||
<b class="text-gray-800 text-sm">
|
||||
Number: {{ $invoice->id }}
|
||||
{{ __t('number') }}: {{ $invoice->id }}
|
||||
</b>
|
||||
</div>
|
||||
</header>
|
||||
@@ -91,7 +91,7 @@
|
||||
|
||||
<div class="mb-3">
|
||||
<b class="text-theme text-base font-bold mb-1 block">
|
||||
Head Office:
|
||||
{{ __t('head_office') }}:
|
||||
</b>
|
||||
|
||||
@isset($settings->billing_address)
|
||||
@@ -133,12 +133,12 @@
|
||||
|
||||
<div>
|
||||
<b class="text-theme text-base font-bold mb-1 block">
|
||||
Billing Information:
|
||||
{{ __t('billing_information') }}:
|
||||
</b>
|
||||
|
||||
@isset($settings->billing_vat_number)
|
||||
<span class="font-bold block">
|
||||
VAT ID: {{ $settings->billing_vat_number }}
|
||||
{{ __t('vat_id') }}: {{ $settings->billing_vat_number }}
|
||||
</span>
|
||||
@endisset
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<div>
|
||||
<div class="bg-light-background rounded-xl p-4" style="width: 360px">
|
||||
<b class="text-theme text-base font-bold mb-1.5 block">
|
||||
Client:
|
||||
{{ __t('client') }}:
|
||||
</b>
|
||||
|
||||
@isset($invoice->user->settings->name)
|
||||
@@ -200,7 +200,7 @@
|
||||
@endisset
|
||||
</div>
|
||||
<div class="font-bold block lg:text-right print:text-right pt-3 text-sm">
|
||||
Date of issue: {{ format_date($invoice->created_at) }}
|
||||
{{ __t('date_of_issue') }}: {{ format_date($invoice->created_at) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -214,22 +214,22 @@
|
||||
<tr>
|
||||
<td class="pb-5">
|
||||
<span class="text-theme dark:text-gray-500 text-gray-400 text-xs font-bold">
|
||||
Description
|
||||
{{ __t('description') }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="pb-5">
|
||||
<span class="text-theme dark:text-gray-500 text-gray-400 text-xs font-bold">
|
||||
Period
|
||||
{{ __t('period') }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="pb-5">
|
||||
<span class="text-theme dark:text-gray-500 text-gray-400 text-xs font-bold">
|
||||
Usage
|
||||
{{ __t('usage') }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="pb-5 text-right">
|
||||
<span class="text-theme dark:text-gray-500 text-gray-400 text-xs font-bold">
|
||||
Amount
|
||||
{{ __t('amount') }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -266,7 +266,7 @@
|
||||
<tr class="whitespace-nowrap">
|
||||
<td class="py-1.5 pr-3">
|
||||
<span class="text-sm font-bold">
|
||||
Subscription
|
||||
{{ __t('subscription') }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="py-1.5">
|
||||
@@ -299,7 +299,7 @@
|
||||
<!-- Invoice Items -->
|
||||
<footer class="text-center">
|
||||
<p class="font-bold">
|
||||
Generated by <a href="{{ url('/') }}" target="_blank" class="font-bold text-theme underline">{{ $settings->app_title }}</a>
|
||||
{{ __t('generated_by') }} <a href="{{ url('/') }}" target="_blank" class="font-bold text-theme underline">{{ $settings->app_title }}</a>
|
||||
</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
@@ -33,7 +33,7 @@ class AutoSubscribeForMeteredBillingAction
|
||||
'status' => 'completed',
|
||||
'type' => 'credit',
|
||||
'driver' => 'system',
|
||||
'note' => __('Registration Bonus'),
|
||||
'note' => __t('registration_bonus'),
|
||||
'currency' => $plan->currency,
|
||||
'amount' => $settings['registration_bonus_amount'],
|
||||
]);
|
||||
|
||||
@@ -13,8 +13,8 @@ class FormatUsageEstimatesAction
|
||||
// Format usage
|
||||
$usage = match ($estimate['feature']) {
|
||||
'bandwidth', 'storage' => Metric::megabytes($estimate['usage'] * 1000)->format(),
|
||||
'flatFee' => intval($estimate['usage']) . ' ' . __('Pcs.'),
|
||||
'member' => intval($estimate['usage']) . ' ' . __('Mem.'),
|
||||
'flatFee' => intval($estimate['usage']) . ' ' . __t('pcs.'),
|
||||
'member' => intval($estimate['usage']) . ' ' . __t('mem.'),
|
||||
};
|
||||
|
||||
return [
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace App\Users\Actions;
|
||||
|
||||
use App\Users\Rules\PasswordValidationRules;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Laravel\Fortify\Contracts\UpdatesUserPasswords;
|
||||
@@ -23,8 +25,8 @@ class UpdateUserPassword implements UpdatesUserPasswords
|
||||
'current_password' => ['required', 'string'],
|
||||
'password' => $this->passwordRules(),
|
||||
])->after(function ($validator) use ($user, $input) {
|
||||
if (! isset($input['current_password']) || ! Hash::check($input['current_password'], $user->password)) {
|
||||
$validator->errors()->add('current_password', __('The provided password does not match your current password.'));
|
||||
if (!isset($input['current_password']) || !Hash::check($input['current_password'], $user->password)) {
|
||||
$validator->errors()->add('current_password', __t('password_doesnt_match'));
|
||||
}
|
||||
})->validateWithBag('updatePassword');
|
||||
|
||||
|
||||
@@ -5,6 +5,12 @@ use Exception;
|
||||
|
||||
class InvalidUserActionException extends Exception
|
||||
{
|
||||
// TODO: translate
|
||||
protected $message = 'This user action is not allowed.';
|
||||
public $message = 'This user action is not allowed.';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->message = __t('user_action_not_allowed');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,8 +34,8 @@ class RegistrationBonusAddedNotification extends Notification implements ShouldQ
|
||||
{
|
||||
return [
|
||||
'category' => 'gift',
|
||||
'title' => "You Received {$this->bonus}",
|
||||
'description' => "You received credit bonus $this->bonus for your registration. Happy spending!",
|
||||
'title' => __t('you_received_bonus', ['bonus' => $this->bonus]),
|
||||
'description' => __t('you_received_registration_bonus_note', ['bonus' => $this->bonus]),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,21 +39,21 @@ class NavigationTreeController
|
||||
return [
|
||||
[
|
||||
'location' => 'files',
|
||||
'name' => 'Files',
|
||||
'name' => __t('menu.files'),
|
||||
'folders' => $folders,
|
||||
'isMovable' => true,
|
||||
'isOpen' => true,
|
||||
],
|
||||
[
|
||||
'location' => 'team-folders',
|
||||
'name' => 'Team Folders',
|
||||
'name' => __t('team_folders'),
|
||||
'folders' => $teamFolders,
|
||||
'isMovable' => false,
|
||||
'isOpen' => false,
|
||||
],
|
||||
[
|
||||
'location' => 'shared-with-me',
|
||||
'name' => 'Shared With Me',
|
||||
'name' => __t('shared_with_me'),
|
||||
'folders' => $sharedWithMeFolders,
|
||||
'isMovable' => false,
|
||||
'isOpen' => false,
|
||||
|
||||
@@ -24,7 +24,7 @@ class SeedDefaultLanguageTranslationsAction
|
||||
$translations = $translations[strtolower($license)]
|
||||
->map(fn ($value, $key) => [
|
||||
'lang' => $locale,
|
||||
'value' => $value,
|
||||
'value' => '____',
|
||||
'key' => $key,
|
||||
])->toArray();
|
||||
|
||||
|
||||
@@ -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'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
@@ -38,19 +38,19 @@ class InvitationIntoTeamFolder extends Notification implements ShouldQueue
|
||||
|
||||
if ($user) {
|
||||
return (new MailMessage)
|
||||
->subject("You are invited to collaboration with team folder in $appTitle")
|
||||
->greeting('Hello!')
|
||||
->line('You are invited to collaboration with team folder')
|
||||
->action('Join into Team Folder', url('/team-folder-invitation', ['id' => $this->invitation->id]))
|
||||
->salutation("Regards, $appTitle");
|
||||
->subject(__t('team_invitation_notify_title', ['app' => $appTitle]))
|
||||
->greeting(__t('hello'))
|
||||
->line(__t('team_invitation_notify_desc'))
|
||||
->action(__t('join_into_team_folder'), url('/team-folder-invitation', ['id' => $this->invitation->id]))
|
||||
->salutation(__t('salutation') . ', ' . $appTitle);
|
||||
}
|
||||
|
||||
return (new MailMessage)
|
||||
->subject("You are invited to collaboration with team folder in $appTitle")
|
||||
->greeting('Hello!')
|
||||
->line('You are invited to collaboration with team folder. But at first, you have to create an account to proceed into team folder.')
|
||||
->action('Join & Create an Account', url('/team-folder-invitation', ['id' => $this->invitation->id]))
|
||||
->salutation("Regards, $appTitle");
|
||||
->subject(__t('team_invitation_notify_title', ['app' => $appTitle]))
|
||||
->greeting(__t('hello'))
|
||||
->line(__t('team_invitation_notify_desc_without_account'))
|
||||
->action(__t('join_and_create_account'), url('/team-folder-invitation', ['id' => $this->invitation->id]))
|
||||
->salutation(__t('salutation') . ', ' . $appTitle);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -60,8 +60,8 @@ class InvitationIntoTeamFolder extends Notification implements ShouldQueue
|
||||
{
|
||||
return [
|
||||
'category' => 'team-invitation',
|
||||
'title' => 'New Team Invitation',
|
||||
'description' => "{$this->invitation->inviter->settings->name} invite you to join into Team Folder.",
|
||||
'title' => __t('new_team_invitation'),
|
||||
'description' => __t('x_invite_to_join_team', ['name' => $this->invitation->inviter->settings->name,]),
|
||||
'action' => [
|
||||
'type' => 'invitation',
|
||||
'params' => [
|
||||
|
||||
@@ -21,7 +21,7 @@ class GetFolderTreeForUploadRequestController extends Controller
|
||||
|
||||
return [
|
||||
[
|
||||
'name' => 'Upload Request', // Todo: translate
|
||||
'name' => __t('upload_request'),
|
||||
'location' => 'upload-request',
|
||||
'folders' => $folders,
|
||||
'isMovable' => true,
|
||||
|
||||
@@ -60,14 +60,14 @@ class UploadFilesForUploadRequestController
|
||||
private function createFolder(UploadRequest $uploadRequest): void
|
||||
{
|
||||
// Format timestamp
|
||||
$timestampName = format_date($uploadRequest->created_at, 'd. M. Y');
|
||||
$timestamp = format_date($uploadRequest->created_at, 'd. M. Y');
|
||||
|
||||
// Create folder
|
||||
DB::table('folders')->insert([
|
||||
'id' => $uploadRequest->id,
|
||||
'parent_id' => $uploadRequest->folder_id ?? null,
|
||||
'user_id' => $uploadRequest->user_id,
|
||||
'name' => $uploadRequest->name ?? "Upload Request from $timestampName",
|
||||
'name' => $uploadRequest->name ?? __t('upload_request_default_folder', ['timestamp' => $timestamp]),
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace Domain\UploadRequest\Notifications;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
@@ -18,8 +19,7 @@ class UploadRequestFulfilledNotification extends Notification implements ShouldQ
|
||||
*/
|
||||
public function __construct(
|
||||
public UploadRequest $uploadRequest
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Get the notification's delivery channels.
|
||||
@@ -34,13 +34,12 @@ class UploadRequestFulfilledNotification extends Notification implements ShouldQ
|
||||
*/
|
||||
public function toMail(mixed $notifiable): MailMessage
|
||||
{
|
||||
// TODO: add to language strings
|
||||
return (new MailMessage)
|
||||
->subject("Your file request was fulfilled in your '{$this->uploadRequest->parent->name}' folder")
|
||||
->greeting('Hello')
|
||||
->line('We are emailing you because your file request was fulfilled. Please click on the link below to show uploaded files.')
|
||||
->action('Show Files', url("/platform/files/{$this->uploadRequest->id}"))
|
||||
->line('Thank you for using our application!');
|
||||
->subject(__t('file_request_filled_mail', ['name' => $this->uploadRequest->parent->name]))
|
||||
->greeting(__t('hello'))
|
||||
->line(__t('file_request_filled_mail_note'))
|
||||
->action(__t('show_files'), url("/platform/files/{$this->uploadRequest->id}"))
|
||||
->salutation(__t('thanks_salutation'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -50,13 +49,13 @@ class UploadRequestFulfilledNotification extends Notification implements ShouldQ
|
||||
{
|
||||
return [
|
||||
'category' => 'file-request',
|
||||
'title' => 'File Request Filled',
|
||||
'description' => "Your file request for '{$this->uploadRequest->parent->name}' folder was filled successfully.",
|
||||
'title' => __t('file_request_filled'),
|
||||
'description' => __t('file_request_filled_desc', ['name' => $this->uploadRequest->parent->name,]),
|
||||
'action' => [
|
||||
'type' => 'route',
|
||||
'params' => [
|
||||
'route' => 'Files',
|
||||
'button' => 'Show Files',
|
||||
'button' => __t('show_files'),
|
||||
'id' => $this->uploadRequest->id,
|
||||
],
|
||||
],
|
||||
|
||||
@@ -41,19 +41,17 @@ class UploadRequestNotification extends Notification implements ShouldQueue
|
||||
public function toMail($notifiable)
|
||||
{
|
||||
// Format optional message
|
||||
// TODO: add to language strings
|
||||
$message = $this->uploadRequest->notes
|
||||
? "PS: {$this->uploadRequest->user->settings->first_name} left you a message: {$this->uploadRequest->notes}"
|
||||
? __t('file_request_optional_message', ['name' => $this->uploadRequest->user->settings->first_name, 'notes' => $this->uploadRequest->notes])
|
||||
: null;
|
||||
|
||||
// TODO: add to language strings
|
||||
return (new MailMessage)
|
||||
->subject("{$this->uploadRequest->user->settings->first_name} Request You for File Upload")
|
||||
->greeting('Hello')
|
||||
->line("We are emailing you because {$this->uploadRequest->user->settings->first_name} requested files from you. Please click on the link below and upload your files for {$this->uploadRequest->user->settings->first_name}.")
|
||||
->subject(__t('file_request_notify_title', ['name' => $this->uploadRequest->user->settings->first_name]))
|
||||
->greeting(__t('hello'))
|
||||
->line(__t('file_request_notify_description', ['name' => $this->uploadRequest->user->settings->first_name]))
|
||||
->line($message)
|
||||
->action('Upload your Files', url("/request/{$this->uploadRequest->id}/upload"))
|
||||
->line('Thank you for using our application!');
|
||||
->action(__t('upload_your_files'), url("/request/{$this->uploadRequest->id}/upload"))
|
||||
->salutation(__t('thanks_salutation'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -110,12 +110,12 @@ class UserSubscriptionTest extends TestCase
|
||||
$usages = collect([
|
||||
[
|
||||
'feature' => 'bandwidth',
|
||||
'amount' => 7546.96,
|
||||
'usage' => 26024,
|
||||
'amount' => 7.54696,
|
||||
'usage' => 2.6024,
|
||||
], [
|
||||
'feature' => 'storage',
|
||||
'amount' => 476.28,
|
||||
'usage' => 3969,
|
||||
'amount' => 0.47628,
|
||||
'usage' => 3.969,
|
||||
], [
|
||||
'feature' => 'flatFee',
|
||||
'amount' => 2.49,
|
||||
@@ -136,7 +136,7 @@ class UserSubscriptionTest extends TestCase
|
||||
'feature' => 'bandwidth',
|
||||
'amount' => 7.54696,
|
||||
'cost' => '$7.55',
|
||||
'usage' => '26.02GB',
|
||||
'usage' => '2.60GB',
|
||||
],
|
||||
'storage' => [
|
||||
'feature' => 'storage',
|
||||
|
||||
@@ -121,7 +121,7 @@ class BrowseTest extends TestCase
|
||||
],
|
||||
[
|
||||
'location' => 'shared-with-me',
|
||||
'name' => 'Shared With Me',
|
||||
'name' => 'Shared with Me',
|
||||
'folders' => [],
|
||||
'isMovable' => false,
|
||||
'isOpen' => false,
|
||||
|
||||
@@ -28,12 +28,12 @@ class AppUpgradeTest extends TestCase
|
||||
DB::table('language_translations')
|
||||
->insert([
|
||||
[
|
||||
'key' => 'activation.stripe.button',
|
||||
'value' => 'Set up your Stripe account',
|
||||
'key' => 'type',
|
||||
'value' => 'Type',
|
||||
'lang' => $locale,
|
||||
], [
|
||||
'key' => 'activation.stripe.description',
|
||||
'value' => 'This is original test description',
|
||||
'key' => 'cancel',
|
||||
'value' => 'Cancel',
|
||||
'lang' => $locale,
|
||||
],
|
||||
]);
|
||||
@@ -47,20 +47,14 @@ class AppUpgradeTest extends TestCase
|
||||
collect(['en', 'sk'])
|
||||
->map(function ($locale) {
|
||||
$this->assertDatabaseHas('language_translations', [
|
||||
'key' => 'activation.stripe.title',
|
||||
'value' => 'Your Stripe account is not set',
|
||||
'key' => 'close',
|
||||
'value' => 'Close',
|
||||
'lang' => $locale,
|
||||
]);
|
||||
|
||||
$this->assertDatabaseHas('language_translations', [
|
||||
'key' => 'activation.stripe.description',
|
||||
'value' => 'This is original test description',
|
||||
'lang' => $locale,
|
||||
]);
|
||||
|
||||
$this->assertDatabaseMissing('language_translations', [
|
||||
'key' => 'activation.stripe.description',
|
||||
'value' => 'To charge your users, please set up your Stripe account credentials.',
|
||||
'key' => 'create_folder',
|
||||
'value' => 'Create folder',
|
||||
'lang' => $locale,
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -72,12 +72,12 @@ class SchedulerTest extends TestCase
|
||||
->assertDatabaseHas('usages', [
|
||||
'metered_feature_id' => $plan->meteredFeatures()->get()[0]->id,
|
||||
'subscription_id' => $subscription->id,
|
||||
'quantity' => 125,
|
||||
'quantity' => 0.125,
|
||||
])
|
||||
->assertDatabaseHas('usages', [
|
||||
'metered_feature_id' => $plan->meteredFeatures()->get()[1]->id,
|
||||
'subscription_id' => $subscription->id,
|
||||
'quantity' => 410,
|
||||
'quantity' => 0.410,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user