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:
1 parent
fe3ef82718
commit
1902ba1e87
3 files changed
+26
-3
No files matched your search
@@ -84,7 +84,7 @@ namespace {
|
||||
public function get_var($sql) { return 2; }
|
||||
public function get_results($sql, $format) { return []; }
|
||||
public function get_row($sql, $format) { return ['total' => 2, 'unread' => 1, 'today' => 1, 'recipients' => 2]; }
|
||||
public function get_col($sql) { return ['system']; }
|
||||
public function get_col($sql) { return ['system', 'asset_balance_increase', 'asset_balance_decrease', 'asset_points_increase', 'asset_points_decrease']; }
|
||||
public function query($sql) { $this->queries[] = $sql; return 1; }
|
||||
public function esc_like($text) { return addcslashes($text, '_%\\'); }
|
||||
}
|
||||
@@ -120,6 +120,10 @@ namespace {
|
||||
$out['table'] = $probe->html('render_message_table', [$row, array_merge($row, ['id' => 9, 'is_read' => 1, 'read_at' => '2026-10-30 03:30:00'])], $filters, 3, false);
|
||||
$out['empty'] = $probe->html('render_message_table', [], $filters, 1, false);
|
||||
$out['cache_calls'] = $GLOBALS['cache_calls'];
|
||||
$out['asset_table'] = $probe->html('render_message_table', [array_merge($row, ['type' => 'asset_balance_increase'])], $filters, 1, false);
|
||||
foreach (['asset_balance_increase', 'asset_balance_decrease', 'asset_points_increase', 'asset_points_decrease'] as $type) {
|
||||
$out['asset_types'][$type] = [\AKSRT\Messages\MessageTypes::label($type), \AKSRT\Messages\MessageTypes::tone($type)];
|
||||
}
|
||||
|
||||
$wpdb->prepared = [];
|
||||
\AKSRT\Messages\NotificationAdminQuery::paginate($out['query_filters'], 1);
|
||||
|
||||
Reference in new issue
Block a user