@contentful/field-editor-boolean 1.8.4 → 1.9.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.
@@ -11,6 +11,7 @@ Object.defineProperty(exports, "BooleanEditor", {
11
11
  const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
12
12
  const _f36components = require("@contentful/f36-components");
13
13
  const _fieldeditorshared = require("@contentful/field-editor-shared");
14
+ const _core = require("@lingui/core");
14
15
  const _get = /*#__PURE__*/ _interop_require_default(require("lodash/get"));
15
16
  const _nanoid = require("nanoid");
16
17
  function _interop_require_default(obj) {
@@ -67,7 +68,10 @@ function BooleanEditor(props) {
67
68
  label: (0, _get.default)(props.parameters, [
68
69
  'instance',
69
70
  'trueLabel'
70
- ], 'Yes'),
71
+ ], _core.i18n._({
72
+ id: "FieldEditors.Boolean.BooleanEditor.TrueDefaultLabel",
73
+ message: "Yes"
74
+ })),
71
75
  id: (0, _nanoid.nanoid)(6)
72
76
  },
73
77
  {
@@ -75,7 +79,10 @@ function BooleanEditor(props) {
75
79
  label: (0, _get.default)(props.parameters, [
76
80
  'instance',
77
81
  'falseLabel'
78
- ], 'No'),
82
+ ], _core.i18n._({
83
+ id: "FieldEditors.Boolean.BooleanEditor.FalseDefaultLabel",
84
+ message: "No"
85
+ })),
79
86
  id: (0, _nanoid.nanoid)(6)
80
87
  }
81
88
  ];
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { TextLink, Flex, Radio } from '@contentful/f36-components';
3
3
  import { FieldConnector } from '@contentful/field-editor-shared';
4
+ import { i18n as $_i18n } from "@lingui/core";
4
5
  import get from 'lodash/get';
5
6
  import { nanoid } from 'nanoid';
6
7
  export function BooleanEditor(props) {
@@ -11,7 +12,10 @@ export function BooleanEditor(props) {
11
12
  label: get(props.parameters, [
12
13
  'instance',
13
14
  'trueLabel'
14
- ], 'Yes'),
15
+ ], $_i18n._({
16
+ id: "FieldEditors.Boolean.BooleanEditor.TrueDefaultLabel",
17
+ message: "Yes"
18
+ })),
15
19
  id: nanoid(6)
16
20
  },
17
21
  {
@@ -19,7 +23,10 @@ export function BooleanEditor(props) {
19
23
  label: get(props.parameters, [
20
24
  'instance',
21
25
  'falseLabel'
22
- ], 'No'),
26
+ ], $_i18n._({
27
+ id: "FieldEditors.Boolean.BooleanEditor.FalseDefaultLabel",
28
+ message: "No"
29
+ })),
23
30
  id: nanoid(6)
24
31
  }
25
32
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-boolean",
3
- "version": "1.8.4",
3
+ "version": "1.9.0",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -52,5 +52,5 @@
52
52
  "publishConfig": {
53
53
  "registry": "https://npm.pkg.github.com/"
54
54
  },
55
- "gitHead": "51e565419e82705b2e2db20e136f50c497f1e8e0"
55
+ "gitHead": "04669d85cc7ccf736ba797f90a602c3ecc173225"
56
56
  }