diff options
author | 2019-03-05 16:31:48 +0100 | |
---|---|---|
committer | 2019-03-05 16:31:48 +0100 | |
commit | 8745cd1b8250c370b1681f0728116150c72a4279 (patch) | |
tree | 643051f45a55ac048f45f253544a37d466185fd6 /src | |
parent | Merge branch 'develop' of https://github.com/meetfranz/franz into develop (diff) | |
download | ferdium-app-8745cd1b8250c370b1681f0728116150c72a4279.tar.gz ferdium-app-8745cd1b8250c370b1681f0728116150c72a4279.tar.zst ferdium-app-8745cd1b8250c370b1681f0728116150c72a4279.zip |
setup react-intl translations managing script
Diffstat (limited to 'src')
-rw-r--r-- | src/components/subscription/SubscriptionForm.js | 60 | ||||
-rw-r--r-- | src/containers/settings/EditUserScreen.js | 44 | ||||
-rw-r--r-- | src/features/shareFranz/Component.js | 52 |
3 files changed, 74 insertions, 82 deletions
diff --git a/src/components/subscription/SubscriptionForm.js b/src/components/subscription/SubscriptionForm.js index 90da8ddc3..7a818d100 100644 --- a/src/components/subscription/SubscriptionForm.js +++ b/src/components/subscription/SubscriptionForm.js | |||
@@ -35,31 +35,29 @@ const messages = defineMessages({ | |||
35 | id: 'subscription.includedFeatures', | 35 | id: 'subscription.includedFeatures', |
36 | defaultMessage: '!!!The Franz Premium Supporter Account includes', | 36 | defaultMessage: '!!!The Franz Premium Supporter Account includes', |
37 | }, | 37 | }, |
38 | features: { | 38 | onpremise: { |
39 | onpremise: { | 39 | id: 'subscription.features.onpremise.mattermost', |
40 | id: 'subscription.features.onpremise.mattermost', | 40 | defaultMessage: '!!!Add on-premise/hosted services like Mattermost', |
41 | defaultMessage: '!!!Add on-premise/hosted services like Mattermost', | 41 | }, |
42 | }, | 42 | noInterruptions: { |
43 | noInterruptions: { | 43 | id: 'subscription.features.noInterruptions', |
44 | id: 'subscription.features.noInterruptions', | 44 | defaultMessage: '!!!No app delays & nagging to upgrade license', |
45 | defaultMessage: '!!!No app delays & nagging to upgrade license', | 45 | }, |
46 | }, | 46 | proxy: { |
47 | proxy: { | 47 | id: 'subscription.features.proxy', |
48 | id: 'subscription.features.proxy', | 48 | defaultMessage: '!!!Proxy support for services', |
49 | defaultMessage: '!!!Proxy support for services', | 49 | }, |
50 | }, | 50 | spellchecker: { |
51 | spellchecker: { | 51 | id: 'subscription.features.spellchecker', |
52 | id: 'subscription.features.spellchecker', | 52 | defaultMessage: '!!!Support for Spellchecker', |
53 | defaultMessage: '!!!Support for Spellchecker', | 53 | }, |
54 | }, | 54 | ads: { |
55 | ads: { | 55 | id: 'subscription.features.ads', |
56 | id: 'subscription.features.ads', | 56 | defaultMessage: '!!!No ads, ever!', |
57 | defaultMessage: '!!!No ads, ever!', | 57 | }, |
58 | }, | 58 | comingSoon: { |
59 | comingSoon: { | 59 | id: 'subscription.features.comingSoon', |
60 | id: 'subscription.features.comingSoon', | 60 | defaultMessage: '!!!coming soon', |
61 | defaultMessage: '!!!coming soon', | ||
62 | }, | ||
63 | }, | 61 | }, |
64 | euTaxInfo: { | 62 | euTaxInfo: { |
65 | id: 'subscription.euTaxInfo', | 63 | id: 'subscription.euTaxInfo', |
@@ -85,7 +83,7 @@ export default @observer class SubscriptionForm extends Component { | |||
85 | showSkipOption: false, | 83 | showSkipOption: false, |
86 | skipAction: () => null, | 84 | skipAction: () => null, |
87 | skipButtonLabel: '', | 85 | skipButtonLabel: '', |
88 | } | 86 | }; |
89 | 87 | ||
90 | static contextTypes = { | 88 | static contextTypes = { |
91 | intl: intlShape, | 89 | intl: intlShape, |
@@ -162,18 +160,18 @@ export default @observer class SubscriptionForm extends Component { | |||
162 | </p> | 160 | </p> |
163 | <div className="subscription"> | 161 | <div className="subscription"> |
164 | <ul className="subscription__premium-features"> | 162 | <ul className="subscription__premium-features"> |
165 | <li>{intl.formatMessage(messages.features.onpremise)}</li> | 163 | <li>{intl.formatMessage(messages.onpremise)}</li> |
166 | <li> | 164 | <li> |
167 | {intl.formatMessage(messages.features.noInterruptions)} | 165 | {intl.formatMessage(messages.noInterruptions)} |
168 | </li> | 166 | </li> |
169 | <li> | 167 | <li> |
170 | {intl.formatMessage(messages.features.spellchecker)} | 168 | {intl.formatMessage(messages.spellchecker)} |
171 | </li> | 169 | </li> |
172 | <li> | 170 | <li> |
173 | {intl.formatMessage(messages.features.proxy)} | 171 | {intl.formatMessage(messages.proxy)} |
174 | </li> | 172 | </li> |
175 | <li> | 173 | <li> |
176 | {intl.formatMessage(messages.features.ads)} | 174 | {intl.formatMessage(messages.ads)} |
177 | </li> | 175 | </li> |
178 | </ul> | 176 | </ul> |
179 | </div> | 177 | </div> |
diff --git a/src/containers/settings/EditUserScreen.js b/src/containers/settings/EditUserScreen.js index bade928a0..81f689400 100644 --- a/src/containers/settings/EditUserScreen.js +++ b/src/containers/settings/EditUserScreen.js | |||
@@ -23,23 +23,21 @@ const messages = defineMessages({ | |||
23 | id: 'settings.user.form.email', | 23 | id: 'settings.user.form.email', |
24 | defaultMessage: '!!!Email', | 24 | defaultMessage: '!!!Email', |
25 | }, | 25 | }, |
26 | accountType: { | 26 | accountTypeLabel: { |
27 | label: { | 27 | id: 'settings.user.form.accountType.label', |
28 | id: 'settings.user.form.accountType.label', | 28 | defaultMessage: '!!!Account type', |
29 | defaultMessage: '!!!Account type', | 29 | }, |
30 | }, | 30 | accountTypeIndividual: { |
31 | individual: { | 31 | id: 'settings.user.form.accountType.individual', |
32 | id: 'settings.user.form.accountType.individual', | 32 | defaultMessage: '!!!Individual', |
33 | defaultMessage: '!!!Individual', | 33 | }, |
34 | }, | 34 | accountTypeNonProfit: { |
35 | nonProfit: { | 35 | id: 'settings.user.form.accountType.non-profit', |
36 | id: 'settings.user.form.accountType.non-profit', | 36 | defaultMessage: '!!!Non-Profit', |
37 | defaultMessage: '!!!Non-Profit', | 37 | }, |
38 | }, | 38 | accountTypeCompany: { |
39 | company: { | 39 | id: 'settings.user.form.accountType.company', |
40 | id: 'settings.user.form.accountType.company', | 40 | defaultMessage: '!!!Company', |
41 | defaultMessage: '!!!Company', | ||
42 | }, | ||
43 | }, | 41 | }, |
44 | currentPassword: { | 42 | currentPassword: { |
45 | id: 'settings.user.form.currentPassword', | 43 | id: 'settings.user.form.currentPassword', |
@@ -94,21 +92,21 @@ export default @inject('stores', 'actions') @observer class EditUserScreen exten | |||
94 | accountType: { | 92 | accountType: { |
95 | value: user.accountType, | 93 | value: user.accountType, |
96 | validators: [required], | 94 | validators: [required], |
97 | label: intl.formatMessage(messages.accountType.label), | 95 | label: intl.formatMessage(messages.accountTypeLabel), |
98 | options: [{ | 96 | options: [{ |
99 | value: 'individual', | 97 | value: 'individual', |
100 | label: intl.formatMessage(messages.accountType.individual), | 98 | label: intl.formatMessage(messages.accountTypeIndividual), |
101 | }, { | 99 | }, { |
102 | value: 'non-profit', | 100 | value: 'non-profit', |
103 | label: intl.formatMessage(messages.accountType.nonProfit), | 101 | label: intl.formatMessage(messages.accountTypeNonProfit), |
104 | }, { | 102 | }, { |
105 | value: 'company', | 103 | value: 'company', |
106 | label: intl.formatMessage(messages.accountType.company), | 104 | label: intl.formatMessage(messages.accountTypeCompany), |
107 | }], | 105 | }], |
108 | }, | 106 | }, |
109 | organization: { | 107 | organization: { |
110 | label: intl.formatMessage(messages.accountType.company), | 108 | label: intl.formatMessage(messages.accountTypeCompany), |
111 | placeholder: intl.formatMessage(messages.accountType.company), | 109 | placeholder: intl.formatMessage(messages.accountTypeCompany), |
112 | value: user.organization, | 110 | value: user.organization, |
113 | }, | 111 | }, |
114 | oldPassword: { | 112 | oldPassword: { |
diff --git a/src/features/shareFranz/Component.js b/src/features/shareFranz/Component.js index d463664df..ef43a54fa 100644 --- a/src/features/shareFranz/Component.js +++ b/src/features/shareFranz/Component.js | |||
@@ -20,29 +20,25 @@ const messages = defineMessages({ | |||
20 | id: 'feature.shareFranz.text', | 20 | id: 'feature.shareFranz.text', |
21 | defaultMessage: '!!!Tell your friends and colleagues how awesome Franz is and help us to spread the word.', | 21 | defaultMessage: '!!!Tell your friends and colleagues how awesome Franz is and help us to spread the word.', |
22 | }, | 22 | }, |
23 | actions: { | 23 | actionsEmail: { |
24 | email: { | 24 | id: 'feature.shareFranz.action.email', |
25 | id: 'feature.shareFranz.action.email', | 25 | defaultMessage: '!!!Share as email', |
26 | defaultMessage: '!!!Share as email', | ||
27 | }, | ||
28 | facebook: { | ||
29 | id: 'feature.shareFranz.action.facebook', | ||
30 | defaultMessage: '!!!Share on Facebook', | ||
31 | }, | ||
32 | twitter: { | ||
33 | id: 'feature.shareFranz.action.twitter', | ||
34 | defaultMessage: '!!!Share on Twitter', | ||
35 | }, | ||
36 | }, | 26 | }, |
37 | shareText: { | 27 | actionsFacebook: { |
38 | email: { | 28 | id: 'feature.shareFranz.action.facebook', |
39 | id: 'feature.shareFranz.shareText.email', | 29 | defaultMessage: '!!!Share on Facebook', |
40 | defaultMessage: '!!! I\'ve added {count} services to Franz! Get the free app for WhatsApp, Messenger, Slack, Skype and co at www.meetfranz.com', | 30 | }, |
41 | }, | 31 | actionsTwitter: { |
42 | twitter: { | 32 | id: 'feature.shareFranz.action.twitter', |
43 | id: 'feature.shareFranz.shareText.twitter', | 33 | defaultMessage: '!!!Share on Twitter', |
44 | defaultMessage: '!!! I\'ve added {count} services to Franz! Get the free app for WhatsApp, Messenger, Slack, Skype and co at www.meetfranz.com /cc @MeetFranz', | 34 | }, |
45 | }, | 35 | shareTextEmail: { |
36 | id: 'feature.shareFranz.shareText.email', | ||
37 | defaultMessage: '!!! I\'ve added {count} services to Franz! Get the free app for WhatsApp, Messenger, Slack, Skype and co at www.meetfranz.com', | ||
38 | }, | ||
39 | shareTextTwitter: { | ||
40 | id: 'feature.shareFranz.shareText.twitter', | ||
41 | defaultMessage: '!!! I\'ve added {count} services to Franz! Get the free app for WhatsApp, Messenger, Slack, Skype and co at www.meetfranz.com /cc @MeetFranz', | ||
46 | }, | 42 | }, |
47 | }); | 43 | }); |
48 | 44 | ||
@@ -90,7 +86,7 @@ const styles = theme => ({ | |||
90 | export default @injectSheet(styles) @inject('stores') @observer class ShareFranzModal extends Component { | 86 | export default @injectSheet(styles) @inject('stores') @observer class ShareFranzModal extends Component { |
91 | static propTypes = { | 87 | static propTypes = { |
92 | classes: PropTypes.object.isRequired, | 88 | classes: PropTypes.object.isRequired, |
93 | } | 89 | }; |
94 | 90 | ||
95 | static contextTypes = { | 91 | static contextTypes = { |
96 | intl: intlShape, | 92 | intl: intlShape, |
@@ -128,17 +124,17 @@ export default @injectSheet(styles) @inject('stores') @observer class ShareFranz | |||
128 | <p>{intl.formatMessage(messages.text)}</p> | 124 | <p>{intl.formatMessage(messages.text)}</p> |
129 | <div className={classes.actions}> | 125 | <div className={classes.actions}> |
130 | <Button | 126 | <Button |
131 | label={intl.formatMessage(messages.actions.email)} | 127 | label={intl.formatMessage(messages.actionsEmail)} |
132 | className={classes.cta} | 128 | className={classes.cta} |
133 | icon="mdiEmail" | 129 | icon="mdiEmail" |
134 | href={`mailto:?subject=Meet the cool app Franz&body=${intl.formatMessage(messages.shareText.email, { count: serviceCount })}}`} | 130 | href={`mailto:?subject=Meet the cool app Franz&body=${intl.formatMessage(messages.shareTextEmail, { count: serviceCount })}}`} |
135 | target="_blank" | 131 | target="_blank" |
136 | onClick={() => { | 132 | onClick={() => { |
137 | gaEvent('Share Franz', 'share', 'Share via email'); | 133 | gaEvent('Share Franz', 'share', 'Share via email'); |
138 | }} | 134 | }} |
139 | /> | 135 | /> |
140 | <Button | 136 | <Button |
141 | label={intl.formatMessage(messages.actions.facebook)} | 137 | label={intl.formatMessage(messages.actionsFacebook)} |
142 | className={classes.cta} | 138 | className={classes.cta} |
143 | icon="mdiFacebookBox" | 139 | icon="mdiFacebookBox" |
144 | href="https://www.facebook.com/sharer/sharer.php?u=https://www.meetfranz.com?utm_source=facebook&utm_medium=referral&utm_campaign=share-button" | 140 | href="https://www.facebook.com/sharer/sharer.php?u=https://www.meetfranz.com?utm_source=facebook&utm_medium=referral&utm_campaign=share-button" |
@@ -148,10 +144,10 @@ export default @injectSheet(styles) @inject('stores') @observer class ShareFranz | |||
148 | }} | 144 | }} |
149 | /> | 145 | /> |
150 | <Button | 146 | <Button |
151 | label={intl.formatMessage(messages.actions.twitter)} | 147 | label={intl.formatMessage(messages.actionsTwitter)} |
152 | className={classes.cta} | 148 | className={classes.cta} |
153 | icon="mdiTwitter" | 149 | icon="mdiTwitter" |
154 | href={`http://twitter.com/intent/tweet?status=${intl.formatMessage(messages.shareText.twitter, { count: serviceCount })}`} | 150 | href={`http://twitter.com/intent/tweet?status=${intl.formatMessage(messages.shareTextTwitter, { count: serviceCount })}`} |
155 | target="_blank" | 151 | target="_blank" |
156 | onClick={() => { | 152 | onClick={() => { |
157 | gaEvent('Share Franz', 'share', 'Share via Twitter'); | 153 | gaEvent('Share Franz', 'share', 'Share via Twitter'); |