@wordpress/i18n 4.20.0 → 4.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 4.21.0 (2022-11-02)
6
+
5
7
  ## 4.20.0 (2022-10-19)
6
8
 
7
9
  ## 4.19.0 (2022-10-05)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/i18n",
3
- "version": "4.20.0",
3
+ "version": "4.21.0",
4
4
  "description": "WordPress internationalization (i18n) library.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@babel/runtime": "^7.16.0",
33
- "@wordpress/hooks": "^3.20.0",
33
+ "@wordpress/hooks": "^3.21.0",
34
34
  "gettext-parser": "^1.3.1",
35
35
  "memize": "^1.1.0",
36
36
  "sprintf-js": "^1.1.1",
@@ -39,5 +39,5 @@
39
39
  "publishConfig": {
40
40
  "access": "public"
41
41
  },
42
- "gitHead": "a2ff0e6471c88436dad0287beb88d1729aa6f5dd"
42
+ "gitHead": "511f4cc1f0138641bc4394bc1cf36e833109c791"
43
43
  }
@@ -44,7 +44,7 @@ function convertTranslationToPHP( translation, textdomain, context = '' ) {
44
44
 
45
45
  // The format of gettext-js matches the terminology in gettext itself.
46
46
  let original = translation.msgid;
47
- const comments = translation.comments;
47
+ const comments = translation.comments ?? {};
48
48
 
49
49
  if ( Object.values( comments ).length ) {
50
50
  if ( comments.reference ) {