611 Use key prefix in about section and restructure tree in translation file

This commit is contained in:
Lisa Hillebrand
2022-09-12 10:34:04 +02:00
parent d3e5df2acf
commit 695286393d
2 changed files with 32 additions and 29 deletions
+12 -11
View File
@@ -11,11 +11,12 @@ import links from '../../i18n/en/links'
import { useTranslation } from 'react-i18next'
const AboutSection = () => {
const { t } = useTranslation()
const { t } = useTranslation(null, { keyPrefix: 'settings.about' })
return (
<AppPage title={t('settings.aboutSection.title')}>
<AppPage title={t('title')}>
<Segment>
<AppText>{t('settings.aboutSection.text')}</AppText>
<AppText>{t('intro.text')}</AppText>
<ButtonRow>
{[links.email, links.gitlab, links.website].map((link) => (
<Button
@@ -29,12 +30,12 @@ const AboutSection = () => {
))}
</ButtonRow>
</Segment>
<Segment title={t('settings.philosophy.title')}>
<AppText>{t('settings.philosophy.text')}</AppText>
<Segment title={t('philosophy.title')}>
<AppText>{t('philosophy.text')}</AppText>
</Segment>
<Segment title={t('settings.credits.title')}>
<Segment title={t('credits.title')}>
<AppText>
{t('settings.credits.note', {
{t('credits.text', {
smashicons: links.smashicons.url,
pause08: links.pause08.url,
kazachek: links.kazachek.url,
@@ -43,19 +44,19 @@ const AboutSection = () => {
})}
</AppText>
</Segment>
<Segment title={t('settings.donate.title')}>
<AppText>{t('settings.donate.note')}</AppText>
<Segment title={t('donate.title')}>
<AppText>{t('donate.text')}</AppText>
{Platform.OS !== 'ios' && (
<Button
isCTA
isSmall
onPress={() => Linking.openURL(links.donate.url)}
>
{t('settings.donate.text')}
{t('donate.button')}
</Button>
)}
</Segment>
<Segment title={t('settings.version.title')} last>
<Segment title={t('version.title')} last>
<AppText>{require('../../package.json').version}</AppText>
</Segment>
</AppPage>
+20 -18
View File
@@ -14,27 +14,32 @@
}
},
"settings": {
"aboutSection": {
"about": {
"credits": {
"title": "Credits",
"text": "We love the drip. team. Thanks and lots of <3 to all of our condriputors. Thanks to Paula Härtel for the symptom tracking icons. All the other icons are made by {{smashicons}}, {{pause08}}, {{kazachek}} & {{freepik}} from {{flaticon}}."
},
"donate": {
"button": "Donate here",
"title": "Support us",
"text": "The drips are developing this app on a volunteer basis. We are always grateful for support. This could mean condriputing to the code, giving feedback, suggesting improvements or features, testing or donating. It helps and motivates us maintaining this app and developing new features. Thank you for your support!"
},
"intro": {
"text": "Please note that your data is stored locally on your phone and not on a server. This means your data cannot be read by anyone else unless they have access to your phone. We want to ensure that you stay in control of your own data. If you are planning to switch or reset your phone, please remember to export your data before doing so. You can reinstall the app afterwards and import your data.\n\nIf you encounter any technical issues, don't hesitate to contact us via email. You can also contribute to the code base on Gitlab and visit our website."
},
"philosophy": {
"title": "Remember to think for yourself",
"text": "drip. makes period predictions for you and helps you apply NFP fertility awareness rules. But please remember that this app is made by humans, and humans make mistakes. Always think for yourself: \"Does this make sense?\" Remember, you don't need an app to understand your cycle! However, drip. wants to support you and make period tracking easier, more transparent and secure."
},
"title": "About",
"text": "Please note that your data is stored locally on your phone and not on a server. This means your data cannot be read by anyone else unless they have access to your phone. We want to ensure that you stay in control of your own data. If you are planning to switch or reset your phone, please remember to export your data before doing so. You can reinstall the app afterwards and import your data.\n\nIf you encounter any technical issues, don't hesitate to contact us via email. You can also contribute to the code base on Gitlab and visit our website."
},
"credits": {
"title": "Credits",
"note": "We love the drip. team. Thanks and lots of <3 to all of our condriputors. Thanks to Paula Härtel for the symptom tracking icons. All the other icons are made by {{smashicons}}, {{pause08}}, {{kazachek}} & {{freepik}} from {{flaticon}}."
},
"donate": {
"title": "Support us",
"note": "The drips are developing this app on a volunteer basis. We are always grateful for support. This could mean condriputing to the code, giving feedback, suggesting improvements or features, testing or donating. It helps and motivates us maintaining this app and developing new features. Thank you for your support!",
"text": "Donate here"
"version": {
"title": "Version"
}
},
"license": {
"title": "drip. an open-source cycle tracking app",
"text": "Copyright (C) {{currentYear}} Heart of Code e.V.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details: https://www.gnu.org/licenses/gpl-3.0.html."
},
"philosophy": {
"title": "Remember to think for yourself",
"text": "drip. makes period predictions for you and helps you apply NFP fertility awareness rules. But please remember that this app is made by humans, and humans make mistakes. Always think for yourself: \"Does this make sense?\" Remember, you don't need an app to understand your cycle! However, drip. wants to support you and make period tracking easier, more transparent and secure."
},
"privacyPolicy": {
"title": "Privacy Policy",
"intro": {
@@ -53,9 +58,6 @@
"title": "Transparency",
"text": "You can read through the source code of drip. to ensure the given information is correct. The source code is like a recipe: It tells you how much and what kind of ingredients you need and how you prepare them to cook a tasty meal or program a funky app.\n\nBuon appetito!"
}
},
"version": {
"title": "Version"
}
}
}