{species.size}
{canBeEaten && (
)}
{species.population}
diff --git a/src/components/opponent/right-opponents.tsx b/src/components/opponent/right-opponents.tsx
index 3d74f51..b4ec07b 100644
--- a/src/components/opponent/right-opponents.tsx
+++ b/src/components/opponent/right-opponents.tsx
@@ -1,12 +1,16 @@
import { OpponentLayout } from '@/src/components/opponent/opponent-layout'
import { FC } from 'react'
import { Opponent } from '@/src/models/opponent.model'
+import { useLangContext } from '@/src/providers/lang.provider'
interface RightOpponentsProps {
opponents: Opponent[]
}
export const RightOpponents: FC = ({ opponents }) => {
+ const {
+ translationHook: { t }
+ } = useLangContext()
if (opponents.length <= 1) {
return null
}
@@ -22,7 +26,7 @@ export const RightOpponents: FC = ({ opponents }) => {
return (
{opponentsOnTheRight.map((opponent, index) => {
diff --git a/src/components/player-species/add-left-species-button.tsx b/src/components/player-species/add-left-species-button.tsx
index a8dffba..0f05218 100644
--- a/src/components/player-species/add-left-species-button.tsx
+++ b/src/components/player-species/add-left-species-button.tsx
@@ -2,8 +2,12 @@ import { FC } from 'react'
import { EVOLVING_STAGES, useGameContext } from '@/src/providers/game.provider'
import { usePlayerStatus } from '@/src/hooks/player-status.hook'
import { AddNewSpeciesIcon } from '@/src/components/svg-icons/add-new-species-icon'
+import { useLangContext } from '@/src/providers/lang.provider'
export const AddLeftSpeciesButton: FC = () => {
+ const {
+ translationHook: { t }
+ } = useLangContext()
const { isEvolvingStage } = usePlayerStatus()
const { updateStatus, status } = useGameContext()
@@ -21,7 +25,7 @@ export const AddLeftSpeciesButton: FC = () => {
updateStatus(EVOLVING_STAGES.ADD_LEFT_SPECIES)
}}
>
-
+
)
}
diff --git a/src/components/player-species/add-right-species-button.tsx b/src/components/player-species/add-right-species-button.tsx
index e7e93ab..bae9461 100644
--- a/src/components/player-species/add-right-species-button.tsx
+++ b/src/components/player-species/add-right-species-button.tsx
@@ -2,8 +2,12 @@ import { FC } from 'react'
import { usePlayerStatus } from '@/src/hooks/player-status.hook'
import { EVOLVING_STAGES, useGameContext } from '@/src/providers/game.provider'
import { AddNewSpeciesIcon } from '@/src/components/svg-icons/add-new-species-icon'
+import { useLangContext } from '@/src/providers/lang.provider'
export const AddRightSpeciesButton: FC = () => {
+ const {
+ translationHook: { t }
+ } = useLangContext()
const { updateStatus, status } = useGameContext()
const { isEvolvingStage } = usePlayerStatus()
if (!isEvolvingStage()) {
@@ -20,7 +24,7 @@ export const AddRightSpeciesButton: FC = () => {
updateStatus(EVOLVING_STAGES.ADD_RIGHT_SPECIES)
}}
>
-
+
)
}
diff --git a/src/components/player-species/add-species-features-button.tsx b/src/components/player-species/add-species-features-button.tsx
index 5b4e18a..f280b9d 100644
--- a/src/components/player-species/add-species-features-button.tsx
+++ b/src/components/player-species/add-species-features-button.tsx
@@ -3,6 +3,7 @@ import { Species } from '@/src/models/species.model'
import { usePlayerStatus } from '@/src/hooks/player-status.hook'
import { PlusIcon } from '@/src/components/svg-icons/plus-icon'
import { EVOLVING_STAGES, useGameContext } from '@/src/providers/game.provider'
+import { useLangContext } from '@/src/providers/lang.provider'
interface AddSpeciesFeatureButtonProps {
index: number
@@ -10,6 +11,9 @@ interface AddSpeciesFeatureButtonProps {
}
export const AddSpeciesFeatureButton: FC = ({ index, species }) => {
+ const {
+ translationHook: { t }
+ } = useLangContext()
const { updateStatus, updateSelectedSpecies, status, selectedSpecies } = useGameContext()
const { isEvolvingStage } = usePlayerStatus()
@@ -31,7 +35,7 @@ export const AddSpeciesFeatureButton: FC = ({ inde
updateStatus(EVOLVING_STAGES.ADD_SPECIES_FEATURE)
}}
>
-
+
)
}
diff --git a/src/components/player-species/feed-species-button.tsx b/src/components/player-species/feed-species-button.tsx
index 4baebfe..9336443 100644
--- a/src/components/player-species/feed-species-button.tsx
+++ b/src/components/player-species/feed-species-button.tsx
@@ -9,6 +9,7 @@ import { CarnivoreWaitingIcon } from '@/src/components/svg-icons/carnivore-waiti
import { CarnivoreAttackingIcon } from '@/src/components/svg-icons/carnivore-attacking-icon'
import { GameStatus } from '@/src/enums/game.events.enum'
import { FoodIcon } from '@/src/components/svg-icons/food-icon'
+import { useLangContext } from '@/src/providers/lang.provider'
interface FeedSpeciesButtonProps {
gameId: string
@@ -18,6 +19,9 @@ interface FeedSpeciesButtonProps {
}
export const FeedSpeciesButton: FC = ({ index, gameId, playerId, species }) => {
+ const {
+ translationHook: { t }
+ } = useLangContext()
const { carnivoreFeedingData, updateStatus } = useGameContext()
const { isFeedingStage } = usePlayerStatus()
@@ -40,7 +44,7 @@ export const FeedSpeciesButton: FC = ({ index, gameId, p
{canBeEaten ? (
) : (
@@ -55,6 +59,9 @@ interface FeedCarnivoreButtonProps {
}
const FeedCarnivoreButton: FC = ({ index, species }) => {
+ const {
+ translationHook: { t }
+ } = useLangContext()
const { carnivoreFeedingData, updateCarnivoreFeedingData } = useGameContext()
const isCurrentlyFeeding = carnivoreFeedingData.carnivoreId === species.id
@@ -76,13 +83,13 @@ const FeedCarnivoreButton: FC = ({ index, species }) =
{species.preyIds.length > 0 ? (
) : (
- Go vegan
+ {t('go-vegan')}
)}
>
)
@@ -96,6 +103,9 @@ interface FeedPlantsButtonProps {
}
const FeedPlantsButton: FC = ({ gameId, playerId, species, index }) => {
+ const {
+ translationHook: { t }
+ } = useLangContext()
if (isCarnivore(species) || species.foodEaten >= species.population) {
return null
}
@@ -108,7 +118,7 @@ const FeedPlantsButton: FC = ({ gameId, playerId, species
)
}
const IncreaseSpeciesPopulationLabel: FC = ({ index, species }) => {
+ const {
+ translationHook: { t }
+ } = useLangContext()
return (
{species.population}
diff --git a/src/components/player-species/species-size-element.tsx b/src/components/player-species/species-size-element.tsx
index a4c46ce..a1e7f2b 100644
--- a/src/components/player-species/species-size-element.tsx
+++ b/src/components/player-species/species-size-element.tsx
@@ -3,6 +3,7 @@ import { Species } from '@/src/models/species.model'
import { usePlayerStatus } from '@/src/hooks/player-status.hook'
import { EVOLVING_STAGES, useGameContext } from '@/src/providers/game.provider'
import { PlusIcon } from '@/src/components/svg-icons/plus-icon'
+import { useLangContext } from '@/src/providers/lang.provider'
interface SpeciesSizeElementProps {
index: number
@@ -26,6 +27,9 @@ export const SpeciesSizeElement: FC = ({ index, species
}
const IncreaseSpeciesSizeButton: FC = ({ index, species }) => {
+ const {
+ translationHook: { t }
+ } = useLangContext()
const { updateStatus, updateSelectedSpecies, status, selectedSpecies } = useGameContext()
const isAnimated =
@@ -42,17 +46,20 @@ const IncreaseSpeciesSizeButton: FC = ({ index, species
>
-
+
)
}
const IncreaseSpeciesSizeLabel: FC = ({ index, species }) => {
+ const {
+ translationHook: { t }
+ } = useLangContext()
return (
{species.size}
diff --git a/src/components/svg-icons/french-flag-icon.tsx b/src/components/svg-icons/french-flag-icon.tsx
new file mode 100644
index 0000000..bc354e7
--- /dev/null
+++ b/src/components/svg-icons/french-flag-icon.tsx
@@ -0,0 +1,24 @@
+import { FC } from 'react'
+
+export const FrenchFlagIcon: FC = () => {
+ return (
+
+ )
+}
diff --git a/src/components/svg-icons/player-eating-icon.tsx b/src/components/svg-icons/player-eating-icon.tsx
index c86cd3e..7c5fceb 100644
--- a/src/components/svg-icons/player-eating-icon.tsx
+++ b/src/components/svg-icons/player-eating-icon.tsx
@@ -1,16 +1,20 @@
import { FC } from 'react'
+import { useLangContext } from '@/src/providers/lang.provider'
interface PlayerEatingIconProps {
name: string
}
export const PlayerEatingIcon: FC = ({ name }) => {
+ const {
+ translationHook: { t }
+ } = useLangContext()
return (