diff --git a/locale/messages.pot b/locale/messages.pot index 55e0c788c..4b7ebac16 100644 --- a/locale/messages.pot +++ b/locale/messages.pot @@ -1,6 +1,6 @@ msgid "" msgstr "" -"POT-Creation-Date: 2019-08-16T11:48:21.991Z\n" +"POT-Creation-Date: 2019-08-16T13:04:24.401Z\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "MIME-Version: 1.0\n" @@ -23,6 +23,14 @@ msgctxt "add attribute value" msgid "Add Value" msgstr "" +#: build/locale/src/attributes/components/AttributeListPage/AttributeListPage.json +#. [attributeListPageAddAttribute] - button +#. defaultMessage is: +#. Add attribute +msgctxt "button" +msgid "Add attribute" +msgstr "" + #: build/locale/src/attributes/components/AttributeValues/AttributeValues.json #. [attributeValuesAddButton] - add attribute value button #. defaultMessage is: @@ -239,14 +247,6 @@ msgctxt "attribute name" msgid "Name" msgstr "" -#: build/locale/src/attributes/components/AttributeListPage/AttributeListPage.json -#. [attributeListPageNewAttribute] - button -#. defaultMessage is: -#. New attribute -msgctxt "button" -msgid "New attribute" -msgstr "" - #: build/locale/src/attributes/components/AttributeList/AttributeList.json #. [AttributeListNoAttributes] - no attributes found with present filters #. defaultMessage is: diff --git a/src/attributes/components/AttributeDetails/AttributeDetails.tsx b/src/attributes/components/AttributeDetails/AttributeDetails.tsx index a2ab264a4..1d9e4e3e3 100644 --- a/src/attributes/components/AttributeDetails/AttributeDetails.tsx +++ b/src/attributes/components/AttributeDetails/AttributeDetails.tsx @@ -2,7 +2,7 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import TextField from "@material-ui/core/TextField"; import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; +import { useIntl } from "react-intl"; import slugify from "slugify"; import CardTitle from "@saleor/components/CardTitle"; diff --git a/src/attributes/components/AttributeListPage/AttributeListPage.tsx b/src/attributes/components/AttributeListPage/AttributeListPage.tsx index 94f561400..d84255c97 100644 --- a/src/attributes/components/AttributeListPage/AttributeListPage.tsx +++ b/src/attributes/components/AttributeListPage/AttributeListPage.tsx @@ -28,9 +28,9 @@ const AttributeListPage: React.FC = ({ > diff --git a/src/components/Locale/Locale.tsx b/src/components/Locale/Locale.tsx index 93abbfad5..5025e71d9 100644 --- a/src/components/Locale/Locale.tsx +++ b/src/components/Locale/Locale.tsx @@ -6,9 +6,9 @@ import urlJoin from "url-join"; export type LocaleContextType = string; export const LocaleContext = React.createContext("en"); -const { Consumer: LocaleConsumer, Provider } = LocaleContext; +const { Consumer: LocaleConsumer, Provider: RawLocaleProvider } = LocaleContext; -const LocaleProvider = ({ children }) => { +const LocaleProvider: React.FC = ({ children }) => { const [localeIndex, setLocaleIndex] = React.useState(0); const [messages, setMessages] = React.useState({}); @@ -34,9 +34,9 @@ const LocaleProvider = ({ children }) => { return ( - {children} + {children} ); }; -export { LocaleConsumer, LocaleProvider }; +export { LocaleConsumer, LocaleProvider, RawLocaleProvider }; diff --git a/src/storybook/Decorator.tsx b/src/storybook/Decorator.tsx index 8a2c7863c..c82b0b336 100644 --- a/src/storybook/Decorator.tsx +++ b/src/storybook/Decorator.tsx @@ -1,28 +1,31 @@ import React from "react"; +import { IntlProvider } from "react-intl"; -import { LocaleProvider } from "@saleor/components/Locale"; +import { RawLocaleProvider } from "@saleor/components/Locale"; import { Provider as DateProvider } from "../components/Date/DateContext"; import { MessageManager } from "../components/messages"; import ThemeProvider from "../components/Theme"; import { TimezoneProvider } from "../components/Timezone"; export const Decorator = storyFn => ( - - - - - -
- {storyFn()} -
-
-
-
-
-
+ + + + + + +
+ {storyFn()} +
+
+
+
+
+
+
); export default Decorator; diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index 609c36f13..fa8e5c314 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -6427,7 +6427,7 @@ exports[`Storyshots Views / Attributes / Attribute details create 1`] = ` - General Information + General Informations
- General Information + General Informations
- General Information + General Informations
- General Information + General Informations
- General Information + General Informations
- General Information + General Informations
- Add attribute + Add attribute