From 537697a6e9757f118d09d9e76362ba1ff617e2c6 Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Mon, 13 Sep 2021 14:45:46 +0200 Subject: chore: upgrade intl dependencies (#1920) --- .../settings/supportFerdi/SupportFerdiDashboard.js | 141 +++++++++++++++------ 1 file changed, 103 insertions(+), 38 deletions(-) (limited to 'src/components/settings/supportFerdi') diff --git a/src/components/settings/supportFerdi/SupportFerdiDashboard.js b/src/components/settings/supportFerdi/SupportFerdiDashboard.js index b84e06739..c4d4bd72f 100644 --- a/src/components/settings/supportFerdi/SupportFerdiDashboard.js +++ b/src/components/settings/supportFerdi/SupportFerdiDashboard.js @@ -1,76 +1,77 @@ import React, { Component } from 'react'; -import { defineMessages, FormattedHTMLMessage, intlShape } from 'react-intl'; +import { defineMessages, injectIntl } from 'react-intl'; import { BrowserWindow } from '@electron/remote'; import InfoBar from '../../ui/InfoBar'; const messages = defineMessages({ headline: { id: 'settings.supportFerdi.headline', - defaultMessage: '!!!About Ferdi', + defaultMessage: 'About Ferdi', }, title: { id: 'settings.supportFerdi.title', - defaultMessage: '!!!Do you like Ferdi?', + defaultMessage: 'Do you like Ferdi?', }, aboutIntro: { id: 'settings.supportFerdi.aboutIntro', - defaultMessage: '!!!

Ferdi is an open-source and a community-lead application.

Thanks to the people who make this possbile:

', + defaultMessage: + '

Ferdi is an open-source and a community-lead application.

Thanks to the people who make this possbile:

', }, textListContributors: { id: 'settings.supportFerdi.textListContributors', - defaultMessage: '!!!Full list of contributor', + defaultMessage: 'Full list of contributor', }, textListContributorsHere: { id: 'settings.supportFerdi.textListContributorsHere', - defaultMessage: '!!!here', + defaultMessage: 'here', }, textVolunteers: { id: 'settings.supportFerdi.textVolunteers', - defaultMessage: '!!!The development of Ferdi is done by volunteers. People who use Ferdi like you. They maintain, fix, and improve Ferdi in their spare time.', + defaultMessage: + 'The development of Ferdi is done by volunteers. People who use Ferdi like you. They maintain, fix, and improve Ferdi in their spare time.', }, textSupportWelcome: { id: 'settings.supportFerdi.textSupportWelcome', - defaultMessage: '!!!Support is always welcome. You can find a list of the help we need', + defaultMessage: + 'Support is always welcome. You can find a list of the help we need', }, textSupportWelcomeHere: { id: 'settings.supportFerdi.textSupportWelcomeHere', - defaultMessage: '!!!here', + defaultMessage: 'here', }, textExpenses: { id: 'settings.supportFerdi.textExpenses', - defaultMessage: '!!!While volunteers do most of the work, we still need to pay for servers and certificates. As a community, we are fully transparent on funds we collect and spend - see our', + defaultMessage: + 'While volunteers do most of the work, we still need to pay for servers and certificates. As a community, we are fully transparent on funds we collect and spend - see our', }, textOpenCollective: { id: 'settings.supportFerdi.textOpenCollective', - defaultMessage: '!!!Open Collective', + defaultMessage: 'Open Collective', }, textDonation: { id: 'settings.supportFerdi.textDonation', - defaultMessage: '!!!If you feel like supporting Ferdi development with a donation, you can do so on both,', + defaultMessage: + 'If you feel like supporting Ferdi development with a donation, you can do so on both,', }, textDonationAnd: { id: 'settings.supportFerdi.textDonationAnd', - defaultMessage: '!!!and', + defaultMessage: 'and', }, textGitHubSponsors: { id: 'settings.supportFerdi.textGitHubSponsors', - defaultMessage: '!!!GitHub Sponsors', + defaultMessage: 'GitHub Sponsors', }, openSurvey: { id: 'settings.supportFerdi.openSurvey', - defaultMessage: '!!!Open Survey', + defaultMessage: 'Open Survey', }, bannerText: { id: 'settings.supportFerdi.bannerText', - defaultMessage: '!!!Do you want to help us improve Ferdi?', + defaultMessage: 'Do you want to help us improve Ferdi?', }, }); class SupportFerdiDashboard extends Component { - static contextTypes = { - intl: intlShape, - }; - openSurveyWindow() { let win = new BrowserWindow({ width: 670, height: 400 }); win.on('closed', () => { @@ -81,7 +82,9 @@ class SupportFerdiDashboard extends Component { } render() { - const { intl } = this.context; + const { intl } = this.props; + + const aboutIntro = intl.formatMessage(messages.aboutIntro); return (
@@ -94,22 +97,67 @@ class SupportFerdiDashboard extends Component {

{intl.formatMessage(messages.title)}

- GitHub Stars - Twitter Follow - Open Collective backers - Open Collective sponsors + + GitHub Stars + + + Twitter Follow + + + Open Collective backers + + + Open Collective sponsors +

- +

- GitHub contributors (non-exhaustive) + GitHub contributors (non-exhaustive)

{intl.formatMessage(messages.textListContributors)} - + {' '} {intl.formatMessage(messages.textListContributorsHere)} @@ -117,12 +165,15 @@ class SupportFerdiDashboard extends Component {

-

- {intl.formatMessage(messages.textVolunteers)} -

+

{intl.formatMessage(messages.textVolunteers)}

{intl.formatMessage(messages.textSupportWelcome)} - + {' '} {intl.formatMessage(messages.textSupportWelcomeHere)} @@ -130,7 +181,12 @@ class SupportFerdiDashboard extends Component {

{intl.formatMessage(messages.textExpenses)} - + {' '} {intl.formatMessage(messages.textOpenCollective)} @@ -138,14 +194,23 @@ class SupportFerdiDashboard extends Component {

{intl.formatMessage(messages.textDonation)} - + {' '} {intl.formatMessage(messages.textOpenCollective)} - - {' '} + {' '} {intl.formatMessage(messages.textDonationAnd)} - + {' '} {intl.formatMessage(messages.textGitHubSponsors)} @@ -166,4 +231,4 @@ class SupportFerdiDashboard extends Component { } } -export default SupportFerdiDashboard; +export default injectIntl(SupportFerdiDashboard); -- cgit v1.2.3-70-g09d2