diff --git a/packages/strapi-admin/admin/src/components/UpgradePlanModal/components/Arrow/Img.js b/packages/strapi-admin/admin/src/components/UpgradePlanModal/components/Arrow/Img.js deleted file mode 100644 index 56a26d5d09..0000000000 --- a/packages/strapi-admin/admin/src/components/UpgradePlanModal/components/Arrow/Img.js +++ /dev/null @@ -1,9 +0,0 @@ -import styled from 'styled-components'; - -const Img = styled.img` - position: absolute; - top: 20px; - right: 195px; -`; - -export default Img; diff --git a/packages/strapi-admin/admin/src/components/UpgradePlanModal/components/Download/index.js b/packages/strapi-admin/admin/src/components/UpgradePlanModal/components/Download/index.js new file mode 100644 index 0000000000..1a214925f4 --- /dev/null +++ b/packages/strapi-admin/admin/src/components/UpgradePlanModal/components/Download/index.js @@ -0,0 +1,13 @@ +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import styled from 'styled-components'; + +const Download = styled(FontAwesomeIcon)` + margin-left: 10px; + transform: rotate(-45deg); +`; + +Download.defaultProps = { + icon: 'arrow-right', +}; + +export default Download; diff --git a/packages/strapi-admin/admin/src/components/UpgradePlanModal/components/Option/index.js b/packages/strapi-admin/admin/src/components/UpgradePlanModal/components/Option/index.js index 5612c61f41..41c2ce0409 100644 --- a/packages/strapi-admin/admin/src/components/UpgradePlanModal/components/Option/index.js +++ b/packages/strapi-admin/admin/src/components/UpgradePlanModal/components/Option/index.js @@ -1,12 +1,15 @@ import React from 'react'; import { Text } from '@buffetjs/core'; +import { useIntl } from 'react-intl'; import Wrapper from './Wrapper'; const Option = () => { + const { formatMessage } = useIntl(); + return ( - Community Edition + {formatMessage({ id: 'app.components.UpgradePlanModal.text-ce' })} ); diff --git a/packages/strapi-admin/admin/src/components/UpgradePlanModal/components/index.js b/packages/strapi-admin/admin/src/components/UpgradePlanModal/components/index.js new file mode 100644 index 0000000000..ca839250ae --- /dev/null +++ b/packages/strapi-admin/admin/src/components/UpgradePlanModal/components/index.js @@ -0,0 +1,4 @@ +export { default as Arrow } from './Arrow'; +export { default as Download } from './Download'; +export { default as Option } from './Option'; +export { default as Wrapper } from './Wrapper'; diff --git a/packages/strapi-admin/admin/src/components/UpgradePlanModal/index.js b/packages/strapi-admin/admin/src/components/UpgradePlanModal/index.js index eb6fbcc5d4..b85ec3311d 100644 --- a/packages/strapi-admin/admin/src/components/UpgradePlanModal/index.js +++ b/packages/strapi-admin/admin/src/components/UpgradePlanModal/index.js @@ -4,13 +4,12 @@ import React, { useRef } from 'react'; import PropTypes from 'prop-types'; import { Button, Padded, Text } from '@buffetjs/core'; import { Modal } from 'strapi-helper-plugin'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import Arrow from './components/Arrow'; -import Option from './components/Option'; -import Wrapper from './components/Wrapper'; +import { useIntl } from 'react-intl'; +import { Arrow, Download, Option, Wrapper } from './components'; const UpgradePlanModal = ({ isOpen, onToggle }) => { const ref = useRef(); + const { formatMessage } = useIntl(); const handleClick = () => { ref.current.click(); @@ -24,29 +23,29 @@ const UpgradePlanModal = ({ isOpen, onToggle }) => { - You have reached the limit + {formatMessage({ id: 'app.components.UpgradePlanModal.limit-reached' })} - + - Unlock the full power + {formatMessage({ id: 'app.components.UpgradePlanModal.text-power' })}   - of Strapi by upgrading your plan to the + {formatMessage({ id: 'app.components.UpgradePlanModal.text-strapi' })} -   +
- Entreprise Edition + {formatMessage({ id: 'app.components.UpgradePlanModal.text-ee' })}
diff --git a/packages/strapi-admin/admin/src/translations/en.json b/packages/strapi-admin/admin/src/translations/en.json index 93de46239a..4af6e14ed4 100644 --- a/packages/strapi-admin/admin/src/translations/en.json +++ b/packages/strapi-admin/admin/src/translations/en.json @@ -355,5 +355,11 @@ "Roles.RoleRow.user-count.plural": "{number} users", "Roles.RoleRow.user-count.singular": "{number} user", "Roles.components.List.empty.withSearch": "There is no role corresponding to the search ({search})...", - "Settings.PageTitle": "Settings - {name}" + "Settings.PageTitle": "Settings - {name}", + "app.components.UpgradePlanModal.limit-reached": "You have reached the limit", + "app.components.UpgradePlanModal.text-power": "Unlock the full power", + "app.components.UpgradePlanModal.text-strapi": "of Strapi by upgrading your plan to the", + "app.components.UpgradePlanModal.text-ee": "Entreprise Edition", + "app.components.UpgradePlanModal.text-ce": "Community Edition", + "app.components.UpgradePlanModal.button": "LEARN MORE" }