Skip to content

Commit 3664857

Browse files
authored
[UI] Update quest warning copy (#941)
* update copy * run i18n * bump version * update copy
1 parent f61d5d5 commit 3664857

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hyperplay",
3-
"version": "0.15.3",
3+
"version": "0.16.0",
44
"private": true,
55
"main": "build/main/main.js",
66
"homepage": "./",

public/locales/en/translation.json

+9
Original file line numberDiff line numberDiff line change
@@ -656,14 +656,23 @@
656656
"needMoreAchievements": "You need to have completed {{percent}}% of the achievements in one of these games.",
657657
"Play": "Play",
658658
"playstreak": "Play Streak",
659+
"points": "Points",
659660
"quests": "Quests",
660661
"readyForClaim": "Ready for claim",
661662
"reputation": "Reputation",
662663
"reward": "Reward",
664+
"rewards": "Rewards",
663665
"signIn": "Sign in",
666+
"sync": "Sync",
664667
"View Game": "View Game"
665668
},
666669
"quests": {
670+
"playstreak": {
671+
"signInWarning": {
672+
"client": "You are currently not logged in, play streak progress will not be tracked. Please login to HyperPlay via the top-right dropdown to track progress.",
673+
"overlay": "You are currently not logged in, play streak progress will not be tracked. Please exit the game and login to HyperPlay via the top-right dropdown to track progress."
674+
}
675+
},
667676
"quests": "Quests"
668677
},
669678
"queue": {

src/frontend/components/UI/QuestsViewer/index.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { QuestLogWrapper } from './components/QuestLogWrapper'
44
import { QuestDetailsWrapper } from './components/QuestDetailsWrapper'
55
import { Alert } from '@hyperplay/ui'
66
import useAuthSession from 'frontend/hooks/useAuthSession'
7+
import { useTranslation } from 'react-i18next'
78

89
export interface QuestsViewerProps {
910
projectId: string
@@ -12,13 +13,17 @@ export interface QuestsViewerProps {
1213
export function QuestsViewer({ projectId: appName }: QuestsViewerProps) {
1314
const [selectedQuestId, setSelectedQuestId] = useState<number | null>(null)
1415
const { isSignedIn } = useAuthSession()
16+
const { t } = useTranslation()
1517

1618
let alertComponent = null
1719
if (!isSignedIn) {
1820
alertComponent = (
1921
<Alert
2022
className={styles.alert}
21-
message="Be sure to log into HyperPlay to maintain your play streak progress."
23+
message={t(
24+
'quests.playstreak.signInWarning.overlay',
25+
'You are currently not logged in, play streak progress will not be tracked. Please exit the game and login to HyperPlay via the top-right dropdown to track progress.'
26+
)}
2227
variant="warning"
2328
/>
2429
)

src/frontend/screens/Quests/index.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ import styles from './index.module.scss'
55
import { Alert, Background } from '@hyperplay/ui'
66
import classNames from 'classnames'
77
import useAuthSession from 'frontend/hooks/useAuthSession'
8+
import { useTranslation } from 'react-i18next'
89

910
export function QuestsPage() {
1011
const [selectedQuestId, setSelectedQuestId] = useState<number | null>(null)
1112
const { isSignedIn } = useAuthSession()
13+
const { t } = useTranslation()
1214

1315
let alertComponent = null
1416
const showAlert = !isSignedIn
@@ -18,7 +20,10 @@ export function QuestsPage() {
1820
alertComponent = (
1921
<Alert
2022
className={styles.alert}
21-
message="Be sure to log into HyperPlay to maintain your play streak progress."
23+
message={t(
24+
'quests.playstreak.signInWarning.client',
25+
'You are currently not logged in, play streak progress will not be tracked. Please login to HyperPlay via the top-right dropdown to track progress.'
26+
)}
2227
variant="warning"
2328
/>
2429
)

0 commit comments

Comments
 (0)