UI: fix last-move highlight, localize move history, clamp zoom overscroll #42
@@ -750,7 +750,7 @@
|
||||
{#each moves as m, i (i)}
|
||||
<li>
|
||||
<span class="hp">{view.game.seats[m.player]?.displayName ?? m.player}</span>
|
||||
<span class="ha">{m.action === 'play' ? m.words.join(', ') : moveActionLabel(m.action)}</span>
|
||||
<span class="ha" class:sys={m.action !== 'play'}>{m.action === 'play' ? m.words.join(', ') : `(${moveActionLabel(m.action)})`}</span>
|
||||
<span class="hs">{m.score} <span class="ht">({m.total})</span></span>
|
||||
</li>
|
||||
{/each}
|
||||
@@ -997,6 +997,11 @@
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
.ha.sys {
|
||||
/* A non-scoring move (pass/exchange/resign/timeout): dimmer and parenthesised so it
|
||||
reads as a system action rather than a scored word. */
|
||||
color: var(--text-muted);
|
||||
}
|
||||
.hs {
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-weight: 600;
|
||||
|
||||
@@ -14,9 +14,9 @@ describe('i18n catalog', () => {
|
||||
});
|
||||
|
||||
it('localizes move-history action labels', () => {
|
||||
expect(translate('ru', 'move.exchange')).toBe('Обмен');
|
||||
expect(translate('ru', 'move.pass')).toBe('Пас');
|
||||
expect(translate('en', 'move.exchange')).toBe('Exchange');
|
||||
expect(translate('ru', 'move.exchange')).toBe('обмен');
|
||||
expect(translate('ru', 'move.pass')).toBe('пас');
|
||||
expect(translate('en', 'move.exchange')).toBe('exchange');
|
||||
});
|
||||
|
||||
it('maps error codes to keys with a generic fallback', () => {
|
||||
|
||||
@@ -88,10 +88,10 @@ export const en = {
|
||||
'game.noHintOptions': 'No options with your letters.',
|
||||
'game.scores': 'Scores: {n}',
|
||||
|
||||
'move.pass': 'Pass',
|
||||
'move.exchange': 'Exchange',
|
||||
'move.resign': 'Resigned',
|
||||
'move.timeout': 'Timed out',
|
||||
'move.pass': 'pass',
|
||||
'move.exchange': 'exchange',
|
||||
'move.resign': 'resign',
|
||||
'move.timeout': 'timeout',
|
||||
|
||||
'result.victory': 'Victory',
|
||||
'result.defeat': 'Defeat',
|
||||
|
||||
@@ -89,10 +89,10 @@ export const ru: Record<MessageKey, string> = {
|
||||
'game.noHintOptions': 'Нет вариантов с вашим набором.',
|
||||
'game.scores': 'Очков: {n}',
|
||||
|
||||
'move.pass': 'Пас',
|
||||
'move.exchange': 'Обмен',
|
||||
'move.resign': 'Сдача',
|
||||
'move.timeout': 'Тайм-аут',
|
||||
'move.pass': 'пас',
|
||||
'move.exchange': 'обмен',
|
||||
'move.resign': 'сдаюсь',
|
||||
'move.timeout': 'тайм-аут',
|
||||
|
||||
'result.victory': 'Победа',
|
||||
'result.defeat': 'Поражение',
|
||||
|
||||
Reference in New Issue
Block a user