/
Mihaham
/
Table-Time
Обзор
Документация
Войти
/
Mihaham
/
Table-Time
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
apps/web/components/admin/actionLabels.ts
143 строки
3 KB
MihahamYT
feat: dedicated web panels for all 46 games
14 июн 2026, 21:36
14 июн 2026, 21:36
4e11c3f
Код
Авторство
О чём код?
// Auto-generated by scripts/gen-admin-labels.py — do not edit manually const LABELS: Record<string, Record<string, string>> = { "belosnezhka": { "take_apples": "Take apples" }, "bonjour_madame": { "claim_symptom": "Claim symptom", "vote_believe": "Vote believe" }, "chapaev": { "strike": "Strike" }, "chto_ranshe": { "submit_order": "Submit order" }, "chto_tut_est": { "name_item": "Name item" }, "dice-board": { "roll_dice": "Roll dice", "choose_cell": "Choose cell", "pass": "Pass" }, "draw_film": { "submit_drawing": "Submit drawing", "guess_film": "Guess film" }, "dva_slova": { "give_hint": "Give hint", "guess": "Guess", "next_round": "Next round" }, "four_questions": { "ask_question": "Ask question", "answer_question": "Answer question", "final_guess": "Final guess" }, "holodno_goryacho": { "guess_cell": "Guess cell" }, "koaliciya": { "play_card": "Play card" }, "kontakt": { "set_association": "Set association", "contact": "Contact", "reveal": "Reveal" }, "kto_bolshe": { "place_bet": "Place bet" }, "memo": { "flip_tile": "Flip tile" }, "na_bukvu": { "submit_word": "Submit word", "judge_word": "Judge word" }, "ot_nachala_do_kontsa": { "place_card": "Place card" }, "palma": { "confirm_ready": "Confirm ready", "guess_gesture": "Guess gesture" }, "parol": { "give_hint": "Give hint", "guess_password": "Guess password" }, "pazly": { "swap_pieces": "Swap pieces" }, "perudo": { "bid": "Bid", "challenge": "Challenge" }, "shlyapa": { "start_guessing": "Start guessing", "guess": "Guess", "judge_guess": "Judge guess", "skip_word": "Skip word", "next_round": "Next round" }, "siluet": { "guess_silhouette": "Guess silhouette" }, "sound_quiz": { "guess_clip": "Guess clip" }, "spy_i_see": { "submit_drawing": "Submit drawing", "guess_word": "Guess word" }, "sto_kletok": { "place_token": "Place token" }, "storytelling": { "add_sentence": "Add sentence" }, "tabletime_clock": { "buzz": "Buzz", "judge_buzz": "Judge buzz" }, "veriu_ne_veriu": { "play_card": "Play card", "believe": "Believe" }, "ya_tak_vizhu": { "submit_vision": "Submit vision", "guess_concept": "Guess concept" }, "ya_tebya_znayu": { "submit_answer": "Submit answer" }, "yatzy": { "roll_dice": "Roll dice", "keep_dice": "Keep dice", "score_category": "Score category" } } ; const EVENT_LABELS: Record<string, string> = { "game.started": "Игра начата", "game.finished": "Игра завершена", "session.participant_joined": "Участник присоединился", "session.closed": "Сессия закрыта", "action.rejected": "Ход отклонён", }; function humanize(actionType: string): string { return actionType.replace(/_/g, " ").replace(/^\w/, (c) => c.toUpperCase()); } export function actionLabel(pluginId: string, actionType: string): string { return LABELS[pluginId]?.[actionType] ?? humanize(actionType); } export function eventLabel(eventType: string): string { return EVENT_LABELS[eventType] ?? eventType; }