Skip to content

Commit

Permalink
tech(install-modal): add i18n keys
Browse files Browse the repository at this point in the history
  • Loading branch information
eliobricenov committed Dec 5, 2024
1 parent f503d8e commit 6d64633
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,10 @@
},
"Install Steam": "Install Steam",
"Installing Steam": "Installing Steam...",
"installModal": {
"loginRequired": "Login Required",
"loginRequiredMessage": "You need to be logged into HyperPlay to enter your access code and install this game. "
},
"Launch Steam": "Launch Steam",
"Launching Steam": "Launching Steam...",
"library": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import ModDialog from './ModDialog'
import { AccessCodeInput } from 'frontend/components/UI/AccessCodeInput'
import useAuthSession from 'frontend/hooks/useAuthSession'
import { AlertCard } from '@hyperplay/ui'
import { useTranslation } from 'react-i18next'

type Props = {
appName: string
Expand All @@ -45,6 +46,7 @@ export default React.memo(function InstallModal({
runner,
gameInfo = null
}: Props) {
const { t } = useTranslation()
const { platform } = useContext(ContextProvider)
const { isSignedIn } = useAuthSession()

Expand Down Expand Up @@ -208,8 +210,11 @@ export default React.memo(function InstallModal({
accessCodeContent = (
<AlertCard
showClose={false}
title="Login Required"
message="You need to be logged into HyperPlay to enter your access code and install this game."
title={t('installModal.loginRequired', 'Login Required')}
message={t(
'installModal.loginRequiredMessage',
'You need to be logged into HyperPlay to enter your access code and install this game. '
)}
variant="warning"
/>
)
Expand Down

0 comments on commit 6d64633

Please sign in to comment.