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

View File

@@ -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'],
]);

View File

@@ -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 [

View File

@@ -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');

View File

@@ -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');
}
}

View File

@@ -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]),
];
}
}