You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/macro/test/jsx-plural.ts
+13-4Lines changed: 13 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,10 @@ export default [
12
12
`,
13
13
expected: `
14
14
import { Trans } from "@lingui/react";
15
-
<Trans id="{count, plural, offset:1 =0 {Zero items} few {{count} items} other {<0>A lot of them</0>}}" values={{
15
+
<Trans id={
16
+
"{count, plural, offset:1 =0 {Zero items} few {{count} items} other {<0>A lot of them</0>}}"
17
+
}
18
+
values={{
16
19
count: count
17
20
}} components={{
18
21
0: <a href="/more" />
@@ -38,7 +41,10 @@ export default [
38
41
`,
39
42
expected: `
40
43
import { Trans } from "@lingui/react";
41
-
<Trans id="{count, plural, one {<0>#</0> slot added} other {<1>#</1> slots added}}" values={{
44
+
<Trans id={
45
+
"{count, plural, one {<0>#</0> slot added} other {<1>#</1> slots added}}"
46
+
}
47
+
values={{
42
48
count: count
43
49
}} components={{
44
50
0: <strong />,
@@ -61,7 +67,7 @@ export default [
61
67
`,
62
68
expected: `
63
69
import { Trans } from "@lingui/react";
64
-
<Trans render="strong" id="msg.plural" message="{count, plural, offset:1 =0 {Zero items} few {{count} items} other {<0>A lot of them</0>}}" values={{
70
+
<Trans render="strong" id="msg.plural" message={"{count, plural, offset:1 =0 {Zero items} few {{count} items} other {<0>A lot of them</0>}}"} values={{
65
71
count: count
66
72
}} components={{
67
73
0: <a href="/more" />
@@ -84,7 +90,10 @@ export default [
84
90
`,
85
91
expected: `
86
92
import { Trans } from "@lingui/react";
87
-
<Trans id="inner-id-removed" message="Looking for {0, plural, offset:1 =0 {zero items} few {{1} items {2}} other {<0>a lot of them</0>}}" values={{
93
+
<Trans id="inner-id-removed" message={
94
+
"Looking for {0, plural, offset:1 =0 {zero items} few {{1} items {2}} other {<0>a lot of them</0>}}"
0 commit comments