From 579994e318be6bdabc2e94481e7178fdbecc3afd Mon Sep 17 00:00:00 2001 From: Aristeides Stathopoulos Date: Mon, 22 Jan 2024 11:49:31 +0200 Subject: [PATCH] Change textdomain --- .phpcs.xml.dist | 2 +- admin/admin.php | 24 ++++---- admin/views/comment-parent-box.php | 2 +- admin/views/config-page.php | 96 +++++++++++++++--------------- inc/clean-emails.php | 42 ++++++------- inc/email-links.php | 4 +- inc/forms.php | 2 +- inc/hacks.php | 20 +++---- inc/length.php | 2 +- package.json | 2 +- readme.txt | 2 +- yoast-comment-hacks.php | 2 +- 12 files changed, 100 insertions(+), 100 deletions(-) diff --git a/.phpcs.xml.dist b/.phpcs.xml.dist index 29e6e4c..e045110 100644 --- a/.phpcs.xml.dist +++ b/.phpcs.xml.dist @@ -65,7 +65,7 @@ - + diff --git a/admin/admin.php b/admin/admin.php index c7e8e96..a436f02 100644 --- a/admin/admin.php +++ b/admin/admin.php @@ -74,7 +74,7 @@ public function show_forward_status( $comment_text, $comment ): string { $ch_forwarded = \get_comment_meta( $comment->comment_ID, 'ch_forwarded' ); if ( $ch_forwarded ) { /* translators: %s is replaced by the name you're forwarding to. */ - $pre = '

' . \sprintf( \esc_html__( 'This comment was forwarded to %s.', 'yoast-comment-hacks' ), \esc_html( $this->options['forward_name'] ) ) . '

'; + $pre = '

' . \sprintf( \esc_html__( 'This comment was forwarded to %s.', 'comment-hacks' ), \esc_html( $this->options['forward_name'] ) ) . '

'; $comment_text = $pre . $comment_text; } @@ -100,7 +100,7 @@ public function forward_comment(): void { $comment = \get_comment( $comment_id ); /* translators: %1$s is replaced by (a link to) the blog's name, %2$s by (a link to) the title of the blogpost. */ - echo '

' . \sprintf( \esc_html__( 'Forwarding comment from %1$s to %2$s.', 'yoast-comment-hacks' ), '' . \esc_html( $comment->comment_author ) . '', \esc_html( $this->options['forward_name'] ) ) . '

'; + echo '

' . \sprintf( \esc_html__( 'Forwarding comment from %1$s to %2$s.', 'comment-hacks' ), '' . \esc_html( $comment->comment_author ) . '', \esc_html( $this->options['forward_name'] ) ) . '

'; $intro = \sprintf( 'This comment was forwarded from %s where it was left on: %s.', '' . \esc_html( \get_bloginfo( 'name' ) ) . '', '' . \get_the_title( $comment->comment_post_ID ) . '' ) . "\n\n"; @@ -111,7 +111,7 @@ public function forward_comment(): void { $intro .= '---------- Forwarded message --------- From: ' . \esc_html( $comment->comment_author ) . ' <' . \esc_html( $comment->comment_author_email ) . '> Date: ' . \gmdate( 'D, M j, Y \a\t h:i A', \strtotime( $comment->comment_date ) ) . ' -Subject: ' . \esc_html__( 'Comment on', 'yoast-comment-hacks' ) . ' ' . \esc_html( \get_bloginfo( 'name' ) ) . ' +Subject: ' . \esc_html__( 'Comment on', 'comment-hacks' ) . ' ' . \esc_html( \get_bloginfo( 'name' ) ) . ' To: ' . \esc_html( \get_bloginfo( 'name' ) ) . ' <' . \esc_html( $this->options['forward_from_email'] ) . '>'; $intro .= "\n\n"; @@ -142,11 +142,11 @@ public function forward_to_support_action_link( $actions, $comment ): array { return $actions; } - $label = \esc_html__( 'Forward to support', 'yoast-comment-hacks' ); + $label = \esc_html__( 'Forward to support', 'comment-hacks' ); // '1' === approved, 'trash' === trashed. if ( $comment->comment_approved !== '1' && $comment->comment_approved !== 'trash' ) { - $label = \esc_html__( 'Forward to support & trash', 'yoast-comment-hacks' ); + $label = \esc_html__( 'Forward to support & trash', 'comment-hacks' ); } $actions['ch_forward'] = '' . $label . ''; @@ -160,7 +160,7 @@ public function forward_to_support_action_link( $actions, $comment ): array { public function register_meta_boxes(): void { \add_meta_box( 'comment-hacks-reroute', - \__( 'Comment Hacks', 'yoast-comment-hacks' ), + \__( 'Comment Hacks', 'comment-hacks' ), [ $this, 'meta_box_callback', @@ -177,7 +177,7 @@ public function register_meta_boxes(): void { */ public function meta_box_callback( $post ): void { echo ''; - echo '
'; + echo '
'; /** * This filter allows filtering which roles should be shown in the dropdown for notifications. @@ -325,7 +325,7 @@ public function options_validate( array $input ): array { if ( ( $this->absolute_min + 1 ) > $input['mincomlength'] || empty( $input['mincomlength'] ) ) { /* translators: %d is replaced with the minimum number of characters */ - \add_settings_error( $this->hook, 'min_length_invalid', \sprintf( \__( 'The minimum length you entered is invalid, please enter a minimum length above %d.', 'yoast-comment-hacks' ), $this->absolute_min ) ); + \add_settings_error( $this->hook, 'min_length_invalid', \sprintf( \__( 'The minimum length you entered is invalid, please enter a minimum length above %d.', 'comment-hacks' ), $this->absolute_min ) ); $input['mincomlength'] = 15; } @@ -369,8 +369,8 @@ private function sanitize_string( $value, $default ) { */ public function add_config_page() { \add_options_page( - \__( 'Comment Hacks', 'yoast-comment-hacks' ), - \__( 'Comment Hacks', 'yoast-comment-hacks' ), + \__( 'Comment Hacks', 'comment-hacks' ), + \__( 'Comment Hacks', 'comment-hacks' ), 'manage_options', $this->hook, [ @@ -394,7 +394,7 @@ public function filter_plugin_actions( $links, $file ): array { } if ( $file === $this_plugin ) { - $settings_link = '' . \__( 'Settings', 'yoast-comment-hacks' ) . ''; + $settings_link = '' . \__( 'Settings', 'comment-hacks' ) . ''; // Put our link before other links. \array_unshift( $links, $settings_link ); } @@ -410,7 +410,7 @@ public function config_page(): void { // Show the content of the options array when debug is enabled. if ( \defined( 'WP_DEBUG' ) && \WP_DEBUG ) { - echo '

', \esc_html__( 'Options debug', 'yoast-comment-hacks' ), '

'; + echo '

', \esc_html__( 'Options debug', 'comment-hacks' ), '

'; echo '
'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Debug output. echo \str_replace( diff --git a/admin/views/comment-parent-box.php b/admin/views/comment-parent-box.php index b79401d..788b760 100644 --- a/admin/views/comment-parent-box.php +++ b/admin/views/comment-parent-box.php @@ -7,7 +7,7 @@
- +
diff --git a/admin/views/config-page.php b/admin/views/config-page.php index 1e4418f..605e6dc 100644 --- a/admin/views/config-page.php +++ b/admin/views/config-page.php @@ -8,35 +8,35 @@ $yoast_comment_option_name = Hacks::$option_name; ?>
-

+

-

+

-

+

- @@ -48,7 +48,7 @@
- + @@ -144,18 +144,18 @@