Skip to content

Commit

Permalink
refactor(Alerts): update wording
Browse files Browse the repository at this point in the history
  • Loading branch information
harunbleech committed Mar 5, 2024
1 parent db25f68 commit ed6738a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
7 changes: 5 additions & 2 deletions components/alerts-page/views/alerts-page-edit.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<div class="wrap vrts_edit_alert_page">
<h1 class="wp-heading-inline">
<?php esc_html_e( 'Edit Alert', 'visual-regression-tests' ); ?>
<?php echo esc_attr( $data['alert']->title ); ?>
<?php
// phpcs:ignore Squiz.Commenting.FileComment.WrongStyle -- It's not file comment
/* translators: %s: the alert title. */
echo esc_html( sprintf( __( 'View Alert %s', 'visual-regression-tests' ), $data['alert']->title ) );
?>
</h1>
<hr class="wp-header-end">

Expand Down
7 changes: 5 additions & 2 deletions components/alerts-page/views/alerts-page-view.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<div class="wrap vrts_edit_alert_page">
<h1 class="wp-heading-inline">
<?php esc_html_e( 'View Alert', 'visual-regression-tests' ); ?>
<?php echo esc_attr( $data['alert']->title ); ?>
<?php
// phpcs:ignore Squiz.Commenting.FileComment.WrongStyle -- It's not file comment
/* translators: %s: the alert title. */
echo esc_html( sprintf( __( 'View Alert %s', 'visual-regression-tests' ), $data['alert']->title ) );
?>
</h1>
<hr class="wp-header-end">

Expand Down
6 changes: 3 additions & 3 deletions includes/list-tables/class-alerts-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public function get_bulk_actions() {
} else {
// Actions Status "Open".
$actions = [
'set-status-resolved' => esc_html__( 'Resolve', 'visual-regression-tests' ),
'set-status-resolved' => esc_html__( 'Archive', 'visual-regression-tests' ),
];
}
return $actions;
Expand Down Expand Up @@ -329,12 +329,12 @@ public function get_views() {

$links = [
'all' => [
'title' => esc_html__( 'Open', 'visual-regression-tests' ),
'title' => esc_html__( 'New', 'visual-regression-tests' ),
'link' => $base_link,
'count' => Alert::get_total_items(),
],
'resolved' => [
'title' => esc_html__( 'Resolved', 'visual-regression-tests' ),
'title' => esc_html__( 'Viewed', 'visual-regression-tests' ),
'link' => "{$base_link}&status=resolved",
'count' => Alert::get_total_items( 'resolved' ),
],
Expand Down

0 comments on commit ed6738a

Please sign in to comment.