Skip to content

Commit

Permalink
Fix i18n for plugins (#126)
Browse files Browse the repository at this point in the history
* Fix i18n for JS translation strings

* Add changelog
  • Loading branch information
irshadahmad21 authored Jul 6, 2024
1 parent 1029031 commit 69a8e23
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .changeset/calm-socks-cheer.md
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions .changeset/soft-islands-watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wpsocio/wp-utils": patch
---

Fixed JED format for translation strings
2 changes: 1 addition & 1 deletion packages/php/wp-utils/src/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 69a8e23

Please sign in to comment.