fix(admin): translate asset notification type labels

Register Chinese labels and matching badge tones for balance and points
increase/decrease types across message filters, list badges and details.
Add regression coverage without changing notification delivery behavior.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Fable 5 committed 2026-10-30 17:36:42 +08:00
1 parent fe3ef82718
commit 1902ba1e87
3 files changed
+26 -3

No files matched your search

+6 -2
View File
@@ -38,6 +38,10 @@ final class MessageTypes {
'ticket_reply' => __('工单回复', 'aksrt'),
'ticket_urge' => __('工单催单', 'aksrt'),
'ticket_closed' => __('工单关闭', 'aksrt'),
'asset_balance_increase' => __('余额增加', 'aksrt'),
'asset_balance_decrease' => __('余额减少', 'aksrt'),
'asset_points_increase' => __('积分增加', 'aksrt'),
'asset_points_decrease' => __('积分减少', 'aksrt'),
];
}
@@ -50,10 +54,10 @@ final class MessageTypes {
if (str_starts_with($type, 'ticket_')) {
return 'info';
}
if (in_array($type, ['report', 'ban_appeal'], true)) {
if (in_array($type, ['report', 'ban_appeal', 'asset_balance_decrease', 'asset_points_decrease'], true)) {
return 'danger';
}
if (in_array($type, ['withdraw', 'level_up', 'medal', 'auth_apply_reply', 'download_ready'], true)) {
if (in_array($type, ['withdraw', 'level_up', 'medal', 'auth_apply_reply', 'download_ready', 'asset_balance_increase', 'asset_points_increase'], true)) {
return 'success';
}
if (in_array($type, ['system', 'notice'], true)) {