react-i18next 11.16.1 → 11.16.2
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 +4 -0
- package/icu.macro.js +14 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/icu.macro.js
CHANGED
|
@@ -262,9 +262,20 @@ function buildTransElement(
|
|
|
262
262
|
|
|
263
263
|
// add generated Trans attributes
|
|
264
264
|
if (!attributeExistsAlready('defaults', finalAttributes))
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
265
|
+
if (extracted.defaults.includes(`"`)) {
|
|
266
|
+
// wrap defaults that contain double quotes in brackets
|
|
267
|
+
finalAttributes.push(
|
|
268
|
+
t.jSXAttribute(
|
|
269
|
+
t.jSXIdentifier('defaults'),
|
|
270
|
+
t.jSXExpressionContainer(t.StringLiteral(extracted.defaults)),
|
|
271
|
+
),
|
|
272
|
+
);
|
|
273
|
+
} else {
|
|
274
|
+
finalAttributes.push(
|
|
275
|
+
t.jSXAttribute(t.jSXIdentifier('defaults'), t.StringLiteral(extracted.defaults)),
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
|
|
268
279
|
if (!attributeExistsAlready('components', finalAttributes))
|
|
269
280
|
finalAttributes.push(
|
|
270
281
|
t.jSXAttribute(t.jSXIdentifier('components'), t.jSXExpressionContainer(extracted.components)),
|