diff options
author | vantezzen <hello@vantezzen.io> | 2019-09-30 10:41:20 +0200 |
---|---|---|
committer | vantezzen <hello@vantezzen.io> | 2019-09-30 10:41:20 +0200 |
commit | b65b3344163248feb316047ad9b70120db84e396 (patch) | |
tree | e87b0c0a0c87f35d420af8bfb2d9bb163b613712 /src/components/settings | |
parent | Fix termsBase generation (diff) | |
download | ferdium-app-b65b3344163248feb316047ad9b70120db84e396.tar.gz ferdium-app-b65b3344163248feb316047ad9b70120db84e396.tar.zst ferdium-app-b65b3344163248feb316047ad9b70120db84e396.zip |
Add texts in settings to i18n
Diffstat (limited to 'src/components/settings')
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.js | 56 |
1 files changed, 32 insertions, 24 deletions
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index 6552220f1..1d2383125 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js | |||
@@ -13,6 +13,15 @@ import Input from '../../ui/Input'; | |||
13 | 13 | ||
14 | import { FRANZ_TRANSLATION } from '../../../config'; | 14 | import { FRANZ_TRANSLATION } from '../../../config'; |
15 | 15 | ||
16 | function escapeHtml(unsafe) { | ||
17 | return unsafe | ||
18 | .replace(/&/g, '&') | ||
19 | .replace(/</g, '<') | ||
20 | .replace(/>/g, '>') | ||
21 | .replace(/"/g, '"') | ||
22 | .replace(/'/g, '''); | ||
23 | } | ||
24 | |||
16 | const messages = defineMessages({ | 25 | const messages = defineMessages({ |
17 | headline: { | 26 | headline: { |
18 | id: 'settings.app.headline', | 27 | id: 'settings.app.headline', |
@@ -26,6 +35,10 @@ const messages = defineMessages({ | |||
26 | id: 'settings.app.serverInfo', | 35 | id: 'settings.app.serverInfo', |
27 | defaultMessage: '!!!We advice you to logout after changing your server as your settings might not be saved otherwise.', | 36 | defaultMessage: '!!!We advice you to logout after changing your server as your settings might not be saved otherwise.', |
28 | }, | 37 | }, |
38 | serverMoneyInfo: { | ||
39 | id: 'settings.app.serverMoneyInfo', | ||
40 | defaultMessage: '!!!You are using the official Franz Server for Ferdi.\nWe know that Ferdi allows you to use all its features for free but you are still using Franz\'s server resources - which Franz\'s creator has to pay for.\nPlease still consider [Link 1]paying for a Franz account[/Link] or [Link 2]using a self-hosted ferdi-server[/Link] (if you have the knowledge and resources to do so). \nBy using Ferdi, you still profit greatly from Franz\'s recipe store, server resources and its development.', | ||
41 | }, | ||
29 | todoServerInfo: { | 42 | todoServerInfo: { |
30 | id: 'settings.app.todoServerInfo', | 43 | id: 'settings.app.todoServerInfo', |
31 | defaultMessage: '!!!This server will be used for the "Franz Todo" feature. (default: https://app.franztodos.com)', | 44 | defaultMessage: '!!!This server will be used for the "Franz Todo" feature. (default: https://app.franztodos.com)', |
@@ -38,6 +51,10 @@ const messages = defineMessages({ | |||
38 | id: 'settings.app.lockedPasswordInfo', | 51 | id: 'settings.app.lockedPasswordInfo', |
39 | defaultMessage: '!!!Please make sure to set a password you\'ll remember.\nIf you loose this password, you will have to reinstall Ferdi.', | 52 | defaultMessage: '!!!Please make sure to set a password you\'ll remember.\nIf you loose this password, you will have to reinstall Ferdi.', |
40 | }, | 53 | }, |
54 | lockInfo: { | ||
55 | id: 'settings.app.lockInfo', | ||
56 | defaultMessage: '!!!Ferdi password lock allows you to keep your messages protected.\nUsing Ferdi password lock, you will be prompted to enter your password everytime you start Ferdi or lock Ferdi yourself using the lock symbol in the bottom left corner or the shortcut CMD/CTRL+Shift+L.', | ||
57 | }, | ||
41 | scheduledDNDTimeInfo: { | 58 | scheduledDNDTimeInfo: { |
42 | id: 'settings.app.scheduledDNDTimeInfo', | 59 | id: 'settings.app.scheduledDNDTimeInfo', |
43 | defaultMessage: '!!!Times in 24-Hour-Format. End time can be before start time (e.g. start 17:00, end 09:00) to enable Do-not-Disturb overnight.', | 60 | defaultMessage: '!!!Times in 24-Hour-Format. End time can be before start time (e.g. start 17:00, end 09:00) to enable Do-not-Disturb overnight.', |
@@ -218,24 +235,20 @@ export default @observer class EditSettingsForm extends Component { | |||
218 | borderTop: 0, marginTop: 0, paddingTop: 0, marginBottom: '2rem', | 235 | borderTop: 0, marginTop: 0, paddingTop: 0, marginBottom: '2rem', |
219 | }} | 236 | }} |
220 | > | 237 | > |
221 | <span> | 238 | <span |
222 | You are using the official Franz Server for Ferdi. | 239 | dangerouslySetInnerHTML={{ |
223 | <br /> | 240 | __html: |
224 | We know that Ferdi allows you to use all its features for free but you are | 241 | // Needed to make links work |
225 | still using Franz's server resources - which Franz's creator has to pay for. | 242 | escapeHtml( |
226 | <br /> | 243 | intl.formatMessage(messages.serverMoneyInfo), |
227 | Please still consider | 244 | ).replace('[Link 1]', '<a href="https://www.meetfranz.com/pricing" target="_blank">') |
228 | {' '} | 245 | .replace('[Link 2]', '<a href="https://github.com/getferdi/server" target="_blank">') |
229 | <a href="https://www.meetfranz.com/pricing" target="_blank">paying for a Franz account</a> | 246 | .replace(/\[\/Link]/g, '</a>'), |
230 | {' '} | 247 | }} |
231 | or | 248 | style={{ |
232 | {' '} | 249 | whiteSpace: 'pre-wrap', |
233 | <a href="https://github.com/getferdi/server" target="_blank">using a self-hosted ferdi-server</a> | 250 | }} |
234 | {' '} | 251 | /> |
235 | (if you have the knowledge and resources to do so). | ||
236 | <br /> | ||
237 | By using Ferdi, you still profit greatly from Franz's recipe store, server resources and its development. | ||
238 | </span> | ||
239 | </p> | 252 | </p> |
240 | )} | 253 | )} |
241 | {isWorkspaceEnabled && ( | 254 | {isWorkspaceEnabled && ( |
@@ -276,12 +289,7 @@ export default @observer class EditSettingsForm extends Component { | |||
276 | }} | 289 | }} |
277 | > | 290 | > |
278 | <span> | 291 | <span> |
279 | Ferdi password lock allows you to keep your messages protected. | 292 | { intl.formatMessage(messages.lockInfo) } |
280 | <br /> | ||
281 | Using Ferdi password lock, you will be prompted to enter your password everytime you | ||
282 | start Ferdi or lock Ferdi yourself using the lock symbol in the bottom left corner or the shortcut | ||
283 | {' '} | ||
284 | <code>CMD/CTRL+Shift+L</code> | ||
285 | </span> | 293 | </span> |
286 | </p> | 294 | </p> |
287 | 295 | ||