переход на новый php, функция восстановления пароля, подтверждение по email, локализация на английский
This commit is contained in:
@@ -27,14 +27,14 @@ class BalanceController extends Controller
|
||||
|
||||
return [
|
||||
'id' => $transaction->id,
|
||||
'username' => $transaction->username ?: 'Аккаунт удалён',
|
||||
'username' => $transaction->username ?: __('Аккаунт удалён'),
|
||||
'account_id' => $transaction->account_id,
|
||||
'created_at' => $transaction->created_at?->format('d.m.Y H:i:s'),
|
||||
'created_at' => \App\Support\LocaleFormatting::date($transaction->created_at, true),
|
||||
'type_label' => match ($transaction->type) {
|
||||
'deposit' => 'Пополнение',
|
||||
'spend' => 'Покупка в игре',
|
||||
'admin_credit' => 'Начисление администратором',
|
||||
'admin_debit' => 'Списание администратором',
|
||||
'deposit' => __('Пополнение'),
|
||||
'spend' => __('Покупка в игре'),
|
||||
'admin_credit' => __('Начисление администратором'),
|
||||
'admin_debit' => __('Списание администратором'),
|
||||
default => $transaction->type,
|
||||
},
|
||||
'description' => $metadata['reason'] ?? $metadata['description'] ?? $transaction->reference,
|
||||
@@ -43,9 +43,9 @@ class BalanceController extends Controller
|
||||
'account_id' => $metadata['admin_account_id'],
|
||||
] : null,
|
||||
'amount' => (string) $transaction->amount,
|
||||
'formatted_amount' => number_format((float) $transaction->amount, 2, ',', ' '),
|
||||
'formatted_amount' => \App\Support\LocaleFormatting::number((float) $transaction->amount, 2),
|
||||
'is_positive' => (float) $transaction->amount >= 0,
|
||||
'formatted_balance_after' => number_format((float) $transaction->balance_after, 2, ',', ' '),
|
||||
'formatted_balance_after' => \App\Support\LocaleFormatting::number((float) $transaction->balance_after, 2),
|
||||
];
|
||||
})
|
||||
->values()
|
||||
@@ -76,7 +76,7 @@ class BalanceController extends Controller
|
||||
: $accounts->findUserByUsername($accountInput);
|
||||
|
||||
if (! $account) {
|
||||
return back()->withInput()->withErrors(['account' => 'Игровой аккаунт не найден.']);
|
||||
return back()->withInput()->withErrors(['account' => __('Игровой аккаунт не найден.')]);
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -93,9 +93,9 @@ class BalanceController extends Controller
|
||||
}
|
||||
|
||||
return back()->with('status', sprintf(
|
||||
'Счёт %s изменён. Теперь на нём %s Слёз Элуны.',
|
||||
__('Счёт %s изменён. Теперь на нём %s Слёз Элуны.'),
|
||||
$account->username,
|
||||
number_format((float) $transaction->balance_after, 2, ',', ' '),
|
||||
\App\Support\LocaleFormatting::number((float) $transaction->balance_after, 2),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user