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