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 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;