Compare commits

...

2 Commits

Author SHA1 Message Date
Ilia Denisov 91c4efc8a8 chore: drop the game.over label, show only the result
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 10s
CI / integration (pull_request) Successful in 14s
CI / ui (pull_request) Successful in 51s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m15s
2026-06-17 22:58:17 +02:00
Ilia Denisov da491b6bde revert: game-over phrases 2026-06-17 22:54:28 +02:00
5 changed files with 8 additions and 10 deletions
+6 -6
View File
@@ -126,9 +126,9 @@ var english = phrases{
yourTurnExchange: "%s: swapping tiles, your turn.", yourTurnExchange: "%s: swapping tiles, your turn.",
yourTurnPass: "%s: passing, your turn.", yourTurnPass: "%s: passing, your turn.",
yourTurnMoved: "%s moved, your turn.", yourTurnMoved: "%s moved, your turn.",
gameOverWon: "🏆 You won! Score %s", gameOverWon: "Game over - 🏆 you won! Score %s",
gameOverLost: "You lost. Score %s", gameOverLost: "Game over - you lost. Score %s",
gameOverDraw: "A draw. Score %s", gameOverDraw: "Game over - a draw. Score %s",
nudge: "You were nudged — it's your turn.", nudge: "You were nudged — it's your turn.",
nudgeBy: "%s: Waiting for your move 🤭", nudgeBy: "%s: Waiting for your move 🤭",
matchFound: "Your game is ready.", matchFound: "Your game is ready.",
@@ -144,9 +144,9 @@ var russian = phrases{
yourTurnExchange: "%s: меняю фишки, ваш ход.", yourTurnExchange: "%s: меняю фишки, ваш ход.",
yourTurnPass: "%s: пропускаю ход, ваш ход.", yourTurnPass: "%s: пропускаю ход, ваш ход.",
yourTurnMoved: "%s сходил(а), ваш ход.", yourTurnMoved: "%s сходил(а), ваш ход.",
gameOverWon: "🏆 Вы выиграли! Счёт %s", gameOverWon: "Игра окончена — 🏆 Вы выиграли! Счёт %s",
gameOverLost: "Вы проиграли. Счёт %s", gameOverLost: "Игра окончена — Вы проиграли. Счёт %s",
gameOverDraw: "Ничья. Счёт %s", gameOverDraw: "Игра окончена — ничья. Счёт %s",
nudge: "Вас поторопили — ваш ход.", nudge: "Вас поторопили — ваш ход.",
nudgeBy: "%s: Жду Вашего хода 🤭", nudgeBy: "%s: Жду Вашего хода 🤭",
matchFound: "Игра найдена.", matchFound: "Игра найдена.",
@@ -118,7 +118,7 @@ func TestRenderGameOver(t *testing.T) {
cases := []struct{ result, en, ru string }{ cases := []struct{ result, en, ru string }{
{"won", "won", "выиграли"}, {"won", "won", "выиграли"},
{"lost", "lost", "проиграли"}, {"lost", "lost", "проиграли"},
{"draw", "draw", "Ничья"}, {"draw", "draw", "ничья"},
} }
for _, tc := range cases { for _, tc := range cases {
en, ok := Render("game_over", gameOverPayload(gameID, tc.result, "120:95"), "en") en, ok := Render("game_over", gameOverPayload(gameID, tc.result, "120:95"), "en")
+1 -1
View File
@@ -1090,7 +1090,7 @@
<div class="status"> <div class="status">
<span>{view.bagLen === 0 ? t('game.bagEmpty') : t('game.bag', { n: view.bagLen })}</span> <span>{view.bagLen === 0 ? t('game.bagEmpty') : t('game.bag', { n: view.bagLen })}</span>
{#if gameOver} {#if gameOver}
<strong class="over">{t('game.over')}{resultText()}</strong> <strong class="over">{resultText()}</strong>
{:else if placement.pending.length === 0} {:else if placement.pending.length === 0}
<span class="turn-ind">{isMyTurn ? t('game.yourTurn') : turnLabel()}</span> <span class="turn-ind">{isMyTurn ? t('game.yourTurn') : turnLabel()}</span>
{/if} {/if}
-1
View File
@@ -83,7 +83,6 @@ export const en = {
'game.passNoExchange': 'Pass without exchanging', 'game.passNoExchange': 'Pass without exchanging',
'game.confirmResign': 'Resign this game?', 'game.confirmResign': 'Resign this game?',
'game.hintShown': 'Best move: {word} for {n}', 'game.hintShown': 'Best move: {word} for {n}',
'game.over': 'Game over',
'game.won': 'You won', 'game.won': 'You won',
'game.lost': 'You lost', 'game.lost': 'You lost',
'game.tied': 'Draw', 'game.tied': 'Draw',
-1
View File
@@ -84,7 +84,6 @@ export const ru: Record<MessageKey, string> = {
'game.passNoExchange': 'Пас без обмена', 'game.passNoExchange': 'Пас без обмена',
'game.confirmResign': 'Сдаться в этой игре?', 'game.confirmResign': 'Сдаться в этой игре?',
'game.hintShown': 'Лучший ход: {word} на {n}', 'game.hintShown': 'Лучший ход: {word} на {n}',
'game.over': 'Игра окончена',
'game.won': 'Вы выиграли', 'game.won': 'Вы выиграли',
'game.lost': 'Вы проиграли', 'game.lost': 'Вы проиграли',
'game.tied': 'Ничья', 'game.tied': 'Ничья',