From d94c2a105c655eee2d1692459bd04772af10040f Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Mon, 21 Sep 2026 16:58:50 +0700 Subject: [PATCH] feat(web): apply the whole-game UX review's copy proposals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rewrites the strings the review flagged as unclear or misleading: the not_your_turn and not_a_dead_end messages now describe the race or the position they actually answer, need_more_players drops a server constant that had leaked into prose, the per-game score and the room's series score get separate labels instead of sharing "Tỉ số", the opponent-turn fallback reads neutral rather than assuming one opponent, a chat author who left reads as a name rather than a sentence, too_fast drops its odd-one-out "nhé", and the meta description stops promising 1v1 for a 2-4 person game. --- web/e2e/pvp-game.spec.js | 8 +- web/src/app.html | 5 +- web/src/lib/components/ScoreBoard.svelte | 8 +- web/src/lib/i18n/vi.js | 94 +++++++++++++++++++----- 4 files changed, 86 insertions(+), 29 deletions(-) diff --git a/web/e2e/pvp-game.spec.js b/web/e2e/pvp-game.spec.js index 2a13fa6..459c267 100644 --- a/web/e2e/pvp-game.spec.js +++ b/web/e2e/pvp-game.spec.js @@ -322,8 +322,8 @@ test.describe('playing a stranger', () => { // The series score of the room, which the finished game has just moved: // the guest took it, so the owner's lobby shows 1 against their seat. - await expect(host.getByTestId('wins-p2')).toContainText('Tỉ số 1'); - await expect(host.getByTestId('wins-p1')).toContainText('Tỉ số 0'); + await expect(host.getByTestId('wins-p2')).toContainText('Ván thắng 1'); + await expect(host.getByTestId('wins-p1')).toContainText('Ván thắng 0'); await readyAndStart(host, guest); @@ -335,7 +335,7 @@ test.describe('playing a stranger', () => { // And the tally is carried into it, where the board shows it beside // each player's score for this game. - await expect(host.getByTestId('series-p2')).toContainText('Tỉ số 1'); + await expect(host.getByTestId('series-p2')).toContainText('Thắng 1'); await close(); }); @@ -559,7 +559,7 @@ test.describe('playing a stranger', () => { // which on a phone is under a four-seat list and off the screen — so // "Bắt đầu" being refused looked like "Bắt đầu" being broken. // containText, not haveText: the box carries its own dismiss button. - await expect(host.getByTestId('lobby-error')).toContainText('Bạn thao tác quá nhanh'); + await expect(host.getByTestId('lobby-error')).toContainText('Thao tác quá nhanh'); await close(); }); diff --git a/web/src/app.html b/web/src/app.html index 607c790..d94513a 100644 --- a/web/src/app.html +++ b/web/src/app.html @@ -14,7 +14,10 @@ name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content" /> - + Nối Từ