diff --git a/components/cycle-day/symptom-box.js b/components/cycle-day/symptom-box.js index f3f8842..79b0704 100644 --- a/components/cycle-day/symptom-box.js +++ b/components/cycle-day/symptom-box.js @@ -10,7 +10,7 @@ import SymptomEditView from './symptom-edit-view' import { isDateInFuture } from '../helpers/cycle-day' import { Colors, Sizes, Spacing } from '../../styles' -import { headerTitles as symptomTitles } from '../../i18n/en/labels' +import { useTranslation } from 'react-i18next' const SymptomBox = ({ date, @@ -20,6 +20,7 @@ const SymptomBox = ({ editedSymptom, setEditedSymptom, }) => { + const { t } = useTranslation() const isSymptomEdited = editedSymptom === symptom const isSymptomDisabled = isDateInFuture(date) && symptom !== 'note' const isExcluded = symptomData !== null ? symptomData.exclude : false @@ -62,7 +63,7 @@ const SymptomBox = ({ /> - {symptomTitles[symptom].toLowerCase()} + {t(`cycleDay.symptomBox.${symptom}`)} {symptomDataToDisplay && ( diff --git a/i18n/en.json b/i18n/en.json index e97574c..4b5d424 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -1,4 +1,17 @@ { + "cycleDay": { + "symptomBox": { + "bleeding": "Bleeding", + "temperature": "Temperature", + "mucus": "Cervical Mucus", + "cervix": "Cervix", + "note": "Note", + "desire": "Desire", + "sex": "Sex", + "pain": "Pain", + "mood": "Mood" + } + }, "labels": { "bleedingPrediction": { "noPrediction": "As soon as you have tracked 3 menstrual cycles, drip. will make predictions for the next ones." diff --git a/i18n/en/labels.js b/i18n/en/labels.js index be1d26e..c981ac2 100644 --- a/i18n/en/labels.js +++ b/i18n/en/labels.js @@ -1,6 +1,3 @@ -import labels from './settings' -const settingsTitles = labels.menuItems - export const home = { unknown: '?', phase: (n) => `${['1st', '2nd', '3rd'][n - 1]} cycle phase`, @@ -33,30 +30,6 @@ export const shared = { learnMore: 'Learn more', } -export const headerTitles = { - Home: 'Home', - Calendar: 'Calendar', - Chart: 'Chart', - Stats: 'Statistics', - SettingsMenu: 'Settings', - Reminders: settingsTitles.reminders.name, - NfpSettings: settingsTitles.nfpSettings.name, - DataManagement: settingsTitles.dataManagement.name, - Password: settingsTitles.password.name, - About: 'About', - License: 'License', - PrivacyPolicy: 'Privacy Policy', - bleeding: 'Bleeding', - temperature: 'Temperature', - mucus: 'Cervical Mucus', - cervix: 'Cervix', - note: 'Note', - desire: 'Desire', - sex: 'Sex', - pain: 'Pain', - mood: 'Mood', -} - export const stats = { cycleLengthExplainer: 'Basic statistics about the length of your cycles.', emptyStats: 'At least one completed cycle is needed to display stats.',