Leon 1 年之前
父節點
當前提交
ad33c7e26e
共有 5 個文件被更改,包括 76 次插入53 次删除
  1. 22 12
      src/context/locales/en.js
  2. 37 27
      src/context/locales/zh.js
  3. 2 2
      src/pages/clock/ChooseScenario.tsx
  4. 11 11
      src/pages/clock/SetGoal.tsx
  5. 4 1
      src/pages/clock/Suggest.tsx

+ 22 - 12
src/context/locales/en.js

@@ -111,20 +111,21 @@ export default {
         },
         choose_scenario: {
             title: 'Choose Circadain Clock',
-            description: 'Circadian clock is key to your health. And your acts of fasting and sleep will affect your circadian health in powerful ways.',
+            description: 'Fasting and sleep affect your body\'s circadian clock in powerful ways that are crucial to losing weight, revving up metabolism, and keeping hormones balanced.',
             fasting: 'Fasting',
-            fast_desc: 'Track overnight fasting in 2 steps.',
+            fast_desc: 'Track your overnight fast',
             fast_sleep: 'Fasting with Sleep',
-            fast_sleep_desc: 'Track fasting before bed, during sleep, and after waking up.',
+            fast_sleep_desc: 'Track your overnight fast before bed, during sleep, and after waking up',
             free: 'Free',
             limit_time_offer: 'Limit-Time Offer',
+            next:'Next'
         },
         suggest: {
-            step_0_title: 'Set End Time of Fasting',
-            end_fast_picker_header: 'What time do you want to break your fast and start your breakfast?',
+            step_0_title: 'Set End Time for Fasting',
+            end_fast_picker_header: 'What time do you want to end fasting?',
             end_fast_picker_footer: 'This is the time you may begin eating breakfast or your first meal of the day.',
-            step_1_title: 'Suggested Fasting Schedule',
-            fast_suggest_header: 'To benefit from overnight fasting and enjoy breakfast at {{time}}, start fasting at suggested time.',
+            step_1_title: 'Suggested Fast schedule',
+            fast_suggest_header: 'To end fasting at {{time}}, start at one of the following times:',
             start_fast_time: 'Start fasting at {{time}}',
             intermitent_fast: '{{data}} Intermittent Fasting',
             fast_desc: '{{start_time}} hours fasting, {{end_time}} hours eating',
@@ -133,21 +134,30 @@ export default {
             fall_sleep_picker_header: 'How long does it take you to fall asleep?',
             fall_sleep_picker_footer: 'It takes 10 to 30 minutes for most people to fall asleep once they\'re in bed.',
             step_3_title: 'Suggested Sleep Schedule',
-            sleep_suggest_header: 'To wake up refreshed at {{time}}, go to bed at suggested time.',
+            sleep_suggest_header: 'To wake up feeling fresh at {{time}}, go to bed at one of the following times:',
+            sleep_suggest_footer:'A good night\'s sleep consists of 5 or 6 complete sleep cycles, each lasting 90 minutes on average.',
             cycles: '{{times}} sleep cycles',
             go_to_bed_at: 'Go to bed at {{time}}',
             restorative: 'Restorative',
-            suggest_plan: 'Suggest Plan',
+            suggest_plan: 'Suggest Schedule',
             set_myself: 'Set Schedule Myself',
             popular: 'Popular',
             recent: 'Recent',
-
+            btn:'Suggest Schedule',
+            done:'Done'
         },
         set_goal: {
-            set_action_plan: 'Set Action Plan',
+            set_action_plan: 'Set Schedule',
             almost_done: 'Almost done!',
-            header: 'Review goal and action plan',
+            header: 'Review your schedule',
             footer: 'Feel free to modify your shedule as needed.',
+            fast:'Fasting',
+            sleep:'Sleep',
+            start_fasting:'Start fasting',
+            go_to_bed:'Go to bed',
+            wake_up:'Wake up',
+            end_fasting:'End fasting',
+            done:'Done'
         },
 
         check_access: {

+ 37 - 27
src/context/locales/zh.js

@@ -113,44 +113,54 @@ export default {
             location_confirm: '去设置'
         },
         choose_scenario: {
-            title: 'Choose Circadain Clock',
-            description: 'Circadian clock is key to your health. And your acts of fasting and sleep will affect your circadian health in powerful ways.',
-            fasting: 'Fasting',
-            fast_desc: 'Track overnight fasting in 2 steps.',
-            fast_sleep: 'Fasting with Sleep',
-            fast_sleep_desc: 'Track fasting before bed, during sleep, and after waking up.',
-            free: 'Free',
-            limit_time_offer: 'Limit-Time Offer',
+            title: '选择生物钟',
+            description: '断食和睡眠深刻影响着您体内的“生物时钟”。规律的生物钟对减肥、提高新陈代谢、保持激素平衡至关重要。',
+            fasting: '断食',
+            fast_desc: '记录每晚断食',
+            fast_sleep: '断食与睡眠',
+            fast_sleep_desc: '记录每晚断食的三个阶段,\n睡前、睡眠期间、及起床后',
+            free: '免费',
+            limit_time_offer: '限时免费',
+            next:'下一步'
         },
         suggest: {
-            step_0_title: 'Set End Time of Fasting',
-            end_fast_picker_header: 'What time do you want to break your fast and start your breakfast?',
-            end_fast_picker_footer: 'This is the time you may begin eating breakfast or your first meal of the day.',
-            step_1_title: 'Suggested Fasting Schedule',
-            fast_suggest_header: 'To benefit from overnight fasting and enjoy breakfast at {{time}}, start fasting at suggested time.',
+            step_0_title: '设置断食结束时间',
+            end_fast_picker_header: '您想几点结束断食?',
+            end_fast_picker_footer: '即您开始吃早餐或第一餐的时间。',
+            step_1_title: '断食日程推荐',
+            fast_suggest_header: '{{time}} 结束断食, 为你推荐以下开始时间:',
             start_fast_time: 'Start fasting at {{time}}',
             intermitent_fast: '{{data}} Intermittent Fasting',
             fast_desc: '{{start_time}} hours fasting, {{end_time}} hours eating',
-            step_2_title: 'Set Wake Time',
-            end_sleep_picker_header: 'What time do you want to wake up?',
-            fall_sleep_picker_header: 'How long does it take you to fall asleep?',
-            fall_sleep_picker_footer: 'It takes 10 to 30 minutes for most people to fall asleep once they\'re in bed.',
-            step_3_title: 'Suggested Sleep Schedule',
-            sleep_suggest_header: 'To wake up refreshed at {{time}}, go to bed at suggested time.',
+            step_2_title: '设置起床时间',
+            end_sleep_picker_header: '您想几点起床?',
+            fall_sleep_picker_header: '您平时多久入睡?',
+            fall_sleep_picker_footer: '正常躺床上到入睡需要10-30分钟。',
+            step_3_title: '睡眠日程推荐',
+            sleep_suggest_header: '{{time}} 起床感觉清爽, 为你推荐以下就寝时间:',
+            sleep_suggest_footer:'睡个好觉需要 5-6 个完整睡眠周期, 每个睡眠周期平均90分钟。',
             cycles: '{{times}} sleep cycles',
             go_to_bed_at: 'Go to bed at {{time}}',
             restorative: 'Restorative',
-            suggest_plan: 'Suggest Plan',
-            set_myself: 'Set Schedule Myself',
+            suggest_plan: '推荐日程',
+            set_myself: '自己设置',
             popular: 'Popular',
             recent: 'Recent',
-
+            btn:'推荐日程',
+            done:'完成'
         },
         set_goal: {
-            set_action_plan: 'Set Action Plan',
-            almost_done: 'Almost done!',
-            header: 'Review goal and action plan',
-            footer: 'Feel free to modify your shedule as needed.',
+            set_action_plan: '设置日程',
+            almost_done: '最后一步',
+            header: '检查您的日程',
+            footer: '您可根据需要做出最后调整。',
+            fast:'断食',
+            sleep:'睡眠',
+            start_fasting:'开始断食',
+            go_to_bed:'就寝',
+            wake_up:'起床',
+            end_fasting:'结束断食',
+            done:'完成'
         },
 
         check_access: {
@@ -583,7 +593,7 @@ export default {
 
             action_sheet: {
                 suggest_schedule: '推荐日程',
-                change_schedule: '自定日程',
+                change_schedule: '设置日程',
                 switch_scenario: '选择生物钟',
                 set_new_goals: '设置新目标',
                 set_fast_goal: '设置断食目标(本次)',

+ 2 - 2
src/pages/clock/ChooseScenario.tsx

@@ -210,7 +210,7 @@ export default function ChooseScenario() {
                 {
                     (process.env.TARO_ENV == 'weapp' || selected == 0) && <ChooseScenarioBtn
                         onClick={goSuggestion}
-                        title="Start"
+                        title={t('feature.choose_scenario.next')}
                         background={background}
                     />
                 }
@@ -228,7 +228,7 @@ export default function ChooseScenario() {
                             start={{ x: 0, y: 0 }}
                             end={{ x: 1, y: 0 }}
                         >
-                            <Text style={{ fontWeight: 'bold', fontSize: 20 }}>Start</Text>
+                            <Text style={{ fontWeight: 'bold', fontSize: 20 }}>{t('feature.choose_scenario.next')}</Text>
                         </LinearGradient>
                     </View>
                 }

+ 11 - 11
src/pages/clock/SetGoal.tsx

@@ -112,9 +112,9 @@ export default function SetGoal() {
         }
         var hours = Math.floor(duration / 60)
         var minutes = duration % 60
-        var str = hours + ' hours'// + minutes + ' minutes'
+        var str = hours + (global.language=='en'?' hours':'小时')// + minutes + ' minutes'
         if (minutes > 0) {
-            str += ` ${minutes} minutes`
+            str += ` ${minutes}`+(global.language=='en'?' minutes':'分钟')
         }
         setFastDuration(str)
     }
@@ -136,9 +136,9 @@ export default function SetGoal() {
         }
         var hours = Math.floor(duration / 60)
         var minutes = duration % 60
-        var str = hours + ' hours'// + minutes + ' minutes'
+        var str = hours + (global.language=='en'?' hours':'小时')// + minutes + ' minutes'
         if (minutes > 0) {
-            str += ` ${minutes} minutes`
+            str += ` ${minutes}`+(global.language=='en'?' minutes':'分钟')
         }
         setSleepDuration(str)
     }
@@ -469,7 +469,7 @@ export default function SetGoal() {
                     margin: 0,
                     // backgroundColor:'red'
                 }} onClick={() => { }}>
-                    <Text className="cell_title">Fasting</Text>
+                    <Text className="cell_title">{t('feature.set_goal.fast')}</Text>
                     <Text className="cell_value" style={{ color: ColorType.fast }}>{fastDuration}</Text>
                 </View>
                 {
@@ -479,7 +479,7 @@ export default function SetGoal() {
                         paddingLeft: 0,
                         paddingRight: 0
                     }} onClick={() => { }}>
-                        <Text className="cell_title">Sleep</Text>
+                        <Text className="cell_title">{t('feature.set_goal.sleep')}</Text>
                         <Text className="cell_value" style={{ color: ColorType.sleep }}>{sleepDuration}</Text>
                     </View>
                 }
@@ -499,7 +499,7 @@ export default function SetGoal() {
                     setIsStart(true)
                     setShowTimePicker(true)
                 }}>
-                    <Text className="cell_title">Start fasting</Text>
+                    <Text className="cell_title">{t('feature.set_goal.start_fasting')}</Text>
                     <Text className="cell_value" style={{ color: ColorType.fast }}>{fastTarget.start_time}</Text>
                     <Image className="cell_arrow" src={require('@/assets/images/arrow3.png')} />
                     <View className="cell_line" style={{ height: 1 }} />
@@ -515,7 +515,7 @@ export default function SetGoal() {
                         setIsStart(true)
                         setShowTimePicker(true)
                     }}>
