diff --git a/README.md b/README.md index 8f05c2e8562564229d6eafa1e21e1f54b905a370..ce546e7bbec0f905d11eb48a577d329393a41984 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,9 @@ Navigate to **Settings > Writing** in your WordPress Dashboard, and look for the ## Changelog ## +### 1.4.3 ### +* Fix translations in block editor. + ### 1.4.2 ### * Fix notice appearing on Widgets Block Editor. @@ -61,6 +64,10 @@ Navigate to **Settings > Writing** in your WordPress Dashboard, and look for the ## Upgrade Notice ## +### 1.4.3 ### + +Fixes translations in block editor. + ### 1.4.2 ### Fixes notice appearing on Widgets Block Editor. diff --git a/inc/class-block-editor.php b/inc/class-block-editor.php index f2d5f938693f0a0fadc694350590dbc06148f2db..f35c51adafbe161c8cd71d743bb330bf2e896dc6 100644 --- a/inc/class-block-editor.php +++ b/inc/class-block-editor.php @@ -175,5 +175,11 @@ class Block_Editor { 'metaKey' => WP_REVISIONS_CONTROL_LIMIT_META_KEY, ) ); + + wp_set_script_translations( + $handle, + 'wp-revisions-control', + dirname( __DIR__ ) . '/languages' + ); } } diff --git a/languages/wp-revisions-control.pot b/languages/wp-revisions-control.pot index fa1a05e5948c7ac9fa353e5f40bb43c86c7a3320..8e08ee119d41f2befdc93cbeb20ae9fb339b281a 100644 --- a/languages/wp-revisions-control.pot +++ b/languages/wp-revisions-control.pot @@ -2,10 +2,10 @@ # This file is distributed under the same license as the WP Revisions Control package. msgid "" msgstr "" -"Project-Id-Version: WP Revisions Control 1.4.2\n" +"Project-Id-Version: WP Revisions Control 1.4.3\n" "Report-Msgid-Bugs-To: " "https://wordpress.org/support/plugin/wp-revisions-control\n" -"POT-Creation-Date: 2022-06-11 19:34:09+00:00\n" +"POT-Creation-Date: 2022-06-25 15:40:24+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/package.json b/package.json index c359039157c5731c064eea672c660f84c186c402..bd60f6747b123856eb5e43419dca2ebe423311bb 100755 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "packages-update": "wp-scripts packages-update", "plugin-zip": "wp-scripts plugin-zip", "start": "wp-scripts start", - "test": "npm run test:e2e && npm run test:unit" + "test": "npm run test:e2e && npm run test:unit", "test:e2e": "wp-scripts test-e2e --passWithNoTests", "test:unit": "wp-scripts test-unit-js --passWithNoTests" } diff --git a/readme.txt b/readme.txt index 27a30cf32859330c3092de5dad4feb0f37771339..4395a5c7716fcf7a07a6d19d0f22097191034a58 100644 --- a/readme.txt +++ b/readme.txt @@ -35,6 +35,9 @@ Navigate to **Settings > Writing** in your WordPress Dashboard, and look for the == Changelog == += 1.4.3 = +* Fix translations in block editor. + = 1.4.2 = * Fix notice appearing on Widgets Block Editor. @@ -61,6 +64,10 @@ Navigate to **Settings > Writing** in your WordPress Dashboard, and look for the == Upgrade Notice == += 1.4.3 = + +Fixes translations in block editor. + = 1.4.2 = Fixes notice appearing on Widgets Block Editor. diff --git a/wp-revisions-control.php b/wp-revisions-control.php index 272d2bf053879d93485c98a5ab56a62d5897022c..3060a0aace5f03acd80e2f9841e465537184653b 100644 --- a/wp-revisions-control.php +++ b/wp-revisions-control.php @@ -4,7 +4,7 @@ * Plugin URI: https://ethitter.com/plugins/wp-revisions-control/ * Description: Control how many revisions are stored for each post type * Author: Erick Hitter - * Version: 1.4.2 + * Version: 1.4.3 * Author URI: https://ethitter.com/ * Text Domain: wp-revisions-control * Domain Path: /languages/