diff options
author | 2019-03-05 16:31:48 +0100 | |
---|---|---|
committer | 2019-03-05 16:31:48 +0100 | |
commit | 8745cd1b8250c370b1681f0728116150c72a4279 (patch) | |
tree | 643051f45a55ac048f45f253544a37d466185fd6 /src/features | |
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/features')
-rw-r--r-- | src/features/shareFranz/Component.js | 52 |
1 files changed, 24 insertions, 28 deletions
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'); |