Skip to content

Commit

Permalink
i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
benisgold committed Nov 2, 2023
1 parent b97cdc0 commit 274b5b1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 15 deletions.
11 changes: 10 additions & 1 deletion src/languages/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,16 @@
},
"points": {
"coming_soon_title": "Coming Soon",
"coming_soon_description": "Points are just around the corner.\nStart earning today."
"coming_soon_description": "Points are just around the corner.\nStart earning today.",
"referral_link": "Referral Link",
"share": "Share",
"next_reward": "Next Reward",
"referrals": "Referrals",
"streak": "Streak",
"longest_yet": "Longest yet",
"day": "day",
"days": "days",
"leaderboard": "Leaderboard"
},
"pools": {
"deposit": "Deposit",
Expand Down
40 changes: 26 additions & 14 deletions src/screens/PointsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import { TAB_BAR_HEIGHT } from '@/navigation/SwipeNavigator';
import { addressCopiedToastAtom } from '@/recoil/addressCopiedToastAtom';
import { useRecoilState } from 'recoil';
import { Toast, ToastPositionContainer } from '@/components/toasts';
import * as i18n from '@/languages';

const fallConfig = {
duration: 2000,
Expand Down Expand Up @@ -115,6 +116,8 @@ const LeaderboardRow = () => {
break;
}

const address = '0x4cefdsfdsfa8a8a8a8';

return (
<Box
paddingVertical="10px"
Expand All @@ -130,15 +133,24 @@ const LeaderboardRow = () => {
shadow="12px"
/>
<Stack space="8px">
<Text color="label" weight="bold" size="15pt">
0x4ce…a8a8
<Text
color="label"
weight="bold"
size="15pt"
ellipsizeMode="middle"
numberOfLines={1}
>
{`${address.slice(0, 5)}${address.slice(
address.length - 4,
address.length
)}`}
</Text>
<Inline space="2px" alignVertical="center">
<Text color="labelQuaternary" size="11pt" weight="bold">
􀙬
</Text>
<Text color="labelQuaternary" size="13pt" weight="semibold">
40 days
{`40 ${i18n.t(i18n.l.points.days)}`}
</Text>
</Inline>
</Stack>
Expand Down Expand Up @@ -356,7 +368,7 @@ export default function PointsScreen() {
</ButtonPressAnimation>
)
}
title={lang.t('account.tab_points')}
title={i18n.t(i18n.l.account.tab_points)}
/>
{pointsFullyEnabled ? (
<ScrollView
Expand Down Expand Up @@ -416,23 +428,23 @@ export default function PointsScreen() {
>
<InfoCard
onPress={() => {}}
title="Next Reward"
title={i18n.t(i18n.l.points.next_reward)}
mainText="20h 19m"
icon="􀉉"
subtitle="12pm Monday"
accentColor={labelSecondary}
/>
<InfoCard
onPress={() => {}}
title="Streak"
mainText="36 days"
title={i18n.t(i18n.l.points.streak)}
mainText={`36 ${i18n.t(i18n.l.points.days)}`}
icon="􀙬"
subtitle="Longest yet"
subtitle={i18n.t(i18n.l.points.longest_yet)}
accentColor={pink}
/>
<InfoCard
onPress={() => {}}
title="Referrals"
title={i18n.t(i18n.l.points.referrals)}
mainText="12"
icon="􀇯"
subtitle="8,200"
Expand All @@ -449,7 +461,7 @@ export default function PointsScreen() {
<ButtonPressAnimation>
<Inline space="4px" alignVertical="center">
<Text weight="bold" color="labelTertiary" size="15pt">
Referral Link
{i18n.t(i18n.l.points.referral_link)}
</Text>
<Text
weight="heavy"
Expand Down Expand Up @@ -487,7 +499,7 @@ export default function PointsScreen() {
color="label"
size="15pt"
>
Share
{i18n.t(i18n.l.points.share)}
</Text>
</Box>
}
Expand Down Expand Up @@ -548,7 +560,7 @@ export default function PointsScreen() {
<Separator color="separatorTertiary" thickness={1} />
<Stack space="16px">
<Text color="label" size="20pt" weight="heavy">
Leaderboard
{i18n.t(i18n.l.points.leaderboard)}
</Text>
<View
style={
Expand Down Expand Up @@ -670,15 +682,15 @@ export default function PointsScreen() {
size="26pt"
weight="semibold"
>
{lang.t('points.coming_soon_title')}
{i18n.t(i18n.l.points.coming_soon_title)}
</Text>
<Text
align="center"
color="labelQuaternary"
size="15pt"
weight="medium"
>
{lang.t('points.coming_soon_description')}
{i18n.t(i18n.l.points.coming_soon_description)}
</Text>
</Stack>
</Stack>
Expand Down

0 comments on commit 274b5b1

Please sign in to comment.