From 0fc609a0f837cb5d6672336d410080f7e9df50f8 Mon Sep 17 00:00:00 2001
From: Grzegorz Rola <grzegorz.rola@flexibleshipping.com>
Date: Tue, 22 Apr 2025 16:05:21 +0200
Subject: [PATCH] bugfix(translations): text domain

---
 CHANGELOG.md                     | 4 ++++
 composer.json                    | 2 +-
 src/RatingPetitionNotice.php     | 8 ++++----
 src/TextPetitionDisplayer.php    | 2 +-
 src/views/html-text-petition.php | 2 +-
 5 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index ee680ad..10472af 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## [1.6.3] - 2025-04-22
+### Fixed
+- text domain
+
 ## [1.6.2] - 2023-04-05
 ### Fixed
 - bottom margin
diff --git a/composer.json b/composer.json
index 2c29e7f..45f1985 100644
--- a/composer.json
+++ b/composer.json
@@ -30,7 +30,7 @@
         "classmap": ["tests/"]
     },
     "extra": {
-        "text-domain": "wpdesk-rating-petition",
+        "text-domain": "wp-wpdesk-rating-petition",
         "translations-folder": "lang",
         "po-files": {
             "pl_PL": "pl_PL.po",
diff --git a/src/RatingPetitionNotice.php b/src/RatingPetitionNotice.php
index e78fc0c..b80a8c8 100644
--- a/src/RatingPetitionNotice.php
+++ b/src/RatingPetitionNotice.php
@@ -166,7 +166,7 @@ class RatingPetitionNotice implements Hookable {
 	 */
 	private function get_notice_content() {
 		// Translators: plugin name.
-		$content  = sprintf( __( 'Awesome, you\'ve been using %s for more than 2 weeks. Could you please do me a BIG favor and give it a 5-star rating on WordPress? ~ Peter', 'wpdesk-rating-petition' ), $this->plugin_name );
+		$content  = sprintf( __( 'Awesome, you\'ve been using %s for more than 2 weeks. Could you please do me a BIG favor and give it a 5-star rating on WordPress? ~ Peter', 'wp-wpdesk-rating-petition' ), $this->plugin_name );
 		$content .= '<br/>';
 		$content .= implode( ' | ', $this->action_links() );
 
@@ -181,19 +181,19 @@ class RatingPetitionNotice implements Hookable {
 	protected function action_links() {
 		$actions[] = sprintf( // phpcs:ignore
 			// Translators: link.
-			__( '%1$sOk, you deserved it%2$s', 'wpdesk-rating-petition' ),
+			__( '%1$sOk, you deserved it%2$s', 'wp-wpdesk-rating-petition' ),
 			'<a class="fs-response-deserved" target="_blank" href="' . esc_url( $this->rate_url ) . '">',
 			'</a>'
 		);
 		$actions[] = sprintf(
 			// Translators: link.
-			__( '%1$sNope, maybe later%2$s', 'wpdesk-rating-petition' ),
+			__( '%1$sNope, maybe later%2$s', 'wp-wpdesk-rating-petition' ),
 			'<a class="fs-response-close-temporary-notice notice-dismiss-link" data-source="' . self::CLOSE_TEMPORARY_NOTICE . '" href="#">',
 			'</a>'
 		);
 		$actions[] = sprintf(
 			// Translators: link.
-			__( '%1$sI already did%2$s', 'wpdesk-rating-petition' ),
+			__( '%1$sI already did%2$s', 'wp-wpdesk-rating-petition' ),
 			'<a class="fs-response-already-did notice-dismiss-link" data-source="already-did" href="#">',
 			'</a>'
 		);
diff --git a/src/TextPetitionDisplayer.php b/src/TextPetitionDisplayer.php
index 258f3aa..233d68a 100644
--- a/src/TextPetitionDisplayer.php
+++ b/src/TextPetitionDisplayer.php
@@ -48,7 +48,7 @@ class TextPetitionDisplayer implements Hookable {
 	 */
 	public function enqueue_css_if_should() {
 		if ( $this->display_decision->should_display() ) {
-			wp_enqueue_style( 'wpdesk-rating-petition', plugin_dir_url( __DIR__ . '/../assets/css/style.css' ) . 'style.css', array(), self::SCRIPTS_VERSION );
+			wp_enqueue_style( 'wp-wpdesk-rating-petition', plugin_dir_url( __DIR__ . '/../assets/css/style.css' ) . 'style.css', array(), self::SCRIPTS_VERSION );
 		}
 	}
 
diff --git a/src/views/html-text-petition.php b/src/views/html-text-petition.php
index c176d09..663ebb4 100644
--- a/src/views/html-text-petition.php
+++ b/src/views/html-text-petition.php
@@ -8,7 +8,7 @@
 ?><div class="wpdesk-rating-petition" style="text-align: <?php echo esc_attr( $text_align ); ?>;">
 	<?php echo wp_kses_post(
         sprintf(
-            __( 'Created with %1$s by %2$s - If you like %3$s you can %4$srate us %5$s in plugins repository &rarr;%6$s', 'wpdesk-rating-petition' ),
+            __( 'Created with %1$s by %2$s - If you like %3$s you can %4$srate us %5$s in plugins repository &rarr;%6$s', 'wp-wpdesk-rating-petition' ),
             '<span class="heart">&hearts;</span>',
             $plugin_author,
             '<span class="plugin-title">' . $plugin_title . '</span>',
-- 
GitLab