-                        <Text className="cell_title">Go to bed</Text>
+                        <Text className="cell_title">{t('feature.set_goal.go_to_bed')}</Text>
                         <Text className="cell_value" style={{ color: ColorType.sleep }}>{isNextDay(false, true) ? '次日 ' : ' '}{sleepTarget.start_time}</Text>
                         <Image className="cell_arrow" src={require('@/assets/images/arrow3.png')} />
                         <View className="cell_line" style={{ height: 1 }} />
@@ -532,7 +532,7 @@ export default function SetGoal() {
                         setIsStart(false)
                         setShowTimePicker(true)
                     }}>
-                        <Text className="cell_title">Wake up</Text>
+                        <Text className="cell_title">{t('feature.set_goal.wake_up')}</Text>
 
                         <Text className="cell_value" style={{ color: ColorType.sleep }}>{isNextDay(false, false) ? '次日 ' : ' '}{sleepTarget.end_time}</Text>
                         <Image className="cell_arrow" src={require('@/assets/images/arrow3.png')} />
@@ -548,7 +548,7 @@ export default function SetGoal() {
                     setIsStart(false)
                     setShowTimePicker(true)
                 }}>
-                    <Text className="cell_title">End fasting</Text>
+                    <Text className="cell_title">{t('feature.set_goal.end_fasting')}</Text>
 
                     <Text className="cell_value" style={{ color: ColorType.fast }}>{isNextDay(true, false) ? '次日 ' : ' '}{fastTarget.end_time}</Text>
                     <Image className="cell_arrow" src={require('@/assets/images/arrow3.png')} />
