Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions frontend/src/features/seasons/LeaderboardTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,22 @@ interface LeaderboardTableProps {
caption?: string;
}

/** Season standings: search, clan/language filters, sortable field-name columns, paging, "find me". */
/** Season standings: search, clan/language filters, sortable columns, paging, "find me". */
export function LeaderboardTable({ results, onInsights, title, caption }: LeaderboardTableProps) {
const { t } = useTranslation();
const labels: Record<Column, string> = {
place: t('Place'),
user_name: t('Player'),
clan_name: t('Clan'),
total_points: t('Points'),
total_wins_count: t('Wins'),
total_games_count: t('Games'),
total_score: t('Score'),
tournaments_count: t('Tournaments'),
avg_place: t('Avg Place'),
best_place: t('Best Finish'),
total_time: t('Time Played'),
};
const { current_user: me } = useSharedProps();
const [query, setQuery] = useState('');
const [clan, setClan] = useState<string | null>(null);
Expand Down Expand Up @@ -199,17 +212,17 @@ export function LeaderboardTable({ results, onInsights, title, caption }: Leader
<Table.Thead>
<Table.Tr>
<SortTh column="place" sort={sort} onSort={toggle} w={70}>
place
{labels.place}
</SortTh>
<SortTh column="user_name" sort={sort} onSort={toggle}>
user_name
{labels.user_name}
</SortTh>
<SortTh column="clan_name" sort={sort} onSort={toggle}>
clan_name
{labels.clan_name}
</SortTh>
{NUMERIC.map((column) => (
<SortTh key={column} column={column} sort={sort} onSort={toggle} ta="right">
{column}
{labels[column]}
</SortTh>
))}
<Table.Th w={44} />
Expand Down
2 changes: 1 addition & 1 deletion priv/gettext/es/LC_MESSAGES/default.po
Original file line number Diff line number Diff line change
Expand Up @@ -2217,7 +2217,7 @@ msgid "Best"
msgstr "Mejor"

msgid "Best Finish"
msgstr "Mejor acabado"
msgstr "Mejor puesto"

msgid "Better than %{percent}% of players"
msgstr "Mejor que el %{percent}% de los jugadores"
Expand Down
4 changes: 2 additions & 2 deletions priv/gettext/zh/LC_MESSAGES/default.po
Original file line number Diff line number Diff line change
Expand Up @@ -2147,7 +2147,7 @@ msgid "Best"
msgstr "最佳"

msgid "Best Finish"
msgstr "最佳完成度"
msgstr "最佳排名"

msgid "Better than %{percent}% of players"
msgstr "优于 %{percent}% 的玩家"
Expand Down Expand Up @@ -5129,7 +5129,7 @@ msgid "Total number of teams %{count}"
msgstr "团队总数%{count}"

msgid "Place"
msgstr "地点"
msgstr "排名"

msgid "Score"
msgstr "分数"
Expand Down
Loading