From eee5906c351198871f1f5a9e882051e2ce5e6468 Mon Sep 17 00:00:00 2001
From: Rami Yushuvaev
Date: Sat, 26 Apr 2025 21:33:11 +0300
Subject: [PATCH 1/2] Merge similar translations strings
---
src/js/components/SnippetForm/page/UpgradeDialog.tsx | 4 ++--
src/php/admin-menus/class-manage-menu.php | 2 +-
src/php/admin-menus/class-welcome-menu.php | 2 +-
src/php/class-validator.php | 2 +-
src/php/cloud/list-table-shared-ops.php | 5 ++---
src/php/strings.php | 2 +-
src/php/views/welcome.php | 4 ++--
7 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/src/js/components/SnippetForm/page/UpgradeDialog.tsx b/src/js/components/SnippetForm/page/UpgradeDialog.tsx
index e8fc8a97..02b7e95c 100644
--- a/src/js/components/SnippetForm/page/UpgradeDialog.tsx
+++ b/src/js/components/SnippetForm/page/UpgradeDialog.tsx
@@ -100,14 +100,14 @@ const UpgradeInfo: React.FC = ({ nextTab }) =>
className="button button-secondary"
href="https://codesnippets.pro/pricing/"
>
- {__('Learn More', 'code-snippets')}
+ {__('Learn more', 'code-snippets')}
diff --git a/src/php/admin-menus/class-manage-menu.php b/src/php/admin-menus/class-manage-menu.php
index 846747c5..4e90b8b2 100644
--- a/src/php/admin-menus/class-manage-menu.php
+++ b/src/php/admin-menus/class-manage-menu.php
@@ -229,7 +229,7 @@ protected function get_current_type(): string {
*/
public function print_pro_message() {
if ( ! code_snippets()->licensing->is_licensed() ) {
- echo '', esc_html_x( 'Pro', 'go pro badge', 'code-snippets' ), '';
+ echo '', esc_html__( 'Pro', 'code-snippets' ), '';
}
}
diff --git a/src/php/admin-menus/class-welcome-menu.php b/src/php/admin-menus/class-welcome-menu.php
index fbebe04b..ceb816ac 100644
--- a/src/php/admin-menus/class-welcome-menu.php
+++ b/src/php/admin-menus/class-welcome-menu.php
@@ -79,7 +79,7 @@ protected function get_header_links(): array {
$links['pro'] = [
'url' => 'https://codesnippets.pro/pricing/',
'icon' => 'cart',
- 'label' => __( 'Get Pro', 'code-snippets' ),
+ 'label' => __( 'Upgrade to Pro', 'code-snippets' ),
];
}
diff --git a/src/php/class-validator.php b/src/php/class-validator.php
index ac98131b..27effb43 100644
--- a/src/php/class-validator.php
+++ b/src/php/class-validator.php
@@ -255,7 +255,7 @@ public function validate() {
// If we did not make it out of the class, then there's a problem.
if ( $depth > 0 ) {
return array(
- 'message' => __( 'Parse error: syntax error, unexpected end of snippet', 'code-snippets' ),
+ 'message' => __( 'Parse error: syntax error, unexpected end of snippet.', 'code-snippets' ),
'line' => $token[2],
);
}
diff --git a/src/php/cloud/list-table-shared-ops.php b/src/php/cloud/list-table-shared-ops.php
index b8e3f95e..2623f979 100644
--- a/src/php/cloud/list-table-shared-ops.php
+++ b/src/php/cloud/list-table-shared-ops.php
@@ -115,11 +115,10 @@ function cloud_lts_build_action_links( Cloud_Snippet $cloud_snippet, string $sou
esc_html__( 'Download', 'code-snippets' )
) :
sprintf(
- '%s%s',
+ '%s',
$additional_classes,
'https://codesnippets.pro/pricing/',
- esc_html_x( 'Pro', 'pro only', 'code-snippets' ),
- esc_html_x( ' Only', 'pro only', 'code-snippets' )
+ __( 'Pro Only', 'code-snippets' ),
);
}
diff --git a/src/php/strings.php b/src/php/strings.php
index 4f94ea0a..6839784c 100644
--- a/src/php/strings.php
+++ b/src/php/strings.php
@@ -10,7 +10,7 @@
__( 'Success', 'code-snippets' );
__( 'Notice', 'code-snippets' );
__( 'Thanks', 'code-snippets' );
-__( 'Okay', 'code-snippets' );
+__( 'Ok', 'code-snippets' );
// settings-fields.php.
__( 'Minify Snippet Output', 'code-snippets' );
diff --git a/src/php/views/welcome.php b/src/php/views/welcome.php
index fc8e100c..c3dce427 100644
--- a/src/php/views/welcome.php
+++ b/src/php/views/welcome.php
@@ -40,8 +40,8 @@
];
$plugin_types = [
- 'core' => _x( 'Core', 'badge label', 'code-snippets' ),
- 'pro' => _x( 'Pro', 'badge label', 'code-snippets' ),
+ 'core' => __( 'Core', 'code-snippets' ),
+ 'pro' => __( 'Pro', 'code-snippets' ),
];
?>
From 844a79a3d63da1e68da84e680d32742a46190ad8 Mon Sep 17 00:00:00 2001
From: Rami Yushuvaev
Date: Sun, 27 Apr 2025 23:18:04 +0300
Subject: [PATCH 2/2] Merge similar translations strings Fixes
---
src/php/class-admin.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/php/class-admin.php b/src/php/class-admin.php
index 503819f6..cc4f77ec 100644
--- a/src/php/class-admin.php
+++ b/src/php/class-admin.php
@@ -128,7 +128,7 @@ public function plugin_action_links( array $actions, string $plugin_file ): arra
'%3$s',
'https://snipco.de/JE2i',
esc_attr__( 'Upgrade to Code Snippets Pro', 'code-snippets' ),
- esc_html__( 'Go Pro', 'code-snippets' )
+ esc_html__( 'Get Pro', 'code-snippets' )
);
}
return $actions;