@@ -563,7 +563,7 @@ export default function SetGoal() {
         <Footer>
             <ChooseScenarioBtn
                 onClick={confirm}
-                title={'Done'}
+                title={t('feature.set_goal.done')}
                 background={ColorType.fast}
             />
         </Footer>

+ 4 - 1
src/pages/clock/Suggest.tsx

@@ -612,6 +612,9 @@ export default function Suggest() {
             {
                 (pageStep == 1 || pageStep == 3) && suggestList()
             }
+            {
+                pageStep==3 && <Text className="suggest_footer_note">{t('feature.suggest.sleep_suggest_footer')}</Text>
+            }
             {
                 pageStep == 2 && fallSleepPicker()
             }
@@ -633,7 +636,7 @@ export default function Suggest() {
             <View style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center' }}>
                 <ChooseScenarioBtn
                     onClick={next}
-                    title={pageStep == 0 || pageStep == 2 ? 'Suggest Plan' : 'Next'}
+                    title={pageStep == 0 || pageStep == 2 ? t('feature.suggest.btn') : t('feature.suggest.done')}
                     background={pageStep < 2 ? ColorType.fast : ColorType.sleep}
                 />
                 <Text className="suggest_footer_btn" onClick={myself}>{t('feature.suggest.set_myself')}</Text>