Commit cffab8c7 authored by Mahmoud Aglan's avatar Mahmoud Aglan

fix: tournament list broken query + missing Arabic i18n keys

- tournaments.php: remove non-existent 'ends_at' column from select
  (caused PostgREST error → empty tournaments list)
- i18n.js: add all missing tournament hub keys (my_tournaments,
  no_my_tournaments, format_*, players_label, etc.) + common keys
  (all, retry, failed, coins, play, minutes_abbr)
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent d11f6d9b
......@@ -16,7 +16,7 @@ if ($method === 'GET') {
if ($action === 'list') {
$tournaments = $db->get('el3ab_tournaments', [
'select' => 'id,name,game_key,format,time_control,status,max_players,swiss_rounds,starts_at,ends_at,prize_pool_coins,entry_fee_coins',
'select' => 'id,name,game_key,format,time_control,status,max_players,swiss_rounds,rounds_total,starts_at,prize_pool_coins,entry_fee_coins',
'order' => 'created_at.desc',
'limit' => 50
]);
......
......@@ -661,6 +661,32 @@ const strings = {
'tournament.round_short': 'ج{n}',
'tournament.bye_point': 'إجازة — نقطة كاملة',
'tournament.prev_matches': 'المباريات السابقة',
'tournament.my_tournaments': 'بطولاتي',
'tournament.no_my_tournaments': 'لم تسجّل في أي بطولة بعد',
'tournament.no_open_tournaments': 'لا توجد بطولات مفتوحة للتسجيل',
'tournament.no_active_tournaments': 'لا توجد بطولات جارية',
'tournament.no_completed_tournaments': 'لا توجد بطولات منتهية',
'tournament.new_tournaments_here': 'ستظهر البطولات الجديدة هنا',
'tournament.load_failed': 'فشل تحميل البطولات',
'tournament.match_ready': 'مباراتك جاهزة',
'tournament.players_label': 'لاعبين',
'tournament.rounds_label': 'جولات',
'tournament.time_label': 'الوقت',
'tournament.format_swiss': 'سويسري',
'tournament.format_round_robin': 'دوري كامل',
'tournament.format_single_elim': 'خروج مباشر',
'tournament.format_double_elim': 'خروج مزدوج',
'tournament.format_arena': 'أرينا',
'tournament.format_group_stage': 'مجموعات',
'tournament.starts_in_hours': 'تبدأ خلال {n} ساعة',
'tournament.starts_in_minutes': 'تبدأ خلال {n} دقيقة',
'tournament.in_days': 'بعد {n} يوم',
'common.all': 'الكل',
'common.retry': 'إعادة المحاولة',
'common.failed': 'فشل',
'common.coins': 'عملة',
'common.minutes_abbr': 'د',
'common.play': 'العب',
'chess.rating': 'التصنيف',
'chess.rating_history': 'سجل التصنيف',
'chess.highest': 'الأعلى',
......@@ -1349,6 +1375,32 @@ const strings = {
'tournament.round_short': 'R{n}',
'tournament.bye_point': 'Bye — full point',
'tournament.prev_matches': 'Previous Matches',
'tournament.my_tournaments': 'My Tournaments',
'tournament.no_my_tournaments': 'No tournaments registered yet',
'tournament.no_open_tournaments': 'No open tournaments',
'tournament.no_active_tournaments': 'No active tournaments',
'tournament.no_completed_tournaments': 'No completed tournaments',
'tournament.new_tournaments_here': 'New tournaments will appear here',
'tournament.load_failed': 'Failed to load tournaments',
'tournament.match_ready': 'Your match is ready',
'tournament.players_label': 'Players',
'tournament.rounds_label': 'Rounds',
'tournament.time_label': 'Time',
'tournament.format_swiss': 'Swiss',
'tournament.format_round_robin': 'Round Robin',
'tournament.format_single_elim': 'Single Elimination',
'tournament.format_double_elim': 'Double Elimination',
'tournament.format_arena': 'Arena',
'tournament.format_group_stage': 'Group Stage',
'tournament.starts_in_hours': 'Starts in {n}h',
'tournament.starts_in_minutes': 'Starts in {n}min',
'tournament.in_days': 'In {n} days',
'common.all': 'All',
'common.retry': 'Retry',
'common.failed': 'Failed',
'common.coins': 'coins',
'common.minutes_abbr': 'm',
'common.play': 'Play',
'chess.rating': 'Rating',
'chess.rating_history': 'Rating History',
'chess.highest': 'Highest',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment