diff --git a/components/chart/tutorial.js b/components/chart/Tutorial.js similarity index 86% rename from components/chart/tutorial.js rename to components/chart/Tutorial.js index 553a4ef..dbb529c 100644 --- a/components/chart/tutorial.js +++ b/components/chart/Tutorial.js @@ -6,16 +6,17 @@ import AppText from '../common/app-text' import CloseIcon from '../common/close-icon' import { Containers, Spacing } from '../../styles' -import { chart } from '../../i18n/en/labels' +import { useTranslation } from 'react-i18next' const image = require('../../assets/swipe.png') const Tutorial = ({ onClose }) => { + const { t } = useTranslation() return ( - {chart.tutorial} + {t('chart.tutorial')} diff --git a/components/chart/chart.js b/components/chart/chart.js index 3cdd364..d9a3f41 100644 --- a/components/chart/chart.js +++ b/components/chart/chart.js @@ -9,7 +9,7 @@ import HorizontalGrid from './horizontal-grid' import MainGrid from './main-grid' import NoData from './no-data' import NoTemperature from './no-temperature' -import Tutorial from './tutorial' +import Tutorial from './Tutorial' import YAxis from './y-axis' import { getCycleDaysSortedByDate } from '../../db' diff --git a/i18n/en.json b/i18n/en.json index b67c06d..2f61800 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -4,6 +4,9 @@ "chart": "Chart", "stats": "Stats" }, + "chart": { + "tutorial": "You can swipe the chart to view more dates." + }, "cycleDay": { "symptomBox": { "bleeding": "Bleeding", diff --git a/i18n/en/labels.js b/i18n/en/labels.js index c981ac2..2348e7a 100644 --- a/i18n/en/labels.js +++ b/i18n/en/labels.js @@ -3,10 +3,6 @@ export const home = { phase: (n) => `${['1st', '2nd', '3rd'][n - 1]} cycle phase`, } -export const chart = { - tutorial: 'You can swipe the chart to view more dates.', -} - export const shared = { cancel: 'Cancel', save: 'Save',