Skip to content

Commit 4e08035

Browse files
committed
feat: refine tabs translations and sheet
1 parent 63aeb67 commit 4e08035

10 files changed

Lines changed: 118 additions & 11 deletions

File tree

‎AGENTS.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ This is a React + TypeScript web application for viewing WCA (World Cube Associa
109109
- **New files:** The agent can create new files for features or tests, but all new code should be covered by tests.
110110
- **Comments:** Add comments to explain complex logic; maintainability is valued.
111111
- **Composable components:** Prefer creating small, reusable components over monolithic views.
112-
- **Translations:** Default to updating only `src/i18n/en/translation.yaml` unless the task explicitly requests other locales.
113112
- **Keep instructions fresh:** When you discover new working conventions or project expectations, update this `AGENTS.md` to capture them.
114113

115114
---

‎src/i18n/es/translation.yaml‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,22 @@ common:
2323
444bf: 4x4x4 Ciega
2424
555bf: 5x5x5 Ciega
2525
333mbf: 3x3x3 Multi Ciega
26+
header:
27+
tabs:
28+
groups: 'Groups'
29+
events: 'Events'
30+
schedule: 'Schedule'
31+
rankings: 'Rankings'
32+
scramblers: 'Scramblers'
33+
stream: 'Stream'
34+
more: 'More'
35+
information: 'Information'
36+
extraInfo: 'Extra Info'
37+
extraInfoOptions: 'Extra Info'
38+
competition:
39+
tabs:
40+
title: Extra Information
41+
view: View Competition Tabs
42+
error: Unable to load competition tabs.
43+
collapseAll: Collapse all
44+
expandAll: Expand all

‎src/i18n/fr/translation.yaml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ header:
118118
rankings: 'Classements'
119119
scramblers: 'Mélangeurs'
120120
stream: 'Stream'
121+
more: 'More'
122+
information: 'Information'
123+
extraInfo: 'Extra Info'
124+
extraInfoOptions: 'Extra Info'
121125
home:
122126
subtitle: 'Apprenez tout ce que vous devez savoir sur les tâches qui vous ont été attribuées aux compétitions WCA !'
123127
explanation: 'Remarque : Ce site web est un outil pratique pour les organisateurs, délégués et compétiteurs. Les informations fournies sont basées sur le planning prévisionnel. Pensez à consulter régulièrement la page de la compétition pour obtenir les informations les plus récentes. Les horaires de début et de fin peuvent varier.'
@@ -128,6 +132,12 @@ home:
128132
upcomingCompetitions: 'Compétitions à venir'
129133
yourCompetitions: 'Vos compétitions'
130134
competition:
135+
tabs:
136+
title: Extra Information
137+
view: View Competition Tabs
138+
error: Unable to load competition tabs.
139+
collapseAll: Collapse all
140+
expandAll: Expand all
131141
competitors:
132142
viewMyAssignments: 'Voir mes affectations'
133143
viewCompetitionInformation: 'Voir les informations sur la compétition'

‎src/i18n/ja/translation.yaml‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,22 @@ common:
2323
444bf: 4x4x4 目隠し
2424
555bf: 5x5x5 目隠し
2525
333mbf: 3x3x3 複数目隠し
26+
header:
27+
tabs:
28+
groups: 'Groups'
29+
events: 'Events'
30+
schedule: 'Schedule'
31+
rankings: 'Rankings'
32+
scramblers: 'Scramblers'
33+
stream: 'Stream'
34+
more: 'More'
35+
information: 'Information'
36+
extraInfo: 'Extra Info'
37+
extraInfoOptions: 'Extra Info'
38+
competition:
39+
tabs:
40+
title: Extra Information
41+
view: View Competition Tabs
42+
error: Unable to load competition tabs.
43+
collapseAll: Collapse all
44+
expandAll: Expand all

‎src/i18n/ko/translation.yaml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ header:
128128
rankings: 순위
129129
scramblers: 스크램블러
130130
stream: 스트리밍
131+
more: 'More'
132+
information: 'Information'
133+
extraInfo: 'Extra Info'
134+
extraInfoOptions: 'Extra Info'
131135
home:
132136
subtitle: WCA 대회에 대한 모든 정보를 알아보세요!
133137
explanation: '참고: 이 웹사이트는 주최자, 파견위원 및 선수를 위한 편의 도구로써 존재합니다. 제공된 정보는 일정에 따라 예정된 데이터를 기반으로 합니다. 가장 최신 정보를 얻으려면 대회에 주의를 기울여 주세요. 시작 및 종료 시각은 변동될 수 있습니다.'
@@ -138,6 +142,12 @@ home:
138142
upcomingCompetitions: 다가오는 대회
139143
yourCompetitions: 귀하의 대회
140144
competition:
145+
tabs:
146+
title: Extra Information
147+
view: View Competition Tabs
148+
error: Unable to load competition tabs.
149+
collapseAll: Collapse all
150+
expandAll: Expand all
141151
competitors:
142152
viewMyAssignments: 나의 배정 보기
143153
viewCompetitionInformation: 대회 정보 보기

‎src/i18n/nl/translation.yaml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ header:
126126
rankings: 'Ranglijsten'
127127
scramblers: 'Scramblers'
128128
stream: 'Stream'
129+
more: 'More'
130+
information: 'Information'
131+
extraInfo: 'Extra Info'
132+
extraInfoOptions: 'Extra Info'
129133
home:
130134
subtitle: 'Leer alles over je taken op je aankomende WCA competitie weten!'
131135
explanation: 'Note: This website exists as a convenience tool for organizers, delegates, and competitors. The information provided is based on scheduled data. Pay close attention to the competition for the most up-to-date information. Start and end times can fluctuate.'
@@ -136,6 +140,12 @@ home:
136140
upcomingCompetitions: 'Aankomende Competities'
137141
yourCompetitions: 'Jouw Competities'
138142
competition:
143+
tabs:
144+
title: Extra Information
145+
view: View Competition Tabs
146+
error: Unable to load competition tabs.
147+
collapseAll: Collapse all
148+
expandAll: Expand all
139149
competitors:
140150
viewCompetitionInformation: 'Bekijk de Competitie Informatie'
141151
searchCompetitors: 'Zoek deelnemers'

‎src/i18n/pl/translation.yaml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ header:
137137
rankings: 'Rankingi'
138138
scramblers: 'Mieszacze'
139139
stream: 'Stream'
140+
more: 'More'
141+
information: 'Information'
142+
extraInfo: 'Extra Info'
143+
extraInfoOptions: 'Extra Info'
140144
home:
141145
subtitle: 'Naucz się wszystkiego, co potrzebne o zadaniach na zawodach WCA!'
142146
explanation: 'Informacja: Ta strona jest narzędziem pomocniczym dla organizatorów, delegatów i zawodników. Informacje są oparte na danych z harmonogramu. Zwróć uwagę na komunikaty na miejscu zawodów, aby uzyskać najbardziej aktualne informacje. Godziny rozpoczęcia i zakończenia mogą się zmieniać.'
@@ -147,6 +151,12 @@ home:
147151
upcomingCompetitions: 'Nadchodzące zawody'
148152
yourCompetitions: 'Twoje zawody'
149153
competition:
154+
tabs:
155+
title: Extra Information
156+
view: View Competition Tabs
157+
error: Unable to load competition tabs.
158+
collapseAll: Collapse all
159+
expandAll: Expand all
150160
competitors:
151161
viewCompetitionInformation: 'Wyświetl informacje o zawodach'
152162
searchCompetitors: 'Wyszukaj zawodników'

‎src/i18n/zh-CN/translation.yaml‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,22 @@ common:
2424
444bf: 四盲
2525
555bf: 五盲
2626
333mbf: 多盲
27+
header:
28+
tabs:
29+
groups: 'Groups'
30+
events: 'Events'
31+
schedule: 'Schedule'
32+
rankings: 'Rankings'
33+
scramblers: 'Scramblers'
34+
stream: 'Stream'
35+
more: 'More'
36+
information: 'Information'
37+
extraInfo: 'Extra Info'
38+
extraInfoOptions: 'Extra Info'
39+
competition:
40+
tabs:
41+
title: Extra Information
42+
view: View Competition Tabs
43+
error: Unable to load competition tabs.
44+
collapseAll: Collapse all
45+
expandAll: Expand all

‎src/layouts/CompetitionLayout/CompetitionTabsSheet.tsx‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,13 @@ export const CompetitionTabsSheet = ({
6161
</div>
6262
<div className="flex flex-col gap-2 overflow-y-auto pb-6">
6363
{tabs.map((tab) => (
64-
<Link key={tab.href} to={tab.href} className="link-card" onClick={onClose}>
65-
{tab.text}
64+
<Link
65+
key={tab.href}
66+
to={tab.href}
67+
className="flex items-center justify-between gap-2 rounded-lg border border-tertiary-weak bg-white px-3 py-2 text-sm font-medium text-slate-700 shadow-sm transition hover:bg-slate-50 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100 dark:hover:bg-gray-800"
68+
onClick={onClose}>
69+
<span>{tab.text}</span>
70+
<i className="fa fa-chevron-right text-xs text-slate-400" aria-hidden="true" />
6671
</Link>
6772
))}
6873
{tabPanels && tabPanels.length > 0 && (
@@ -76,9 +81,13 @@ export const CompetitionTabsSheet = ({
7681
<Link
7782
key={tab.href}
7883
to={tab.href}
79-
className="block rounded px-2 py-1 text-slate-600 hover:bg-slate-100 dark:text-gray-300 dark:hover:bg-gray-800"
84+
className="flex items-center justify-between gap-2 rounded-md px-2 py-1 text-slate-600 transition hover:bg-slate-100 dark:text-gray-300 dark:hover:bg-gray-800"
8085
onClick={onClose}>
81-
{tab.text}
86+
<span>{tab.text}</span>
87+
<i
88+
className="fa fa-chevron-right text-[10px] text-slate-400"
89+
aria-hidden="true"
90+
/>
8291
</Link>
8392
))}
8493
</div>

‎src/pages/Competition/Tabs/index.tsx‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { useCallback, useEffect, useMemo, useState } from 'react';
22
import { useTranslation } from 'react-i18next';
33
import { useLocation } from 'react-router-dom';
4-
import { Container, IconButton, MarkdownContent } from '@/components';
4+
import { Container } from '@/components/Container';
5+
import { IconButton } from '@/components/IconButton/IconButton';
56
import { LinkButton } from '@/components/LinkButton';
7+
import { MarkdownContent } from '@/components/MarkdownContent';
68
import { useCompetitionTabs } from '@/hooks/queries/useCompetitionTabs';
79
import {
810
TabWithSlug,
@@ -145,11 +147,6 @@ export default function CompetitionTabs() {
145147
<div className="flex justify-center w-full">
146148
<Container className="p-2 space-y-4">
147149
<div className="flex flex-wrap items-center gap-3">
148-
<LinkButton
149-
to={`/competitions/${competitionId}/information`}
150-
title={t('competition.competitors.viewCompetitionInformation')}
151-
variant="blue"
152-
/>
153150
<div className="flex items-center gap-2 ml-auto">
154151
<IconButton
155152
type="button"
@@ -179,6 +176,11 @@ export default function CompetitionTabs() {
179176
<MarkdownContent content={removeDuplicateTitleLine(tab.content, tab.name)} />
180177
</TabPanel>
181178
))}
179+
<LinkButton
180+
to={`/competitions/${competitionId}/information`}
181+
title={t('competition.competitors.viewCompetitionInformation')}
182+
variant="blue"
183+
/>
182184
</Container>
183185
</div>
184186
);

0 commit comments

Comments
 (0)