From a118ddd4e88f0f003050d2ef41429a8e6bc5e774 Mon Sep 17 00:00:00 2001 From: Irshad Ahmad Date: Sat, 6 Jul 2024 19:25:36 +0530 Subject: [PATCH 1/2] Fix i18n for JS translation strings --- packages/php/wp-utils/src/Helpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/php/wp-utils/src/Helpers.php b/packages/php/wp-utils/src/Helpers.php index 9926344c..4ef09cf6 100644 --- a/packages/php/wp-utils/src/Helpers.php +++ b/packages/php/wp-utils/src/Helpers.php @@ -207,7 +207,7 @@ public static function get_jed_locale_data( $domain ) { } foreach ( $translations->entries as $msgid => $entry ) { - $locale[ $msgid ] = $entry->translations; + $locale[ is_int( $msgid ) ? $entry->singular : $msgid ] = $entry->translations; } return $locale; From a8f3dac3f99e202fb9408f057705c311ccd5966d Mon Sep 17 00:00:00 2001 From: Irshad Ahmad Date: Sat, 6 Jul 2024 19:29:52 +0530 Subject: [PATCH 2/2] Add changelog --- .changeset/calm-socks-cheer.md | 9 +++++++++ .changeset/soft-islands-watch.md | 5 +++++ 2 files changed, 14 insertions(+) create mode 100644 .changeset/calm-socks-cheer.md create mode 100644 .changeset/soft-islands-watch.md diff --git a/.changeset/calm-socks-cheer.md b/.changeset/calm-socks-cheer.md new file mode 100644 index 00000000..99e3cb02 --- /dev/null +++ b/.changeset/calm-socks-cheer.md @@ -0,0 +1,9 @@ +--- +"wptelegram": patch +"wptelegram-comments": patch +"wptelegram-login": patch +"wptelegram-widget": patch +"wptelegram-pro": patch +--- + +Fixed translations not working for settings page diff --git a/.changeset/soft-islands-watch.md b/.changeset/soft-islands-watch.md new file mode 100644 index 00000000..d948da68 --- /dev/null +++ b/.changeset/soft-islands-watch.md @@ -0,0 +1,5 @@ +--- +"@wpsocio/wp-utils": patch +--- + +Fixed JED format for translation strings