aboutsummaryrefslogtreecommitdiffstats
path: root/site/src/pages/GameSelector.tsx
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-10-07 17:25:43 -0700
committerPinapelz <yukais@pinapelz.com>2025-10-07 17:25:50 -0700
commitd7b5b81b5d6ec55d0847b5171c3800a8f7b5c001 (patch)
treed646d8339602599eee64910cd252de0df595bcfe /site/src/pages/GameSelector.tsx
parent014443ef502eee0c337a5feb2aa0aeebb8d51557 (diff)
feat: add i18n translation (initial JP and EN)
Diffstat (limited to 'site/src/pages/GameSelector.tsx')
-rw-r--r--site/src/pages/GameSelector.tsx11
1 files changed, 6 insertions, 5 deletions
diff --git a/site/src/pages/GameSelector.tsx b/site/src/pages/GameSelector.tsx
index 41551bc..5586cbf 100644
--- a/site/src/pages/GameSelector.tsx
+++ b/site/src/pages/GameSelector.tsx
@@ -1,5 +1,6 @@
import { Link, useSearchParams } from "react-router-dom";
import TitleBar from "../components/TitleBar";
+import { useTranslation } from "react-i18next";
interface GameCategory {
name: string;
@@ -67,18 +68,19 @@ const gameInfo: GameCategory[] = [
const GameSelector = () => {
const [searchParams] = useSearchParams();
const isMoe = searchParams.has("moe");
+ const { t } = useTranslation();
const renderCategory = (category: GameCategory) => (
<div key={category.name} className="mb-6">
<h2
className={`text-lg font-bold ${isMoe ? "text-pink-700" : "text-gray-200"}`}
>
- {category.name}
+ {t(`gameselector.categories.${category.name.toLowerCase().replace(' ', '_')}`)}
</h2>
<p
className={`text-sm ${isMoe ? "text-pink-600" : "text-gray-400"} mb-2`}
>
- {category.description}
+ {category.name === "COMMUNITY" ? t('gameselector.community_description') : category.description}
</p>
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-2 mt-2">
{category.games.map((game) => (
@@ -104,13 +106,12 @@ const GameSelector = () => {
<h1
className={`text-2xl font-bold mb-4 ${isMoe ? "text-pink-800" : "text-white"} sm:mb-6`}
>
- Select a Game
+ {t('gameselector.title')}
</h1>
<h2
className={`text-base font-medium ${isMoe ? "text-pink-700" : "text-gray-300"} mb-4`}
>
- Individual game feeds keep a longer history of news relating to that
- game than the main feed.
+ {t('gameselector.subtitle')}
</h2>
{gameInfo.map(renderCategory)}
</div>
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage