Skip to content

Commit

Permalink
Merge pull request #287 from BIDMCDigitalPsychiatry/issue-715
Browse files Browse the repository at this point in the history
Translation updates
  • Loading branch information
sarithapillai8 authored Apr 21, 2023
2 parents 72eb355 + 2028b63 commit bab64d2
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 8 deletions.
20 changes: 17 additions & 3 deletions Maze_Game/src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,24 @@ const resources = {
YES: "\u662f\u7684",
YOU_WON: "\u60a8\u8d62\u4e86"
},
}

};
},

"zh-HK":{
translation: {
CONGRATS: "Congrats",
CONTINUE: "Continue to next level?",
GAME: "Maze",
GAME_OVER: "Game Over",
LEVEL: "Level",
NO:"No" ,
PERMISSION:"Click to grant accelerometer Permission",
START_GAME: "Start Game",
YES: "Yes",
YOU_WON: "You Won"
},
}
}

i18n
.use(initReactI18next) // passes i18n down to react-i18next
.init({
Expand Down
3 changes: 2 additions & 1 deletion MemoryGame/src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ const resources = {
TODAY:"What is today’s date?",
TRIAL: "Trial",
},
},
"zh-HK": {
translation: {
ABOUT_TIME:"About what time is it?",
Expand Down Expand Up @@ -328,7 +329,7 @@ const resources = {
},
}
},
};


i18n
.use(initReactI18next) // passes i18n down to react-i18next
Expand Down
3 changes: 1 addition & 2 deletions Spin_Wheel/src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const resources = {
YOU_WON: "\u4f60\u8d62\u4e86",

},
},
"zh-HK":{
translation: {
CONGRATS: "恭喜!",
Expand All @@ -130,8 +131,6 @@ const resources = {
}
}

};

i18n
.use(initReactI18next) // passes i18n down to react-i18next
.init({
Expand Down
2 changes: 1 addition & 1 deletion Survey/src/components/SurveyQuestions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1621,7 +1621,7 @@ export default function SurveyQuestions({...props}) {
const configuration = props.data.configuration;
setActivity(activity);
i18n.changeLanguage(!!configuration ? configuration?.language : "en-US");
}, [])
}, [props.data])

useEffect(() => {
if(!!activity) {
Expand Down
3 changes: 2 additions & 1 deletion VoiceRecording/src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ const resources = {
CLEAR_BTN: " \u6e05\u9664",
CLICK_TO_CLEAR_MSG: "\u70b9\u51fb\u4e0a\u4f20\u6216\u6e05\u9664\u91cd\u65b0\u5f55\u5236"
},
},
"zh-HK": {
translation: {
VOICE_RECORDING: "\u8a9e\u97f3\u9304\u97f3",
Expand All @@ -137,7 +138,7 @@ const resources = {
},
},
}
}

i18n
.use(initReactI18next) // passes i18n down to react-i18next
.init({
Expand Down

0 comments on commit bab64d2

Please sign in to comment.