diff --git a/documentation/README.md b/documentation/README.md index 8e392098..41809be7 100644 --- a/documentation/README.md +++ b/documentation/README.md @@ -34,6 +34,7 @@ MeshCore Open is an open-source Flutter client for MeshCore LoRa mesh networking 21. [UI Design Reference](design.md) - Contributor reference: theme, typography, spacing, shared widgets, sheets vs dialogs vs pages, states, and localization rules for UI changes 22. [Offline Mode](offline-mode.md) - Read-only view of the last radio's contacts, channels and messages while no radio is connected, and the Connect sheet 23. [Performance Profiling](performance-profiling.md) - Contributor reference: frame and memory baselines, HTTP capture retention, and resetting diagnostic recordings +24. [Chess](games.md) - Play and watch chess games on a channel: invites, challenges, time per move, and how moves are sent and checked ## App Overview @@ -49,6 +50,7 @@ MeshCore Open connects to MeshCore LoRa mesh radios over BLE, USB, or TCP. Once - **Configure radio settings** including frequency, power, bandwidth, and spreading factor - **Cache offline maps** for use without internet connectivity - **Analyze line-of-sight** between nodes with terrain elevation profiles +- **Play chess** on a channel, or watch other people's games - **Filter spam** in channels with your own rules and automatic on-device checks - **Use Android Auto** to hear new messages and reply by voice while driving (Android) diff --git a/documentation/ble-protocol.md b/documentation/ble-protocol.md index 88f83dc3..30fe8bea 100644 --- a/documentation/ble-protocol.md +++ b/documentation/ble-protocol.md @@ -282,3 +282,5 @@ Reactions use `r::`. Channel replies Transport-routed raw packets include four transport-code bytes before packed path metadata. For transport floods, the app matches the first two code bytes against locally known region candidates using HMAC-SHA256 over `[payloadType][payload]`. Region scope keys are the first 16 bytes of SHA256 of `#`. The radio's default flood scope is also a candidate, matched on the key the radio reports (it may have been set by another client). The name itself is not carried as plain text. Unknown or ambiguous matches remain null; see [regions](regions.md). Image chunks use `CMD_SEND_CHANNEL_DATA` (62), `RESP_CODE_CHANNEL_DATA_RECV` (27), and application data type `0xAE1C`. The framing, capacities, metadata byte, and XOR recovery algorithm are defined in [image_chunk_transport.dart](../lib/services/image_chunk_transport.dart), which is the source of truth. See [image messages](image-messages.md) for user requirements and limitations. + +Chess games use the same command and response with data type `0x0100`, which is registered to MeshCore Open in the firmware's `docs/number_allocations.md`. The high nibble of the first payload byte names the app feature (`1` = chess v1), so other games can share the data type. The packet layouts are in [chess_packets.dart](../lib/games/chess/chess_packets.dart) and [games](games.md#how-moves-are-sent). diff --git a/documentation/design.md b/documentation/design.md index e3ad907f..dff78bbd 100644 --- a/documentation/design.md +++ b/documentation/design.md @@ -191,6 +191,17 @@ One model is one row inside the existing `MeshCard` (or `SettingsReveal`), rows A dialog that offers several missing models (backup restore) uses the same rows for name, size, status and progress, and keeps its own confirm button. +### Chess board + +`ChessBoardView` (`lib/games/chess/ui/chess_board.dart`) is board content, not chrome, so its squares keep the same classic colours in every theme (`ChessBoardPalette`). Both have strong contrast with the white and black piece vectors (`chess_vectors_flutter`). + +- Last move: both squares get a translucent yellow wash. Check: a red radial glow behind the king. Selected piece: a 3px `primary` border. +- Legal targets: a dark dot on an empty square and a dark ring around a capturable piece, so they differ in shape and not only colour. +- Rank and file labels sit in the corners of the edge squares, in the opposite square colour, at 12–14px. +- The board fills the width (up to 560) and the page scrolls, so it fits a 320dp phone at 2.0× text. + +The channel's games list is a `showMeshSheet` with a `DraggableScrollableSheet`, the same layout as the Add channel sheet. Starting a game closes it and opens a second sheet, so sheets are never stacked. + ## 6. Sheets, dialogs and pages What the code does: diff --git a/documentation/games.md b/documentation/games.md new file mode 100644 index 00000000..7e31c74a --- /dev/null +++ b/documentation/games.md @@ -0,0 +1,58 @@ +# Chess + +Play chess with someone on a channel, or watch other people's games. Moves go over the mesh as small channel data packets, so games suit a slow network: each move can take its time, and anyone on the channel can follow along. + +## Requirements + +- Companion firmware v1.15 or newer, on every radio that plays or watches. Older firmware can't send or receive channel data, and the games sheet says so. +- Everyone involved must be on the same channel (same key). Other MeshCore apps don't show the games, and the moves never appear as chat messages. + +## Start a game + +Open a channel, tap **⋮**, then **Chess games**. The menu shows how many games and invites are open on that channel. + +- **Challenge someone**: pick a person recently heard on this channel. Only they can accept. Their phone shows a notification. +- **Post an open invite**: anyone on the channel can accept. If two people accept at the same time, the inviter's phone picks the first one it heard and tells everyone; the other person keeps watching. + +Choose the **time per move** (no limit, 15 minutes, 1 hour (default), 6 hours, 1 day or 3 days) and **your colour** (random, white or black). Unanswered invites expire after a day. Tap your own invite to cancel it. + +## Play + +The board turns so that your pieces are at the bottom. Tap one of your pieces, then one of the marked squares. A promotion asks which piece you want. + +- **Offer draw** / **Accept draw**. Making a move instead declines an offer. +- **Resign** asks first. +- **Claim win on time** appears when your opponent has gone more than 10 minutes past the time per move. Your phone times it from when it sent your last move; the 10 minutes allow for slow delivery. +- **Ask for update** asks the players to send the latest move again. Use it when a game looks stuck. A player answers within a few seconds, at most once a minute per game. + +Checkmate, stalemate, not enough pieces to mate, the 50-move rule and repetition end the game on their own. + +You get a notification when you're challenged, when it's your move, and when a game ends, unless the channel is muted. Notifications open the channel. + +## Watch + +Every game on the channel shows up under **Live games**. If you joined late, the board appears with the next move, because each move carries the whole position. Moves from before you joined show as "(missed)". Until you've heard how the game started, the players are marked as not confirmed; **Ask for update** fetches that. + +Finished games stay in the list for a week. Tap **✕** to remove one sooner. + +## How moves are sent + +Each packet starts with a 4-byte header: app and packet kind, a random 2-byte game ID, and the half-move number. Kinds are invite, accept, decline, move, resign, draw offer, draw accept, cancel, timeout claim, game info and request. + +A move is 49 bytes or less, which fills four 16-byte encrypted blocks on air: + +| Field | Bytes | +|---|---| +| Header | 4 | +| Minutes since the game started | 2 | +| Move, as its index in the sorted list of legal moves | 1 | +| Chain value (see below) | 16 | +| Position after the move | ≤26 | + +The position is an 8-byte map of occupied squares, 2 bytes for side to move, castling, en passant and the 50-move counter, then half a byte per piece. + +**Checking who moved.** Each player's phone makes a secret value and hashes it 512 times. Only the last hash is sent, in the invite or accept. Each later action reveals the hash one step back, which anyone can check with a single hash but nobody else can produce. A packet with a value that doesn't fit the player's chain is ignored. If two different packets arrive with the same value, the first one heard counts. Player names are not checked; the chain is. + +Players also check that the move gives the position in the packet. Spectators who missed moves take the position as it is. + +Your secret values stay on your phone, stored per radio with the rest of the game. diff --git a/lib/connector/meshcore_connector.dart b/lib/connector/meshcore_connector.dart index 5025a727..564b9b91 100644 --- a/lib/connector/meshcore_connector.dart +++ b/lib/connector/meshcore_connector.dart @@ -726,7 +726,8 @@ class MeshCoreConnector extends ChangeNotifier { /// channel sync, or null for an empty or unknown slot. String? channelIdForSlot(int slot) => _slotChannelIds[slot]; - @visibleForTesting + /// True once slot numbers can be trusted for this session (the channel + /// slot map was read or restored). bool get channelMapConfirmed => _channelMapConfirmed; Stream get receivedFrames => _receivedFramesController.stream; Uint8List? get selfPublicKey => _selfPublicKey; @@ -5917,6 +5918,35 @@ class MeshCoreConnector extends ChangeNotifier { return sentAll; } + /// Sends one application [payload] as a GRP_DATA packet on [channelIndex] + /// with the given [dataType], flooded on the channel's region scope. + /// + /// Like [sendImageChunks] the command ACK only means the radio queued the + /// packet; GRP_DATA is never acknowledged end to end. Returns false when the + /// transport is unavailable; throws like [_sendFrameAndWaitForCommandAck]. + Future sendChannelData({ + required int channelIndex, + required int dataType, + required Uint8List payload, + }) async { + if (!supportsChannelData) return false; + var sent = false; + await _runScopedChannelSend(() async { + if (!isConnected) return; + await _waitForRadioQuiet(lastInboundRxTime: _lastChannelMsgRxTime); + await _sendFrameAndWaitForCommandAck( + buildSendChannelDataFrame( + channelIndex: channelIndex, + dataType: dataType, + payload: payload, + pathLen: outPathUnknown, + ), + ); + sent = true; + }, region: _channelSendScope(channelIndex)); + return sent; + } + Future _transmitImageBlobs( List blobs, { required int channelIndex, diff --git a/lib/games/chess/chess_game.dart b/lib/games/chess/chess_game.dart new file mode 100644 index 00000000..ecf80bf4 --- /dev/null +++ b/lib/games/chess/chess_game.dart @@ -0,0 +1,450 @@ +import 'dart:convert'; +import 'dart:typed_data'; + +import 'package:chess/chess.dart' as rules; + +import '../hash_chain.dart'; +import 'chess_packets.dart'; +import 'chess_position_codec.dart'; + +enum ChessSide { + white, + black; + + ChessSide get other => this == white ? black : white; + + /// Side that makes half-move [ply] (ply 1 is white's first move). + static ChessSide moverOfPly(int ply) => ply.isOdd ? white : black; +} + +enum ChessGameStatus { + /// An invite nobody has accepted yet. + invite, + + /// We accepted; waiting for the inviter's confirmation (a game info + /// packet listing our commitment). + starting, + active, + finished, +} + +enum ChessEndReason { + checkmate, + resignation, + timeout, + drawAgreed, + stalemate, + insufficientMaterial, + fiftyMoves, + repetition, + cancelled, + declined, + expired, + + /// Someone else's accept was confirmed for an invite we accepted. + taken, +} + +/// One player's identity in a game: their name (unauthenticated) and the +/// hash chain values verified so far. +class ChessPlayer { + final String name; + final Uint8List commitment; + Uint8List lastValue; + int lastIndex; + + ChessPlayer({ + required this.name, + required this.commitment, + Uint8List? lastValue, + this.lastIndex = 0, + }) : lastValue = lastValue ?? commitment; + + /// Accepts [value] when it extends this player's chain, returning true. + bool verifyAndAdvance(Uint8List value) { + final steps = hashChainDistance(value, lastValue); + if (steps == null || steps == 0) return false; + lastValue = value; + lastIndex += steps; + return true; + } + + /// True when [value] is on this player's chain at or after the last + /// verified value (a valid new value or an exact duplicate). + bool owns(Uint8List value) => hashChainDistance(value, lastValue) != null; + + Map toJson() => { + 'name': name, + 'commitment': _hex(commitment), + 'last': _hex(lastValue), + 'index': lastIndex, + }; + + static ChessPlayer? fromJson(Object? json) { + if (json is! Map) return null; + final name = json['name']; + final commitment = _unhex(json['commitment']); + if (name is! String || commitment == null) return null; + return ChessPlayer( + name: name, + commitment: commitment, + lastValue: _unhex(json['last']) ?? commitment, + lastIndex: json['index'] is int ? json['index'] as int : 0, + ); + } +} + +/// State of one chess game on one channel, as seen from this radio. +class ChessGame { + static const String startFen = + 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1'; + + final String channelId; + final int gameId; + + ChessGameStatus status; + ChessDeadline deadline; + ChessColourPreference colourPreference; + + /// From the invite. Null when we only heard the game later. + ChessPlayer? inviter; + String? targetName; + ChessPlayer? white; + ChessPlayer? black; + + /// Our own chain seed (hex) when we are a player or the inviter. + String? mySeedHex; + int myNextChainIndex; + + /// Which side we play, or null when watching. + ChessSide? mySide; + + /// True when we posted the invite. + bool iAmInviter; + + /// Position the move history below starts from: the start position, or a + /// position adopted after missed moves. + String baseFen; + List uciSinceBase; + + /// SAN of each half-move so far; null for moves we never heard. + List sanMoves; + int ply; + String fen; + + /// Whether [fen] is known. False for a game first heard through a game + /// info packet, until a move arrives. + bool hasPosition; + String? lastMoveUci; + + /// Latest move packet heard or sent, kept so any holder can re-send it. + Uint8List? lastMovePacket; + + ChessSide? drawOfferedBy; + ChessSide? winner; + ChessEndReason? endReason; + + int createdAtMs; + int? startedAtMs; + int lastMoveAtMs; + int lastActivityMs; + int? lastAnsweredRequestAtMs; + + rules.Chess? _board; + + ChessGame({ + required this.channelId, + required this.gameId, + required this.status, + required this.deadline, + this.colourPreference = ChessColourPreference.random, + this.inviter, + this.targetName, + this.white, + this.black, + this.mySeedHex, + this.myNextChainIndex = 1, + this.mySide, + this.iAmInviter = false, + String? baseFen, + List? uciSinceBase, + List? sanMoves, + this.ply = 0, + String? fen, + this.hasPosition = true, + this.lastMoveUci, + this.lastMovePacket, + this.drawOfferedBy, + this.winner, + this.endReason, + required this.createdAtMs, + this.startedAtMs, + int? lastMoveAtMs, + int? lastActivityMs, + this.lastAnsweredRequestAtMs, + }) : baseFen = baseFen ?? startFen, + uciSinceBase = uciSinceBase ?? [], + sanMoves = sanMoves ?? [], + fen = fen ?? startFen, + lastMoveAtMs = lastMoveAtMs ?? createdAtMs, + lastActivityMs = lastActivityMs ?? createdAtMs; + + String get key => gameKey(channelId, gameId); + + static String gameKey(String channelId, int gameId) => '$channelId:$gameId'; + + bool get isPlayer => mySide != null; + bool get isOpen => status != ChessGameStatus.finished; + + /// Players are known (we can verify their actions). + bool get hasPlayers => white != null && black != null; + + ChessSide get sideToMove => ChessSide.moverOfPly(ply + 1); + + bool get isMyTurn => + status == ChessGameStatus.active && hasPosition && mySide == sideToMove; + + ChessPlayer? playerOf(ChessSide side) => + side == ChessSide.white ? white : black; + + String? nameOf(ChessSide side) => playerOf(side)?.name; + + /// Which side's chain [value] belongs to, if any. + ChessSide? sideOwning(Uint8List value) { + if (white?.owns(value) ?? false) return ChessSide.white; + if (black?.owns(value) ?? false) return ChessSide.black; + return null; + } + + HashChain? get myChain { + final seed = _unhex(mySeedHex); + return seed == null ? null : HashChain(seed); + } + + /// The next value of our chain, advancing the counter. + Uint8List? takeMyChainValue() { + final chain = myChain; + if (chain == null || myNextChainIndex > HashChain.length) return null; + return chain.valueAt(myNextChainIndex++); + } + + /// Rules engine at the current position, with as much history as we have + /// (needed for repetition). + rules.Chess get board { + final cached = _board; + if (cached != null) return cached; + final b = rules.Chess.fromFEN(baseFen, check_validity: false); + for (final uci in uciSinceBase) { + final move = findLegalMove(b, uci); + if (move == null) break; + b.move(move); + } + if (b.fen != fen) { + // History did not replay cleanly; fall back to the position alone. + return _board = rules.Chess.fromFEN(fen, check_validity: false); + } + return _board = b; + } + + /// Legal moves in the current position as UCI strings, sorted. A move's + /// index in this list is what a move packet carries. + List legalUci() => sortedLegalUci(board); + + /// Applies the move with UCI [uci] by [side] as half-move [ply] + 1. + /// Returns false when it is not legal. + bool applyUci(String uci) { + final b = board; + final move = findLegalMove(b, uci); + if (move == null) return false; + final san = b.move_to_san(move); + b.move(move); + ply++; + sanMoves.add(san); + uciSinceBase.add(uci); + fen = b.fen; + lastMoveUci = uci; + drawOfferedBy = null; + _checkGameOver(b); + return true; + } + + /// Takes [newFen] as the position after half-move [newPly], marking the + /// moves in between as unknown. + void adoptPosition(String newFen, int newPly) { + while (sanMoves.length < newPly) { + sanMoves.add(null); + } + if (sanMoves.length > newPly) sanMoves.removeRange(newPly, sanMoves.length); + ply = newPly; + baseFen = newFen; + fen = newFen; + uciSinceBase = []; + lastMoveUci = null; + hasPosition = true; + drawOfferedBy = null; + _board = null; + _checkGameOver(board); + } + + void _checkGameOver(rules.Chess b) { + if (status != ChessGameStatus.active) return; + ChessEndReason? reason; + if (b.in_checkmate) { + reason = ChessEndReason.checkmate; + winner = ChessSide.moverOfPly(ply); + } else if (b.in_stalemate) { + reason = ChessEndReason.stalemate; + } else if (b.insufficient_material) { + reason = ChessEndReason.insufficientMaterial; + } else if (b.half_moves >= 100) { + reason = ChessEndReason.fiftyMoves; + } else if (b.in_threefold_repetition) { + reason = ChessEndReason.repetition; + } + if (reason != null) finish(reason, winner: winner); + } + + void finish(ChessEndReason reason, {ChessSide? winner}) { + status = ChessGameStatus.finished; + endReason = reason; + this.winner = winner; + drawOfferedBy = null; + } + + /// The packed position for the current [fen]. + Uint8List packedPosition() => ChessPositionCodec.encodeFen(fen); + + /// Minutes since the game started, for move packets. + int minutesSinceStart(int nowMs) { + final start = startedAtMs ?? createdAtMs; + return ((nowMs - start) ~/ 60000).clamp(0, 0xFFFF); + } + + Map toJson() => { + 'channel': channelId, + 'id': gameId, + 'status': status.name, + 'deadline': deadline.code, + 'colour': colourPreference.code, + if (inviter != null) 'inviter': inviter!.toJson(), + if (targetName != null) 'target': targetName, + if (white != null) 'white': white!.toJson(), + if (black != null) 'black': black!.toJson(), + if (mySeedHex != null) 'seed': mySeedHex, + 'nextChain': myNextChainIndex, + if (mySide != null) 'side': mySide!.name, + 'inviterSelf': iAmInviter, + 'baseFen': baseFen, + 'uci': uciSinceBase, + 'san': sanMoves, + 'ply': ply, + 'fen': fen, + 'hasPosition': hasPosition, + if (lastMoveUci != null) 'lastUci': lastMoveUci, + if (lastMovePacket != null) 'lastPacket': base64Encode(lastMovePacket!), + if (drawOfferedBy != null) 'draw': drawOfferedBy!.name, + if (winner != null) 'winner': winner!.name, + if (endReason != null) 'end': endReason!.name, + 'created': createdAtMs, + if (startedAtMs != null) 'started': startedAtMs, + 'lastMove': lastMoveAtMs, + 'activity': lastActivityMs, + }; + + static ChessGame? fromJson(Object? json) { + if (json is! Map) return null; + try { + final channel = json['channel']; + final id = json['id']; + final created = json['created']; + if (channel is! String || id is! int || created is! int) return null; + final packet = json['lastPacket']; + return ChessGame( + channelId: channel, + gameId: id, + status: _enumByName( + ChessGameStatus.values, + json['status'], + ChessGameStatus.finished, + ), + deadline: ChessDeadline.fromCode(_int(json['deadline']) ?? 0), + colourPreference: ChessColourPreference.fromCode( + _int(json['colour']) ?? 0, + ), + inviter: ChessPlayer.fromJson(json['inviter']), + targetName: json['target'] as String?, + white: ChessPlayer.fromJson(json['white']), + black: ChessPlayer.fromJson(json['black']), + mySeedHex: json['seed'] as String?, + myNextChainIndex: _int(json['nextChain']) ?? 1, + mySide: _enumByNameOrNull(ChessSide.values, json['side']), + iAmInviter: json['inviterSelf'] == true, + baseFen: json['baseFen'] as String?, + uciSinceBase: (json['uci'] as List?)?.whereType().toList(), + sanMoves: (json['san'] as List?)?.map((e) => e as String?).toList(), + ply: _int(json['ply']) ?? 0, + fen: json['fen'] as String?, + hasPosition: json['hasPosition'] != false, + lastMoveUci: json['lastUci'] as String?, + lastMovePacket: packet is String ? base64Decode(packet) : null, + drawOfferedBy: _enumByNameOrNull(ChessSide.values, json['draw']), + winner: _enumByNameOrNull(ChessSide.values, json['winner']), + endReason: _enumByNameOrNull(ChessEndReason.values, json['end']), + createdAtMs: created, + startedAtMs: _int(json['started']), + lastMoveAtMs: _int(json['lastMove']), + lastActivityMs: _int(json['activity']), + ); + } catch (_) { + return null; + } + } +} + +/// Legal moves of [board] as sorted UCI strings. +List sortedLegalUci(rules.Chess board) { + final moves = board.moves({'asObjects': true}).cast(); + return moves.map(moveToUci).toList()..sort(); +} + +String moveToUci(rules.Move m) => + '${m.fromAlgebraic}${m.toAlgebraic}${m.promotion?.name ?? ''}'; + +rules.Move? findLegalMove(rules.Chess board, String uci) { + for (final m in board.moves({'asObjects': true}).cast()) { + if (moveToUci(m) == uci) return m; + } + return null; +} + +/// Whether [fen] describes a position the rules engine accepts. +bool isValidFen(String fen) => rules.Chess.validate_fen(fen)['valid'] == true; + +int? _int(Object? v) => v is int ? v : null; + +T _enumByName(List values, Object? name, T fallback) => + _enumByNameOrNull(values, name) ?? fallback; + +T? _enumByNameOrNull(List values, Object? name) { + if (name is! String) return null; + for (final v in values) { + if (v.name == name) return v; + } + return null; +} + +String _hex(List bytes) => + bytes.map((b) => b.toRadixString(16).padLeft(2, '0')).join(); + +Uint8List? _unhex(Object? hex) { + if (hex is! String || hex.length.isOdd) return null; + final out = Uint8List(hex.length ~/ 2); + for (var i = 0; i < out.length; i++) { + final v = int.tryParse(hex.substring(i * 2, i * 2 + 2), radix: 16); + if (v == null) return null; + out[i] = v; + } + return out; +} + +String bytesToHex(List bytes) => _hex(bytes); diff --git a/lib/games/chess/chess_link.dart b/lib/games/chess/chess_link.dart new file mode 100644 index 00000000..ad1d0e17 --- /dev/null +++ b/lib/games/chess/chess_link.dart @@ -0,0 +1,184 @@ +import 'dart:async'; +import 'dart:ui' show Locale; + +import 'package:flutter/foundation.dart'; + +import '../../connector/meshcore_connector.dart'; +import '../../l10n/app_localizations.dart'; +import '../../l10n/locale_tag.dart'; +import '../../services/app_settings_service.dart'; +import '../../services/image_chunk_transport.dart'; +import '../../services/notification_reply.dart'; +import '../../services/notification_service.dart'; +import '../../storage/prefs_manager.dart'; +import '../game_packet.dart'; + +/// A game payload heard on a channel. +class ChessIncoming { + final String channelId; + final Uint8List payload; + + const ChessIncoming(this.channelId, this.payload); +} + +/// What the chess service needs from the radio. [ConnectorChessLink] is the +/// app's implementation; tests use an in-memory one. +abstract class ChessLink implements Listenable { + Stream get incoming; + + /// Sends [payload] on the channel with storage id [channelId]. + Future send(String channelId, Uint8List payload); + + /// Our advert name. + String get selfName; + + /// Per-radio storage scope (10 hex chars), or '' when unknown. + String get storageScope; + + bool get canSend; + + /// Shows a notification for a game event on [channelId], honouring the + /// channel's notification mode. + void notify(String channelId, String text); + + /// Localized strings for notification text. + AppLocalizations get l10n; +} + +/// [ChessLink] over [MeshCoreConnector]. Listens to the public frame stream +/// for GRP_DATA with [meshcoreOpenDataType] and sends with +/// [MeshCoreConnector.sendChannelData]; nothing else in the connector is +/// involved. +class ConnectorChessLink extends ChangeNotifier implements ChessLink { + static const int _maxBuffered = 64; + + final MeshCoreConnector connector; + final AppSettingsService? settings; + final StreamController _incoming = + StreamController.broadcast(); + final List _awaitingMap = []; + StreamSubscription? _frames; + String _lastScope = ''; + String _lastName = ''; + bool _lastCanSend = false; + + ConnectorChessLink(this.connector, {this.settings}) { + _frames = connector.receivedFrames.listen(_onFrame); + connector.addListener(_onConnectorChanged); + _lastScope = storageScope; + _lastName = selfName; + _lastCanSend = canSend; + } + + void _onFrame(Uint8List frame) { + if (frame.isEmpty || frame[0] != respCodeChannelDataRecv) return; + final parsed = parseChannelDataFrame(frame); + if (parsed == null || parsed.dataType != meshcoreOpenDataType) return; + if (GamePacketHeader.appOf(parsed.payload) != GameApp.chess) return; + if (!connector.channelMapConfirmed) { + // Slot numbers are not trustworthy until the channel list is loaded. + if (_awaitingMap.length >= _maxBuffered) _awaitingMap.removeAt(0); + _awaitingMap.add(parsed); + return; + } + _emit(parsed); + } + + void _emit(ParsedChannelData parsed) { + final channelId = connector.channelIdForSlot(parsed.channelIndex); + if (channelId == null) return; + _incoming.add(ChessIncoming(channelId, parsed.payload)); + } + + void _onConnectorChanged() { + if (connector.channelMapConfirmed && _awaitingMap.isNotEmpty) { + final pending = List.of(_awaitingMap); + _awaitingMap.clear(); + pending.forEach(_emit); + } + final scope = storageScope; + final name = selfName; + final can = canSend; + if (scope != _lastScope || name != _lastName || can != _lastCanSend) { + _lastScope = scope; + _lastName = name; + _lastCanSend = can; + notifyListeners(); + } + } + + @override + Stream get incoming => _incoming.stream; + + @override + Future send(String channelId, Uint8List payload) async { + final slot = connector.channels + .where((c) => c.storageId == channelId) + .map((c) => c.index) + .firstOrNull; + if (slot == null) return false; + try { + return await connector.sendChannelData( + channelIndex: slot, + dataType: meshcoreOpenDataType, + payload: payload, + ); + } catch (_) { + return false; + } + } + + @override + String get selfName => connector.selfName ?? ''; + + @override + String get storageScope { + final key = connector.storageKeyHex; + return key.length >= 10 ? key.substring(0, 10) : ''; + } + + @override + bool get canSend => connector.supportsChannelData; + + @override + void notify(String channelId, String text) { + final s = settings?.settings; + if (s == null || !s.notificationsEnabled || !s.notifyOnNewChannelMessage) { + return; + } + final channel = connector.channels + .where((c) => c.storageId == channelId) + .firstOrNull; + if (channel == null) return; + final mode = settings!.getChannelNotificationMode(channel.muteKey); + if (mode == ChannelNotificationMode.muted) return; + unawaited( + NotificationService().showChannelMessageNotification( + channelName: channel.muteKey, + senderName: l10n.chess_notificationSender, + message: text, + urlImagesEnabled: false, + channelIndex: channel.index, + ), + ); + } + + @override + AppLocalizations get l10n { + try { + final tag = PrefsManager.instance.getString(notificationLanguagePrefsKey); + if (tag != null && tag.isNotEmpty) { + return lookupAppLocalizations(localeFromTag(tag)); + } + } catch (_) {} + return lookupAppLocalizations(const Locale('en')); + } + + @override + void dispose() { + _frames?.cancel(); + connector.removeListener(_onConnectorChanged); + _incoming.close(); + super.dispose(); + } +} diff --git a/lib/games/chess/chess_packets.dart b/lib/games/chess/chess_packets.dart new file mode 100644 index 00000000..2b4462d4 --- /dev/null +++ b/lib/games/chess/chess_packets.dart @@ -0,0 +1,396 @@ +import 'dart:typed_data'; + +import '../game_packet.dart'; +import '../hash_chain.dart'; + +/// Packet kinds of chess v1 (the low nibble of the first payload byte). +enum ChessPacketKind { + invite(0), + accept(1), + decline(2), + move(3), + resign(4), + drawOffer(5), + drawAccept(6), + cancel(7), + timeoutClaim(8), + info(9), + request(10); + + final int code; + const ChessPacketKind(this.code); + + static ChessPacketKind? fromCode(int code) { + for (final k in values) { + if (k.code == code) return k; + } + return null; + } +} + +/// Colour the inviter wants to play. +enum ChessColourPreference { + random(0), + white(1), + black(2); + + final int code; + const ChessColourPreference(this.code); + + static ChessColourPreference fromCode(int code) => + values.firstWhere((v) => v.code == code, orElse: () => random); +} + +/// Per-move deadline choices, carried as one byte. +enum ChessDeadline { + none(0, null), + min15(1, Duration(minutes: 15)), + hour1(2, Duration(hours: 1)), + hours6(3, Duration(hours: 6)), + day1(4, Duration(days: 1)), + days3(5, Duration(days: 3)); + + final int code; + final Duration? duration; + const ChessDeadline(this.code, this.duration); + + static const ChessDeadline defaultValue = hour1; + + static ChessDeadline fromCode(int code) => + values.firstWhere((v) => v.code == code, orElse: () => defaultValue); +} + +/// A decoded chess packet. [ply] is the half-move number modulo 256. +sealed class ChessPacket { + final int gameId; + final int ply; + + const ChessPacket({required this.gameId, required this.ply}); + + ChessPacketKind get kind; + + Uint8List encode() { + final out = BytesBuilder(); + GamePacketHeader( + app: GameApp.chess, + kind: kind.code, + gameId: gameId, + ply: ply, + ).writeTo(out); + writeBody(out); + return out.toBytes(); + } + + void writeBody(BytesBuilder out); + + /// Decodes a chess payload, or null when it is not one or is malformed. + static ChessPacket? decode(Uint8List payload) { + final header = GamePacketHeader.parse(payload); + if (header == null || header.app != GameApp.chess) return null; + final kind = ChessPacketKind.fromCode(header.kind); + if (kind == null) return null; + final r = GamePacketReader(payload, GamePacketHeader.length); + final id = header.gameId; + final ply = header.ply; + final ChessPacket? packet = switch (kind) { + ChessPacketKind.invite => ChessInvitePacket._read(id, ply, r), + ChessPacketKind.accept => ChessAcceptPacket._read(id, ply, r), + ChessPacketKind.decline => ChessDeclinePacket._read(id, ply, r), + ChessPacketKind.move => ChessMovePacket._read(id, ply, r), + ChessPacketKind.resign || + ChessPacketKind.drawOffer || + ChessPacketKind.drawAccept || + ChessPacketKind.cancel || + ChessPacketKind.timeoutClaim => ChessActionPacket._read(kind, id, ply, r), + ChessPacketKind.info => ChessInfoPacket._read(id, ply, r), + ChessPacketKind.request => ChessRequestPacket._read(id, ply, r), + }; + if (packet == null || r.failed) return null; + return packet; + } +} + +/// Open invite, or a direct challenge when [targetName] is set. +class ChessInvitePacket extends ChessPacket { + final ChessDeadline deadline; + final ChessColourPreference colour; + final Uint8List commitment; + final String inviterName; + final String? targetName; + + const ChessInvitePacket({ + required super.gameId, + required this.deadline, + required this.colour, + required this.commitment, + required this.inviterName, + this.targetName, + }) : super(ply: 0); + + bool get isDirect => targetName != null; + + @override + ChessPacketKind get kind => ChessPacketKind.invite; + + @override + void writeBody(BytesBuilder out) { + out + ..addByte(deadline.code) + ..addByte(colour.code | (isDirect ? 0x04 : 0)) + ..add(commitment); + writeShortString(out, inviterName); + if (targetName != null) writeShortString(out, targetName!); + } + + static ChessInvitePacket? _read(int id, int ply, GamePacketReader r) { + final deadline = r.u8(); + final flags = r.u8(); + final commitment = r.bytes(HashChain.valueBytes); + final name = r.shortString(); + if (deadline == null || flags == null || commitment == null) return null; + if (name == null) return null; + String? target; + if (flags & 0x04 != 0) { + target = r.shortString(); + if (target == null) return null; + } + return ChessInvitePacket( + gameId: id, + deadline: ChessDeadline.fromCode(deadline), + colour: ChessColourPreference.fromCode(flags & 0x03), + commitment: commitment, + inviterName: name, + targetName: target, + ); + } +} + +class ChessAcceptPacket extends ChessPacket { + final Uint8List commitment; + final String accepterName; + + const ChessAcceptPacket({ + required super.gameId, + required this.commitment, + required this.accepterName, + }) : super(ply: 0); + + @override + ChessPacketKind get kind => ChessPacketKind.accept; + + @override + void writeBody(BytesBuilder out) { + out.add(commitment); + writeShortString(out, accepterName); + } + + static ChessAcceptPacket? _read(int id, int ply, GamePacketReader r) { + final commitment = r.bytes(HashChain.valueBytes); + final name = r.shortString(); + if (commitment == null || name == null) return null; + return ChessAcceptPacket( + gameId: id, + commitment: commitment, + accepterName: name, + ); + } +} + +/// A declined direct challenge. Not authenticated; only the inviter acts on +/// it, and only for a challenge addressed to [declinerName]. +class ChessDeclinePacket extends ChessPacket { + final String declinerName; + + const ChessDeclinePacket({required super.gameId, required this.declinerName}) + : super(ply: 0); + + @override + ChessPacketKind get kind => ChessPacketKind.decline; + + @override + void writeBody(BytesBuilder out) => writeShortString(out, declinerName); + + static ChessDeclinePacket? _read(int id, int ply, GamePacketReader r) { + final name = r.shortString(); + if (name == null) return null; + return ChessDeclinePacket(gameId: id, declinerName: name); + } +} + +/// One half-move. [ply] is the number of the half-move being made (the first +/// move of the game has ply 1). [position] is the packed position after it. +class ChessMovePacket extends ChessPacket { + final int minutes; + final int moveIndex; + final Uint8List chainValue; + final Uint8List position; + + const ChessMovePacket({ + required super.gameId, + required super.ply, + required this.minutes, + required this.moveIndex, + required this.chainValue, + required this.position, + }); + + @override + ChessPacketKind get kind => ChessPacketKind.move; + + @override + void writeBody(BytesBuilder out) { + writeU16(out, minutes); + out + ..addByte(moveIndex) + ..add(chainValue) + ..add(position); + } + + static ChessMovePacket? _read(int id, int ply, GamePacketReader r) { + final minutes = r.u16(); + final index = r.u8(); + final chain = r.bytes(HashChain.valueBytes); + final position = r.rest(); + if (minutes == null || index == null || chain == null) return null; + if (position == null || position.isEmpty) return null; + return ChessMovePacket( + gameId: id, + ply: ply, + minutes: minutes, + moveIndex: index, + chainValue: chain, + position: position, + ); + } +} + +/// Resign, draw offer, draw accept, cancel invite or timeout claim: an +/// authenticated action with no other data. +class ChessActionPacket extends ChessPacket { + @override + final ChessPacketKind kind; + final int minutes; + final Uint8List chainValue; + + const ChessActionPacket({ + required this.kind, + required super.gameId, + required super.ply, + required this.minutes, + required this.chainValue, + }); + + @override + void writeBody(BytesBuilder out) { + writeU16(out, minutes); + out.add(chainValue); + } + + static ChessActionPacket? _read( + ChessPacketKind kind, + int id, + int ply, + GamePacketReader r, + ) { + final minutes = r.u16(); + final chain = r.bytes(HashChain.valueBytes); + if (minutes == null || chain == null) return null; + return ChessActionPacket( + kind: kind, + gameId: id, + ply: ply, + minutes: minutes, + chainValue: chain, + ); + } +} + +/// Everything a late spectator needs to follow and verify a game. +class ChessInfoPacket extends ChessPacket { + final int startedAtUnix; + final ChessDeadline deadline; + final Uint8List whiteCommitment; + final Uint8List blackCommitment; + final String whiteName; + final String blackName; + + const ChessInfoPacket({ + required super.gameId, + required super.ply, + required this.startedAtUnix, + required this.deadline, + required this.whiteCommitment, + required this.blackCommitment, + required this.whiteName, + required this.blackName, + }); + + @override + ChessPacketKind get kind => ChessPacketKind.info; + + @override + void writeBody(BytesBuilder out) { + writeU32(out, startedAtUnix); + out + ..addByte(deadline.code) + ..addByte(0) // flags, reserved + ..add(whiteCommitment) + ..add(blackCommitment); + writeShortString(out, whiteName); + writeShortString(out, blackName); + } + + static ChessInfoPacket? _read(int id, int ply, GamePacketReader r) { + final started = r.u32(); + final deadline = r.u8(); + r.u8(); // flags + final white = r.bytes(HashChain.valueBytes); + final black = r.bytes(HashChain.valueBytes); + final whiteName = r.shortString(); + final blackName = r.shortString(); + if (started == null || deadline == null || white == null) return null; + if (black == null || whiteName == null || blackName == null) return null; + return ChessInfoPacket( + gameId: id, + ply: ply, + startedAtUnix: started, + deadline: ChessDeadline.fromCode(deadline), + whiteCommitment: white, + blackCommitment: black, + whiteName: whiteName, + blackName: blackName, + ); + } +} + +/// Asks the players for the game info and/or the latest move. [ply] is the +/// last half-move the requester has. +class ChessRequestPacket extends ChessPacket { + final bool wantsInfo; + final bool wantsLatestMove; + + const ChessRequestPacket({ + required super.gameId, + required super.ply, + this.wantsInfo = false, + this.wantsLatestMove = false, + }); + + @override + ChessPacketKind get kind => ChessPacketKind.request; + + @override + void writeBody(BytesBuilder out) => + out.addByte((wantsInfo ? 1 : 0) | (wantsLatestMove ? 2 : 0)); + + static ChessRequestPacket? _read(int id, int ply, GamePacketReader r) { + final flags = r.u8(); + if (flags == null) return null; + return ChessRequestPacket( + gameId: id, + ply: ply, + wantsInfo: flags & 1 != 0, + wantsLatestMove: flags & 2 != 0, + ); + } +} diff --git a/lib/games/chess/chess_position_codec.dart b/lib/games/chess/chess_position_codec.dart new file mode 100644 index 00000000..9d44245c --- /dev/null +++ b/lib/games/chess/chess_position_codec.dart @@ -0,0 +1,143 @@ +import 'dart:typed_data'; + +/// Packs a chess position into at most [maxBytes] bytes and back. +/// +/// Layout: +/// * 8 bytes: occupancy bitboard, bit `i` = square `i` (a1 = 0 … h8 = 63), +/// byte `i >> 3`, bit `i & 7`. +/// * 2 bytes (LE): bit 0 black to move, bits 1–4 castling K Q k q, +/// bits 5–8 en-passant file + 1 (0 = none), bits 9–15 halfmove clock +/// (capped at 127). +/// * One nibble per occupied square in square order, high nibble first: +/// bit 3 black, bits 0–2 piece (pawn 0, knight 1, bishop 2, rook 3, +/// queen 4, king 5). Padded with a zero nibble to a whole byte. +/// +/// The full-move number is not packed; it follows from the game's ply. +abstract final class ChessPositionCodec { + static const int maxBytes = 26; + static const int _fixedBytes = 10; + static const String _pieces = 'pnbrqk'; + + /// Packs the first four FEN fields plus the halfmove clock of [fen]. + /// Throws [FormatException] for a malformed FEN. + static Uint8List encodeFen(String fen) { + final fields = fen.trim().split(RegExp(r'\s+')); + if (fields.length < 4) throw FormatException('Bad FEN', fen); + final ranks = fields[0].split('/'); + if (ranks.length != 8) throw FormatException('Bad FEN board', fen); + + final occupancy = Uint8List(8); + final nibbles = []; + final squares = List.filled(64, null); + for (var r = 0; r < 8; r++) { + final rank = 7 - r; // FEN lists rank 8 first. + var file = 0; + for (final ch in ranks[r].split('')) { + final digit = int.tryParse(ch); + if (digit != null) { + file += digit; + continue; + } + final type = _pieces.indexOf(ch.toLowerCase()); + if (type < 0 || file > 7) throw FormatException('Bad piece', fen); + final black = ch == ch.toLowerCase(); + squares[rank * 8 + file] = (black ? 8 : 0) | type; + file++; + } + if (file != 8) throw FormatException('Bad rank', fen); + } + for (var sq = 0; sq < 64; sq++) { + final piece = squares[sq]; + if (piece == null) continue; + occupancy[sq >> 3] |= 1 << (sq & 7); + nibbles.add(piece); + } + if (nibbles.length > 32) throw FormatException('Too many pieces', fen); + + var state = fields[1] == 'b' ? 1 : 0; + final castling = fields[2]; + if (castling.contains('K')) state |= 1 << 1; + if (castling.contains('Q')) state |= 1 << 2; + if (castling.contains('k')) state |= 1 << 3; + if (castling.contains('q')) state |= 1 << 4; + final ep = fields[3]; + if (ep != '-') { + final file = ep.codeUnitAt(0) - 'a'.codeUnitAt(0); + if (file < 0 || file > 7) throw FormatException('Bad en passant', fen); + state |= (file + 1) << 5; + } + final halfmove = fields.length > 4 ? int.tryParse(fields[4]) ?? 0 : 0; + state |= (halfmove.clamp(0, 127)) << 9; + + final out = BytesBuilder() + ..add(occupancy) + ..addByte(state & 0xFF) + ..addByte((state >> 8) & 0xFF); + for (var i = 0; i < nibbles.length; i += 2) { + final hi = nibbles[i]; + final lo = i + 1 < nibbles.length ? nibbles[i + 1] : 0; + out.addByte((hi << 4) | lo); + } + return out.toBytes(); + } + + /// Unpacks [bytes] into a FEN with [fullMoveNumber]. Returns null when the + /// bytes are malformed (wrong length for the occupancy, bad piece codes). + /// Does not check that the position is legal. + static String? decodeToFen(Uint8List bytes, {required int fullMoveNumber}) { + if (bytes.length < _fixedBytes) return null; + final squares = []; + for (var sq = 0; sq < 64; sq++) { + if (bytes[sq >> 3] & (1 << (sq & 7)) != 0) squares.add(sq); + } + if (squares.length > 32) return null; + if (bytes.length != _fixedBytes + (squares.length + 1) ~/ 2) return null; + + final board = List.filled(64, null); + for (var i = 0; i < squares.length; i++) { + final byte = bytes[_fixedBytes + (i >> 1)]; + final nibble = i.isEven ? byte >> 4 : byte & 0x0F; + final type = nibble & 0x07; + if (type > 5) return null; + final letter = _pieces[type]; + board[squares[i]] = nibble & 0x08 != 0 ? letter : letter.toUpperCase(); + } + + final rows = []; + for (var rank = 7; rank >= 0; rank--) { + final row = StringBuffer(); + var empty = 0; + for (var file = 0; file < 8; file++) { + final p = board[rank * 8 + file]; + if (p == null) { + empty++; + continue; + } + if (empty > 0) row.write(empty); + empty = 0; + row.write(p); + } + if (empty > 0) row.write(empty); + rows.add(row.toString()); + } + + final state = bytes[8] | (bytes[9] << 8); + final blackToMove = state & 1 != 0; + final castling = StringBuffer(); + if (state & (1 << 1) != 0) castling.write('K'); + if (state & (1 << 2) != 0) castling.write('Q'); + if (state & (1 << 3) != 0) castling.write('k'); + if (state & (1 << 4) != 0) castling.write('q'); + final epFile = (state >> 5) & 0x0F; + if (epFile > 8) return null; + final ep = epFile == 0 + ? '-' + : '${String.fromCharCode('a'.codeUnitAt(0) + epFile - 1)}' + '${blackToMove ? 3 : 6}'; + final halfmove = (state >> 9) & 0x7F; + + return '${rows.join('/')} ${blackToMove ? 'b' : 'w'} ' + '${castling.isEmpty ? '-' : castling} $ep $halfmove ' + '${fullMoveNumber < 1 ? 1 : fullMoveNumber}'; + } +} diff --git a/lib/games/chess/chess_service.dart b/lib/games/chess/chess_service.dart new file mode 100644 index 00000000..c33424b9 --- /dev/null +++ b/lib/games/chess/chess_service.dart @@ -0,0 +1,843 @@ +import 'dart:async'; +import 'dart:math'; + +import 'package:crypto/crypto.dart'; +import 'package:flutter/foundation.dart'; + +import '../hash_chain.dart'; +import 'chess_game.dart'; +import 'chess_link.dart'; +import 'chess_packets.dart'; +import 'chess_position_codec.dart'; +import 'chess_store.dart'; + +/// Chess games played and watched on channels. +/// +/// Packets arrive through [ChessLink.incoming]; every handler is idempotent, +/// so duplicates and repeats are harmless. Our own actions are sent first +/// and applied locally once the radio accepted them. +class ChessService extends ChangeNotifier { + static const Duration inviteLifetime = Duration(hours: 24); + static const Duration timeoutGrace = Duration(minutes: 10); + static const Duration keepFinished = Duration(days: 7); + static const Duration requestAnswerInterval = Duration(minutes: 1); + static const int maxStoredGames = 50; + + final ChessLink link; + final ChessStore store; + final DateTime Function() _clock; + final Random _random; + final Duration _answerDelayMin; + final Duration _answerDelayMax; + + final Map _games = {}; + final Set _sending = {}; + final Map _pendingAnswers = {}; + StreamSubscription? _sub; + Timer? _housekeeping; + String _scope = ''; + String? _viewingKey; + bool _disposed = false; + + ChessService({ + required this.link, + ChessStore? store, + DateTime Function()? clock, + Random? random, + Duration answerDelayMin = const Duration(seconds: 2), + Duration answerDelayMax = const Duration(seconds: 10), + bool startHousekeeping = true, + }) : store = store ?? ChessStore(), + _clock = clock ?? DateTime.now, + _random = random ?? Random.secure(), + _answerDelayMin = answerDelayMin, + _answerDelayMax = answerDelayMax { + _sub = link.incoming.listen(handleIncoming); + link.addListener(_onLinkChanged); + _loadScope(link.storageScope); + if (startHousekeeping) { + _housekeeping = Timer.periodic( + const Duration(minutes: 1), + (_) => housekeeping(), + ); + } + } + + int get _now => _clock().millisecondsSinceEpoch; + + // ---- queries --------------------------------------------------------------- + + /// Games on [channelId], newest activity first. + List gamesForChannel(String channelId) => + _games.values.where((g) => g.channelId == channelId).toList() + ..sort((a, b) => b.lastActivityMs.compareTo(a.lastActivityMs)); + + /// Live games plus open invites on [channelId]. + int openCountForChannel(String channelId) => + _games.values.where((g) => g.channelId == channelId && g.isOpen).length; + + ChessGame? game(String channelId, int gameId) => + _games[ChessGame.gameKey(channelId, gameId)]; + + bool isSending(ChessGame game) => _sending.contains(game.key); + + bool get canSend => link.canSend; + + String get selfName => link.selfName; + + /// When the side to move runs out of time, or null without a deadline. + DateTime? deadlineAt(ChessGame game) { + final d = game.deadline.duration; + if (d == null || game.status != ChessGameStatus.active) return null; + return DateTime.fromMillisecondsSinceEpoch(game.lastMoveAtMs).add(d); + } + + /// True when we may claim a win because the opponent let the deadline + /// (plus grace) pass. + bool canClaimTimeout(ChessGame game) { + if (!game.isPlayer || game.isMyTurn) return false; + if (game.status != ChessGameStatus.active) return false; + final at = deadlineAt(game); + return at != null && _clock().isAfter(at.add(timeoutGrace)); + } + + /// The screen showing [game] (no notifications for it), or null. + set viewing(ChessGame? game) => _viewingKey = game?.key; + + // ---- our actions ----------------------------------------------------------- + + /// Posts an open invite, or a direct challenge to [targetName]. + Future createInvite({ + required String channelId, + ChessDeadline deadline = ChessDeadline.defaultValue, + ChessColourPreference colour = ChessColourPreference.random, + String? targetName, + }) async { + final chain = HashChain.generate(_random); + final gameId = _newGameId(channelId); + final packet = ChessInvitePacket( + gameId: gameId, + deadline: deadline, + colour: colour, + commitment: chain.commitment, + inviterName: link.selfName, + targetName: targetName, + ); + final game = ChessGame( + channelId: channelId, + gameId: gameId, + status: ChessGameStatus.invite, + deadline: deadline, + colourPreference: colour, + inviter: ChessPlayer(name: link.selfName, commitment: chain.commitment), + targetName: targetName, + mySeedHex: bytesToHex(chain.seed), + iAmInviter: true, + createdAtMs: _now, + ); + if (!await _send(game, packet)) return null; + _games[game.key] = game; + _changed(); + return game; + } + + Future accept(ChessGame game) async { + if (game.status != ChessGameStatus.invite || game.iAmInviter) return false; + final chain = HashChain.generate(_random); + final packet = ChessAcceptPacket( + gameId: game.gameId, + commitment: chain.commitment, + accepterName: link.selfName, + ); + if (!await _send(game, packet)) return false; + game + ..mySeedHex = bytesToHex(chain.seed) + ..myNextChainIndex = 1 + ..status = ChessGameStatus.starting + ..lastActivityMs = _now; + _changed(); + return true; + } + + /// Re-sends our accept while waiting for the inviter's confirmation. + Future resendAccept(ChessGame game) async { + if (game.status != ChessGameStatus.starting) return false; + final chain = game.myChain; + if (chain == null) return false; + return _send( + game, + ChessAcceptPacket( + gameId: game.gameId, + commitment: chain.commitment, + accepterName: link.selfName, + ), + ); + } + + Future decline(ChessGame game) async { + if (game.status != ChessGameStatus.invite || game.iAmInviter) return false; + final ok = await _send( + game, + ChessDeclinePacket(gameId: game.gameId, declinerName: link.selfName), + ); + if (ok) { + game.finish(ChessEndReason.declined); + _touch(game); + } + return ok; + } + + Future cancelInvite(ChessGame game) => + _sendAction(game, ChessPacketKind.cancel, (g, _) { + g.finish(ChessEndReason.cancelled); + }, allowedStatus: ChessGameStatus.invite); + + /// Plays [uci] (e.g. `e2e4`, `e7e8q`). + Future makeMove(ChessGame game, String uci) async { + if (!game.isMyTurn || isSending(game)) return false; + final legal = game.legalUci(); + final index = legal.indexOf(uci); + if (index < 0 || index > 255) return false; + final value = game.takeMyChainValue(); + if (value == null) return false; + // Work on a copy of the position so a failed send changes nothing. + final probe = ChessGame.fromJson(game.toJson())!; + probe.applyUci(uci); + final packet = ChessMovePacket( + gameId: game.gameId, + ply: probe.ply & 0xFF, + minutes: game.minutesSinceStart(_now), + moveIndex: index, + chainValue: value, + position: probe.packedPosition(), + ); + if (!await _send(game, packet)) { + game.myNextChainIndex--; + return false; + } + game.applyUci(uci); + game.playerOf(game.mySide!)?.verifyAndAdvance(value); + game + ..lastMovePacket = packet.encode() + ..lastMoveAtMs = _now; + _touch(game); + return true; + } + + Future resign(ChessGame game) => + _sendAction(game, ChessPacketKind.resign, (g, side) { + g.finish(ChessEndReason.resignation, winner: side.other); + }); + + Future offerDraw(ChessGame game) => + _sendAction(game, ChessPacketKind.drawOffer, (g, side) { + g.drawOfferedBy = side; + }); + + Future acceptDraw(ChessGame game) { + if (game.drawOfferedBy == null || game.drawOfferedBy == game.mySide) { + return Future.value(false); + } + return _sendAction(game, ChessPacketKind.drawAccept, (g, _) { + g.finish(ChessEndReason.drawAgreed); + }); + } + + Future claimTimeout(ChessGame game) { + if (!canClaimTimeout(game)) return Future.value(false); + return _sendAction(game, ChessPacketKind.timeoutClaim, (g, side) { + g.finish(ChessEndReason.timeout, winner: side); + }); + } + + /// Asks the players for whatever we are missing: the game info when we + /// cannot verify the players, the latest move otherwise. + Future requestUpdate(ChessGame game) { + if (game.status == ChessGameStatus.starting) return resendAccept(game); + return _send( + game, + ChessRequestPacket( + gameId: game.gameId, + ply: game.ply & 0xFF, + wantsInfo: !game.hasPlayers, + wantsLatestMove: true, + ), + ); + } + + /// Forgets a finished game or an invite we only watched. + void remove(ChessGame game) { + if (_games.remove(game.key) != null) _changed(); + } + + Future _sendAction( + ChessGame game, + ChessPacketKind kind, + void Function(ChessGame game, ChessSide side) apply, { + ChessGameStatus allowedStatus = ChessGameStatus.active, + }) async { + if (game.status != allowedStatus || isSending(game)) return false; + final side = game.mySide; + if (side == null && !(kind == ChessPacketKind.cancel && game.iAmInviter)) { + return false; + } + final value = game.takeMyChainValue(); + if (value == null) return false; + final packet = ChessActionPacket( + kind: kind, + gameId: game.gameId, + ply: game.ply & 0xFF, + minutes: game.minutesSinceStart(_now), + chainValue: value, + ); + if (!await _send(game, packet)) { + game.myNextChainIndex--; + return false; + } + if (side != null) { + game.playerOf(side)?.verifyAndAdvance(value); + apply(game, side); + } else { + game.inviter?.verifyAndAdvance(value); + apply(game, ChessSide.white); + } + _touch(game); + return true; + } + + Future _send(ChessGame game, ChessPacket packet) async { + if (!link.canSend) return false; + _sending.add(game.key); + notifyListeners(); + try { + return await link.send(game.channelId, packet.encode()); + } finally { + _sending.remove(game.key); + if (!_disposed) notifyListeners(); + } + } + + int _newGameId(String channelId) { + while (true) { + final id = _random.nextInt(0x10000); + if (!_games.containsKey(ChessGame.gameKey(channelId, id))) return id; + } + } + + // ---- incoming -------------------------------------------------------------- + + @visibleForTesting + void handleIncoming(ChessIncoming incoming) { + final packet = ChessPacket.decode(incoming.payload); + if (packet == null) return; + final channelId = incoming.channelId; + final existing = game(channelId, packet.gameId); + final changed = switch (packet) { + ChessInvitePacket p => _onInvite(channelId, existing, p), + ChessAcceptPacket p => _onAccept(existing, p), + ChessDeclinePacket p => _onDecline(existing, p), + ChessMovePacket p => _onMove(channelId, existing, p, incoming.payload), + ChessActionPacket p => _onAction(existing, p), + ChessInfoPacket p => _onInfo(channelId, existing, p), + ChessRequestPacket p => _onRequest(existing, p), + }; + if ((packet is ChessInfoPacket || packet is ChessMovePacket) && + existing != null) { + // Someone answered; our own pending answer is no longer needed. + _pendingAnswers.remove(existing.key)?.cancel(); + } + if (changed) _changed(); + } + + bool _onInvite(String channelId, ChessGame? existing, ChessInvitePacket p) { + if (existing != null) return false; + final game = ChessGame( + channelId: channelId, + gameId: p.gameId, + status: ChessGameStatus.invite, + deadline: p.deadline, + colourPreference: p.colour, + inviter: ChessPlayer(name: p.inviterName, commitment: p.commitment), + targetName: p.targetName, + createdAtMs: _now, + ); + _games[game.key] = game; + if (_isMe(p.targetName)) { + _notify(game, link.l10n.chess_notifyChallenge(p.inviterName)); + } + return true; + } + + bool _onAccept(ChessGame? game, ChessAcceptPacket p) { + if (game == null) return false; + if (game.iAmInviter && game.status == ChessGameStatus.active) { + // A repeated accept: the accepter may have missed our confirmation. + final accepted = game.playerOf(game.mySide!.other); + if (accepted != null && bytesEqual(accepted.commitment, p.commitment)) { + _scheduleAnswer( + game, + info: true, + latestMove: game.ply > 0, + immediate: true, + ); + } + return false; + } + if (game.status != ChessGameStatus.invite) return false; + final target = game.targetName; + if (target != null && !_sameName(target, p.accepterName)) return false; + final inviter = game.inviter; + if (inviter == null) return false; + + if (game.iAmInviter) { + final inviterWhite = _inviterIsWhite( + game.colourPreference, + inviter.commitment, + p.commitment, + ); + final accepter = ChessPlayer( + name: p.accepterName, + commitment: p.commitment, + ); + _start( + game, + white: inviterWhite ? inviter : accepter, + black: inviterWhite ? accepter : inviter, + mySide: inviterWhite ? ChessSide.white : ChessSide.black, + ); + // Confirm, so the accepter and spectators know whose accept won. + _scheduleAnswer(game, info: true, latestMove: false, immediate: true); + _notify( + game, + inviterWhite + ? link.l10n.chess_notifyAcceptedYourMove(p.accepterName) + : link.l10n.chess_notifyAccepted(p.accepterName), + ); + return true; + } + // Spectators wait for the inviter's confirmation (a game info packet). + game.lastActivityMs = _now; + return true; + } + + bool _onDecline(ChessGame? game, ChessDeclinePacket p) { + if (game == null || game.status != ChessGameStatus.invite) return false; + final target = game.targetName; + if (target == null || !_sameName(target, p.declinerName)) return false; + game.finish(ChessEndReason.declined); + game.lastActivityMs = _now; + if (game.iAmInviter) { + _notify(game, link.l10n.chess_notifyDeclined(p.declinerName)); + } + return true; + } + + bool _onInfo(String channelId, ChessGame? game, ChessInfoPacket p) { + if (game != null && game.iAmInviter) return false; // We send these. + final inviter = game?.inviter; + if (inviter != null && + !bytesEqual(inviter.commitment, p.whiteCommitment) && + !bytesEqual(inviter.commitment, p.blackCommitment)) { + return false; // Not from this game's inviter. + } + final white = ChessPlayer(name: p.whiteName, commitment: p.whiteCommitment); + final black = ChessPlayer(name: p.blackName, commitment: p.blackCommitment); + + if (game == null) { + final created = ChessGame( + channelId: channelId, + gameId: p.gameId, + status: ChessGameStatus.active, + deadline: p.deadline, + white: white, + black: black, + createdAtMs: _now, + startedAtMs: p.startedAtUnix * 1000, + hasPosition: p.ply == 0, + ply: p.ply, + sanMoves: List.filled(p.ply, null, growable: true), + ); + _games[created.key] = created; + return true; + } + + switch (game.status) { + case ChessGameStatus.invite: + _start(game, white: white, black: black, mySide: null); + game.startedAtMs = p.startedAtUnix * 1000; + return true; + case ChessGameStatus.starting: + final mine = game.myChain?.commitment; + ChessSide? side; + if (mine != null && bytesEqual(mine, p.whiteCommitment)) { + side = ChessSide.white; + } else if (mine != null && bytesEqual(mine, p.blackCommitment)) { + side = ChessSide.black; + } + if (side == null) { + // Someone else's accept won. Keep watching the game. + game.mySeedHex = null; + _start(game, white: white, black: black, mySide: null); + _notify(game, link.l10n.chess_notifyTaken); + } else { + _start(game, white: white, black: black, mySide: side); + if (side == ChessSide.white) { + _notify(game, link.l10n.chess_notifyGameStartedYourMove); + } + } + game.startedAtMs = p.startedAtUnix * 1000; + return true; + case ChessGameStatus.active: + if (game.hasPlayers) return false; + game + ..white = white + ..black = black + ..startedAtMs ??= p.startedAtUnix * 1000 + ..lastActivityMs = _now; + return true; + case ChessGameStatus.finished: + return false; + } + } + + void _start( + ChessGame game, { + required ChessPlayer white, + required ChessPlayer black, + required ChessSide? mySide, + }) { + game + ..white = white + ..black = black + ..mySide = mySide + ..status = ChessGameStatus.active + ..startedAtMs = _now + ..lastMoveAtMs = _now + ..lastActivityMs = _now; + } + + bool _onMove( + String channelId, + ChessGame? game, + ChessMovePacket p, + Uint8List raw, + ) { + if (game == null) { + // A game we never heard start: follow it from this position. + final fullPly = p.ply == 0 ? 256 : p.ply; + final fen = ChessPositionCodec.decodeToFen( + p.position, + fullMoveNumber: fullPly ~/ 2 + 1, + ); + if (fen == null || !isValidFen(fen)) return false; + final created = ChessGame( + channelId: channelId, + gameId: p.gameId, + status: ChessGameStatus.active, + deadline: ChessDeadline.none, + createdAtMs: _now, + )..adoptPosition(fen, fullPly); + created + ..lastMovePacket = raw + ..lastMoveAtMs = _now; + _games[created.key] = created; + return true; + } + if (game.status == ChessGameStatus.invite) { + // We missed the accept and confirmation; follow from here. + game + ..status = ChessGameStatus.active + ..startedAtMs = _now; + } + if (game.status != ChessGameStatus.active) return false; + + final fullPly = _unwrapPly(game.ply, p.ply); + if (fullPly <= game.ply) return false; // Old or duplicate. + final mover = ChessSide.moverOfPly(fullPly); + if (game.mySide == mover) return false; // Our own move echoed. + + final player = game.playerOf(mover); + if (player != null && !player.owns(p.chainValue)) return false; + + final fen = ChessPositionCodec.decodeToFen( + p.position, + fullMoveNumber: fullPly ~/ 2 + 1, + ); + if (fen == null) return false; + + var applied = false; + if (fullPly == game.ply + 1 && game.hasPosition) { + final legal = game.legalUci(); + if (p.moveIndex < legal.length) { + final probe = ChessGame.fromJson(game.toJson())!; + if (probe.applyUci(legal[p.moveIndex]) && + bytesEqual(probe.packedPosition(), p.position)) { + game.applyUci(legal[p.moveIndex]); + applied = true; + } + } + if (!applied && game.isPlayer) return false; // Does not match our board. + } else if (game.isPlayer && game.hasPosition) { + return false; // Players cannot skip moves. + } + if (!applied) { + if (!isValidFen(fen)) return false; + game.adoptPosition(fen, fullPly); + } + player?.verifyAndAdvance(p.chainValue); + game + ..lastMovePacket = raw + ..lastMoveAtMs = _now + ..lastActivityMs = _now; + + if (game.isPlayer) { + final opponent = game.nameOf(mover) ?? ''; + final san = game.sanMoves.isEmpty ? null : game.sanMoves.last; + if (game.status == ChessGameStatus.finished) { + _notify(game, link.l10n.chess_notifyGameOver(opponent)); + } else if (game.isMyTurn) { + _notify(game, link.l10n.chess_notifyYourMove(opponent, san ?? '')); + } + } + return true; + } + + bool _onAction(ChessGame? game, ChessActionPacket p) { + if (game == null) return false; + if (p.kind == ChessPacketKind.cancel) { + final inviter = game.inviter; + if (game.status != ChessGameStatus.invite || inviter == null) { + return false; + } + if (!inviter.verifyAndAdvance(p.chainValue)) return false; + game + ..finish(ChessEndReason.cancelled) + ..lastActivityMs = _now; + return true; + } + if (game.status != ChessGameStatus.active) return false; + final side = game.sideOwning(p.chainValue); + if (side == null || side == game.mySide) return false; + if (!game.playerOf(side)!.verifyAndAdvance(p.chainValue)) return false; + final name = game.nameOf(side) ?? ''; + switch (p.kind) { + case ChessPacketKind.resign: + game.finish(ChessEndReason.resignation, winner: side.other); + if (game.isPlayer) _notify(game, link.l10n.chess_notifyResigned(name)); + case ChessPacketKind.drawOffer: + game.drawOfferedBy = side; + if (game.isPlayer) { + _notify(game, link.l10n.chess_notifyDrawOffered(name)); + } + case ChessPacketKind.drawAccept: + game.finish(ChessEndReason.drawAgreed); + if (game.isPlayer) { + _notify(game, link.l10n.chess_notifyDrawAccepted(name)); + } + case ChessPacketKind.timeoutClaim: + // Only the side waiting for a move can claim. + if (game.hasPosition && game.sideToMove == side) return false; + game.finish(ChessEndReason.timeout, winner: side); + if (game.isPlayer) _notify(game, link.l10n.chess_notifyTimeout(name)); + default: + return false; + } + game.lastActivityMs = _now; + return true; + } + + bool _onRequest(ChessGame? game, ChessRequestPacket p) { + if (game == null || !game.isPlayer) return false; + if (game.status == ChessGameStatus.starting) return false; + final behind = _unwrapPly(game.ply, p.ply) < game.ply; + _scheduleAnswer( + game, + info: p.wantsInfo, + latestMove: p.wantsLatestMove && behind, + ); + return false; + } + + /// Answers a request after a random delay, unless someone else answers + /// first. At most one answer per game per [requestAnswerInterval]. + void _scheduleAnswer( + ChessGame game, { + required bool info, + required bool latestMove, + bool immediate = false, + }) { + if (!info && !latestMove) return; + if (_pendingAnswers.containsKey(game.key)) return; + final last = game.lastAnsweredRequestAtMs; + if (!immediate && + last != null && + _now - last < requestAnswerInterval.inMilliseconds) { + return; + } + final spread = _answerDelayMax - _answerDelayMin; + final delay = immediate + ? Duration.zero + : _answerDelayMin + + Duration( + milliseconds: spread.inMilliseconds <= 0 + ? 0 + : _random.nextInt(spread.inMilliseconds), + ); + _pendingAnswers[game.key] = Timer(delay, () async { + _pendingAnswers.remove(game.key); + // Confirmations are not answers to a request; they don't count. + if (!immediate) game.lastAnsweredRequestAtMs = _now; + if (info) await _sendInfo(game); + final move = game.lastMovePacket; + if (latestMove && move != null && link.canSend) { + await link.send(game.channelId, move); + } + }); + } + + Future _sendInfo(ChessGame game) async { + final white = game.white; + final black = game.black; + if (white == null || black == null) return; + await _send( + game, + ChessInfoPacket( + gameId: game.gameId, + ply: game.ply & 0xFF, + startedAtUnix: (game.startedAtMs ?? game.createdAtMs) ~/ 1000, + deadline: game.deadline, + whiteCommitment: white.commitment, + blackCommitment: black.commitment, + whiteName: white.name, + blackName: black.name, + ), + ); + } + + // ---- helpers --------------------------------------------------------------- + + /// The full ply nearest [known] whose low byte is [wire]. + static int _unwrapPly(int known, int wire) { + var delta = (wire - known) & 0xFF; + if (delta >= 128) delta -= 256; + return known + delta; + } + + /// Colour rule for invites: a fixed preference wins, "random" uses bit 0 + /// of SHA-256(inviter commitment ‖ accepter commitment). + static bool _inviterIsWhite( + ChessColourPreference pref, + Uint8List inviter, + Uint8List accepter, + ) { + switch (pref) { + case ChessColourPreference.white: + return true; + case ChessColourPreference.black: + return false; + case ChessColourPreference.random: + return sha256.convert([...inviter, ...accepter]).bytes[0] & 1 == 0; + } + } + + bool _isMe(String? name) => + name != null && + link.selfName.isNotEmpty && + _sameName(name, link.selfName); + + static bool _sameName(String a, String b) => + a.trim().toLowerCase() == b.trim().toLowerCase(); + + void _notify(ChessGame game, String text) { + if (game.key == _viewingKey) return; + link.notify(game.channelId, text); + } + + void _touch(ChessGame game) { + game.lastActivityMs = _now; + _changed(); + } + + void _changed() { + if (_disposed) return; + notifyListeners(); + unawaited(store.save(_scope, _games.values.toList())); + } + + /// Expires stale invites and prunes old games. Runs every minute. + @visibleForTesting + void housekeeping() { + final now = _now; + var changed = false; + for (final g in _games.values) { + if ((g.status == ChessGameStatus.invite || + g.status == ChessGameStatus.starting) && + now - g.createdAtMs > inviteLifetime.inMilliseconds) { + g.finish(ChessEndReason.expired); + changed = true; + } + } + final stale = _games.values + .where( + (g) => + (!g.isOpen || !g.isPlayer) && + now - g.lastActivityMs > keepFinished.inMilliseconds, + ) + .map((g) => g.key) + .toList(); + for (final key in stale) { + _games.remove(key); + changed = true; + } + if (_games.length > maxStoredGames) { + final byAge = _games.values.toList() + ..sort((a, b) { + // Our open games last. + final ao = a.isOpen && a.isPlayer ? 1 : 0; + final bo = b.isOpen && b.isPlayer ? 1 : 0; + if (ao != bo) return ao - bo; + return a.lastActivityMs.compareTo(b.lastActivityMs); + }); + for (final g in byAge.take(_games.length - maxStoredGames)) { + _games.remove(g.key); + } + changed = true; + } + if (changed) { + _changed(); + } else if (_games.values.any((g) => g.status == ChessGameStatus.active)) { + notifyListeners(); // Deadline countdowns. + } + } + + void _onLinkChanged() { + final scope = link.storageScope; + if (scope != _scope) { + _loadScope(scope); + } + notifyListeners(); + } + + void _loadScope(String scope) { + _scope = scope; + _games + ..clear() + ..addEntries(store.load(scope).map((g) => MapEntry(g.key, g))); + for (final t in _pendingAnswers.values) { + t.cancel(); + } + _pendingAnswers.clear(); + } + + @override + void dispose() { + _disposed = true; + _sub?.cancel(); + _housekeeping?.cancel(); + for (final t in _pendingAnswers.values) { + t.cancel(); + } + link.removeListener(_onLinkChanged); + super.dispose(); + } +} diff --git a/lib/games/chess/chess_store.dart b/lib/games/chess/chess_store.dart new file mode 100644 index 00000000..33cc1f05 --- /dev/null +++ b/lib/games/chess/chess_store.dart @@ -0,0 +1,41 @@ +import 'dart:convert'; + +import '../../storage/prefs_manager.dart'; +import 'chess_game.dart'; + +/// Per-radio list of chess games in preferences, keyed by the first 10 hex +/// chars of the radio's public key. +class ChessStore { + static const String _keyPrefix = 'chess_games_'; + + Future _pending = Future.value(); + + static String keyFor(String scope) => '$_keyPrefix$scope'; + + /// Games saved for [scope]; records that fail to decode are skipped. + List load(String scope) { + if (scope.isEmpty) return []; + try { + final raw = PrefsManager.instance.getString(keyFor(scope)); + if (raw == null || raw.isEmpty) return []; + final decoded = jsonDecode(raw); + if (decoded is! List) return []; + return decoded.map(ChessGame.fromJson).whereType().toList(); + } catch (_) { + return []; + } + } + + /// Saves [games] for [scope]. Writes are serialized. + Future save(String scope, List games) { + if (scope.isEmpty) return Future.value(); + final json = jsonEncode(games.map((g) => g.toJson()).toList()); + return _pending = _pending.then((_) async { + try { + await PrefsManager.instance.setString(keyFor(scope), json); + } catch (_) {} + }); + } + + Future flush() => _pending; +} diff --git a/lib/games/chess/ui/chess_board.dart b/lib/games/chess/ui/chess_board.dart new file mode 100644 index 00000000..507ef77a --- /dev/null +++ b/lib/games/chess/ui/chess_board.dart @@ -0,0 +1,314 @@ +import 'package:chess_vectors_flutter/chess_vectors_flutter.dart'; +import 'package:flutter/material.dart'; + +import '../../../l10n/l10n.dart'; +import '../../../widgets/mesh_nav_tile.dart'; +import '../../../widgets/mesh_ui.dart'; + +/// Board square colours. The board is content, not chrome, so it keeps the +/// same classic colours in every theme; both have strong contrast with the +/// white and black pieces. +abstract final class ChessBoardPalette { + static const Color light = Color(0xFFEEEED2); + static const Color dark = Color(0xFF769656); + static const Color lastMove = Color(0x99F6E05E); + static const Color check = Color(0xCCE53935); + static const Color hint = Color(0x8C1B1B1B); +} + +/// A chess piece drawn from vectors. [piece] is a FEN letter (`K`, `q`, …). +Widget chessPieceWidget(String piece, double size) { + return switch (piece) { + 'P' => WhitePawn(size: size), + 'N' => WhiteKnight(size: size), + 'B' => WhiteBishop(size: size), + 'R' => WhiteRook(size: size), + 'Q' => WhiteQueen(size: size), + 'K' => WhiteKing(size: size), + 'p' => BlackPawn(size: size), + 'n' => BlackKnight(size: size), + 'b' => BlackBishop(size: size), + 'r' => BlackRook(size: size), + 'q' => BlackQueen(size: size), + 'k' => BlackKing(size: size), + _ => SizedBox(width: size, height: size), + }; +} + +/// Pieces by square (`e4` → `P`) from the board field of [fen]. +Map piecesFromFen(String fen) { + final out = {}; + final rows = fen.split(' ').first.split('/'); + for (var r = 0; r < rows.length && r < 8; r++) { + final rank = 8 - r; + var file = 0; + for (final ch in rows[r].split('')) { + final n = int.tryParse(ch); + if (n != null) { + file += n; + continue; + } + if (file < 8) { + out['${String.fromCharCode(97 + file)}$rank'] = ch; + } + file++; + } + } + return out; +} + +/// An 8×8 board. Tap one of your pieces, then a highlighted square, to +/// move. [legalMoves] (UCI) enables input; pass an empty list for a +/// read-only board. +class ChessBoardView extends StatefulWidget { + final String fen; + final bool flipped; + final String? lastMoveUci; + final bool inCheck; + final List legalMoves; + final ValueChanged? onMove; + + const ChessBoardView({ + super.key, + required this.fen, + this.flipped = false, + this.lastMoveUci, + this.inCheck = false, + this.legalMoves = const [], + this.onMove, + }); + + @override + State createState() => _ChessBoardViewState(); +} + +class _ChessBoardViewState extends State { + String? _selected; + + @override + void didUpdateWidget(ChessBoardView old) { + super.didUpdateWidget(old); + if (old.fen != widget.fen) _selected = null; + } + + bool get _interactive => + widget.onMove != null && widget.legalMoves.isNotEmpty; + + Iterable _movesFrom(String square) => + widget.legalMoves.where((m) => m.startsWith(square)); + + Future _onTap(String square) async { + if (!_interactive) return; + final selected = _selected; + if (selected != null) { + final moves = _movesFrom( + selected, + ).where((m) => m.substring(2, 4) == square).toList(); + if (moves.isNotEmpty) { + setState(() => _selected = null); + var uci = moves.first; + if (moves.length > 1) { + final promotion = await _pickPromotion(moves); + if (promotion == null) return; + uci = promotion; + } + widget.onMove?.call(uci); + return; + } + } + setState(() { + _selected = _movesFrom(square).isNotEmpty && selected != square + ? square + : null; + }); + } + + Future _pickPromotion(List moves) { + final l10n = context.l10n; + final labels = { + 'q': l10n.chess_pieceQueen, + 'r': l10n.chess_pieceRook, + 'b': l10n.chess_pieceBishop, + 'n': l10n.chess_pieceKnight, + }; + return showMeshSheet( + context, + builder: (sheetContext) => SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + BottomSheetHeader(title: l10n.chess_promoteTitle), + for (final letter in const ['q', 'r', 'b', 'n']) + for (final m in moves.where((m) => m.endsWith(letter))) + MeshSheetOption( + label: labels[letter]!, + selected: false, + onTap: () => Navigator.pop(sheetContext, m), + ), + const SizedBox(height: 8), + ], + ), + ), + ); + } + + @override + Widget build(BuildContext context) { + final scheme = Theme.of(context).colorScheme; + final pieces = piecesFromFen(widget.fen); + final last = widget.lastMoveUci; + final lastSquares = last == null || last.length < 4 + ? const {} + : {last.substring(0, 2), last.substring(2, 4)}; + final targets = _selected == null + ? const {} + : _movesFrom(_selected!).map((m) => m.substring(2, 4)).toSet(); + final whiteToMove = widget.fen.split(' ').elementAtOrNull(1) != 'b'; + final checkedKing = widget.inCheck ? (whiteToMove ? 'K' : 'k') : null; + + return AspectRatio( + aspectRatio: 1, + child: LayoutBuilder( + builder: (context, constraints) { + final cell = constraints.maxWidth / 8; + return Column( + children: [ + for (var row = 0; row < 8; row++) + Row( + children: [ + for (var col = 0; col < 8; col++) + _square( + context, + scheme: scheme, + cell: cell, + row: row, + col: col, + pieces: pieces, + lastSquares: lastSquares, + targets: targets, + checkedKing: checkedKing, + ), + ], + ), + ], + ); + }, + ), + ); + } + + Widget _square( + BuildContext context, { + required ColorScheme scheme, + required double cell, + required int row, + required int col, + required Map pieces, + required Set lastSquares, + required Set targets, + required String? checkedKing, + }) { + final file = widget.flipped ? 7 - col : col; + final rank = widget.flipped ? row + 1 : 8 - row; + final square = '${String.fromCharCode(97 + file)}$rank'; + final isLight = (file + rank).isOdd; + final piece = pieces[square]; + final isTarget = targets.contains(square); + final isSelected = _selected == square; + final coordStyle = TextStyle( + fontSize: (cell * 0.24).clamp(12.0, 14.0), + fontWeight: FontWeight.w700, + color: isLight ? ChessBoardPalette.dark : ChessBoardPalette.light, + ); + + return GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () => _onTap(square), + child: Semantics( + label: piece == null ? square : '$square $piece', + button: isTarget || (_interactive && piece != null), + selected: isSelected, + child: SizedBox( + width: cell, + height: cell, + child: Stack( + children: [ + Positioned.fill( + child: ColoredBox( + color: isLight + ? ChessBoardPalette.light + : ChessBoardPalette.dark, + ), + ), + if (lastSquares.contains(square)) + const Positioned.fill( + child: ColoredBox(color: ChessBoardPalette.lastMove), + ), + if (piece != null && piece == checkedKing) + Positioned.fill( + child: DecoratedBox( + decoration: BoxDecoration( + gradient: RadialGradient( + colors: [ + ChessBoardPalette.check, + ChessBoardPalette.check.withValues(alpha: 0), + ], + ), + ), + ), + ), + if (isSelected) + Positioned.fill( + child: DecoratedBox( + decoration: BoxDecoration( + border: Border.all(color: scheme.primary, width: 3), + ), + ), + ), + if (col == 0) + Positioned( + left: 2, + top: 1, + child: Text('$rank', style: coordStyle), + ), + if (row == 7) + Positioned( + right: 2, + bottom: 0, + child: Text( + String.fromCharCode(97 + file), + style: coordStyle, + ), + ), + if (piece != null) + Center(child: chessPieceWidget(piece, cell * 0.92)), + if (isTarget) + Center( + child: piece == null + ? Container( + width: cell * 0.3, + height: cell * 0.3, + decoration: const BoxDecoration( + color: ChessBoardPalette.hint, + shape: BoxShape.circle, + ), + ) + : Container( + width: cell * 0.92, + height: cell * 0.92, + decoration: BoxDecoration( + shape: BoxShape.circle, + border: Border.all( + color: ChessBoardPalette.hint, + width: cell * 0.08, + ), + ), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/games/chess/ui/chess_game_screen.dart b/lib/games/chess/ui/chess_game_screen.dart new file mode 100644 index 00000000..b3c04f9a --- /dev/null +++ b/lib/games/chess/ui/chess_game_screen.dart @@ -0,0 +1,437 @@ +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../../../helpers/snack_bar_builder.dart'; +import '../../../l10n/l10n.dart'; +import '../../../theme/mesh_theme.dart'; +import '../../../utils/radio_guard.dart'; +import '../../../widgets/mesh_nav_tile.dart'; +import '../../../widgets/mesh_ui.dart'; +import '../chess_game.dart'; +import '../chess_service.dart'; +import 'chess_board.dart'; +import 'chess_text.dart'; + +/// A chess game, for players and spectators alike. +class ChessGameScreen extends StatefulWidget { + final String channelId; + final int gameId; + + const ChessGameScreen({ + super.key, + required this.channelId, + required this.gameId, + }); + + @override + State createState() => _ChessGameScreenState(); +} + +class _ChessGameScreenState extends State { + ChessService? _service; + + @override + void didChangeDependencies() { + super.didChangeDependencies(); + _service ??= context.read(); + } + + @override + void dispose() { + _service?.viewing = null; + super.dispose(); + } + + Future _run(Future Function() action) async { + if (!ensureRadioConnected(context)) return; + final ok = await action(); + if (!ok && mounted) { + showDismissibleSnackBar( + context, + content: Text(context.l10n.chess_sendFailed), + ); + } + } + + Future _confirmResign(ChessService service, ChessGame game) async { + final l10n = context.l10n; + final scheme = Theme.of(context).colorScheme; + final yes = await showDialog( + context: context, + builder: (dialogContext) => AlertDialog( + title: Text(l10n.chess_resignConfirmTitle), + content: Text(l10n.chess_resignConfirmBody), + actions: [ + TextButton( + onPressed: () => Navigator.pop(dialogContext, false), + child: Text(l10n.common_cancel), + ), + FilledButton( + style: FilledButton.styleFrom( + backgroundColor: scheme.error, + foregroundColor: scheme.onError, + ), + onPressed: () => Navigator.pop(dialogContext, true), + child: Text(l10n.chess_actionResign), + ), + ], + ), + ); + if (yes == true && mounted) await _run(() => service.resign(game)); + } + + @override + Widget build(BuildContext context) { + final l10n = context.l10n; + final service = context.watch(); + final game = service.game(widget.channelId, widget.gameId); + if (game == null) { + return Scaffold( + appBar: AppBar(title: Text(l10n.chess_sheetTitle), centerTitle: true), + body: Center(child: Text(l10n.chess_gameGone)), + ); + } + service.viewing = game; + final readOnly = context.radioReadOnly; + final busy = service.isSending(game); + final canAct = !readOnly && service.canSend && !busy; + final flipped = game.mySide == ChessSide.black; + final myTurn = game.isMyTurn && canAct; + + return Scaffold( + appBar: AppBar( + centerTitle: true, + title: Text( + l10n.chessPlayers(game), + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + bottom: busy + ? const PreferredSize( + preferredSize: Size.fromHeight(3), + child: LinearProgressIndicator(minHeight: 3), + ) + : null, + ), + body: SafeArea( + child: LayoutBuilder( + builder: (context, constraints) { + final boardSize = constraints.maxWidth.clamp(0.0, 560.0) - 16; + return ListView( + padding: const EdgeInsets.only(bottom: 24), + children: [ + _PlayerStrip( + game: game, + side: flipped ? ChessSide.white : ChessSide.black, + ), + Center( + child: SizedBox( + width: boardSize, + child: game.hasPosition + ? ChessBoardView( + fen: game.fen, + flipped: flipped, + lastMoveUci: game.lastMoveUci, + inCheck: game.board.in_check, + legalMoves: myTurn ? game.legalUci() : const [], + onMove: myTurn + ? (uci) => + _run(() => service.makeMove(game, uci)) + : null, + ) + : AspectRatio( + aspectRatio: 1, + child: Center( + child: Padding( + padding: const EdgeInsets.all(24), + child: Text( + l10n.chess_statusUnknownPosition, + textAlign: TextAlign.center, + ), + ), + ), + ), + ), + ), + _PlayerStrip( + game: game, + side: flipped ? ChessSide.black : ChessSide.white, + ), + _StatusCard(game: game, service: service), + _Actions( + game: game, + service: service, + canAct: canAct, + onRun: _run, + onResign: () => _confirmResign(service, game), + ), + SectionHeader(l10n.chess_movesTitle), + _MoveList(game: game), + ], + ); + }, + ), + ), + ); + } +} + +class _PlayerStrip extends StatelessWidget { + final ChessGame game; + final ChessSide side; + + const _PlayerStrip({required this.game, required this.side}); + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + final l10n = context.l10n; + final name = game.nameOf(side) ?? l10n.chess_unknownPlayer; + final toMove = + game.status == ChessGameStatus.active && + game.hasPosition && + game.sideToMove == side; + final isMe = game.mySide == side; + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), + child: Row( + children: [ + Icon( + side == ChessSide.white ? Icons.circle_outlined : Icons.circle, + size: 20, + color: theme.colorScheme.onSurfaceVariant, + ), + const SizedBox(width: 12), + Expanded( + child: Text( + isMe ? l10n.chess_playerYou(name) : name, + style: meshTileTitleStyle(theme), + ), + ), + if (toMove) + StatusChip( + label: l10n.chess_toMoveChip, + color: theme.colorScheme.primary, + ), + ], + ), + ); + } +} + +/// Whose move it is, time left, draw offers, result. +class _StatusCard extends StatelessWidget { + final ChessGame game; + final ChessService service; + + const _StatusCard({required this.game, required this.service}); + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + final l10n = context.l10n; + final lines = []; + switch (game.status) { + case ChessGameStatus.invite: + case ChessGameStatus.starting: + lines.add(l10n.chess_rowStarting); + case ChessGameStatus.finished: + lines.add(l10n.chessResult(game)); + case ChessGameStatus.active: + if (!game.hasPosition) { + lines.add(l10n.chess_statusUnknownPosition); + } else if (game.isMyTurn) { + lines.add(l10n.chess_statusYourMove); + } else { + final name = game.nameOf(game.sideToMove) ?? l10n.chess_unknownPlayer; + lines.add( + game.isPlayer + ? l10n.chess_statusWaiting(name) + : l10n.chess_statusToMove(name), + ); + } + final at = service.deadlineAt(game); + if (at != null && game.hasPosition) { + final left = at.difference(DateTime.now()); + lines.add( + left.isNegative + ? l10n.chess_statusOverdue + : l10n.chess_statusTimeLeft(l10n.chessDuration(left)), + ); + } + final offeredBy = game.drawOfferedBy; + if (offeredBy != null) { + lines.add( + l10n.chess_statusDrawOffered( + game.nameOf(offeredBy) ?? l10n.chess_unknownPlayer, + ), + ); + } + if (!game.hasPlayers) lines.add(l10n.chess_statusUnverified); + } + return MeshCard( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + lines.first, + style: theme.textTheme.titleMedium?.copyWith( + fontWeight: FontWeight.w700, + ), + ), + for (final line in lines.skip(1)) ...[ + const SizedBox(height: 4), + Text( + line, + style: theme.textTheme.bodyMedium?.copyWith( + color: theme.colorScheme.onSurfaceVariant, + ), + ), + ], + ], + ), + ); + } +} + +class _Actions extends StatelessWidget { + final ChessGame game; + final ChessService service; + final bool canAct; + final Future Function(Future Function()) onRun; + final VoidCallback onResign; + + const _Actions({ + required this.game, + required this.service, + required this.canAct, + required this.onRun, + required this.onResign, + }); + + @override + Widget build(BuildContext context) { + final l10n = context.l10n; + final scheme = Theme.of(context).colorScheme; + final buttons = []; + final active = game.status == ChessGameStatus.active; + if (active && game.isPlayer) { + final offeredBy = game.drawOfferedBy; + if (offeredBy != null && offeredBy != game.mySide) { + buttons.add( + FilledButton( + onPressed: canAct + ? () => onRun(() => service.acceptDraw(game)) + : null, + child: Text(l10n.chess_actionAcceptDraw), + ), + ); + } else if (offeredBy == null) { + buttons.add( + OutlinedButton( + onPressed: canAct + ? () => onRun(() => service.offerDraw(game)) + : null, + child: Text(l10n.chess_actionOfferDraw), + ), + ); + } + if (service.canClaimTimeout(game)) { + buttons.add( + FilledButton( + onPressed: canAct + ? () => onRun(() => service.claimTimeout(game)) + : null, + child: Text(l10n.chess_actionClaimTimeout), + ), + ); + } + buttons.add( + TextButton( + style: TextButton.styleFrom(foregroundColor: scheme.error), + onPressed: canAct ? onResign : null, + child: Text(l10n.chess_actionResign), + ), + ); + } + if (game.isOpen && (!game.isMyTurn || !game.hasPlayers)) { + buttons.add( + Tooltip( + message: l10n.chess_actionNudgeTooltip, + child: OutlinedButton.icon( + icon: const Icon(Icons.refresh, size: 20), + onPressed: canAct + ? () => onRun(() => service.requestUpdate(game)) + : null, + label: Text(l10n.chess_actionNudge), + ), + ), + ); + } + if (buttons.isEmpty) return const SizedBox.shrink(); + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), + child: Wrap(spacing: 8, runSpacing: 8, children: buttons), + ); + } +} + +/// Moves as numbered pairs; runs of moves we never heard collapse into one +/// "missed" entry. +class _MoveList extends StatelessWidget { + final ChessGame game; + + const _MoveList({required this.game}); + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + final l10n = context.l10n; + if (game.sanMoves.isEmpty) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Text( + l10n.chess_noMovesYet, + style: theme.textTheme.bodyMedium?.copyWith( + color: theme.colorScheme.onSurfaceVariant, + ), + ), + ); + } + final entries = []; + var i = 0; + final moves = game.sanMoves; + while (i < moves.length) { + if (moves[i] == null) { + while (i < moves.length && moves[i] == null) { + i++; + } + entries.add(l10n.chess_movesMissed); + continue; + } + final number = i ~/ 2 + 1; + if (i.isEven) { + final black = i + 1 < moves.length ? moves[i + 1] : null; + entries.add( + black == null + ? '$number. ${moves[i]}' + : '$number. ${moves[i]} $black', + ); + i += black == null ? 1 : 2; + } else { + entries.add('$number… ${moves[i]}'); + i++; + } + } + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Wrap( + spacing: 16, + runSpacing: 6, + children: [ + for (final e in entries) Text(e, style: MeshTheme.mono(fontSize: 14)), + ], + ), + ); + } +} diff --git a/lib/games/chess/ui/chess_games_sheet.dart b/lib/games/chess/ui/chess_games_sheet.dart new file mode 100644 index 00000000..46752793 --- /dev/null +++ b/lib/games/chess/ui/chess_games_sheet.dart @@ -0,0 +1,447 @@ +import 'package:chess_vectors_flutter/chess_vectors_flutter.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../../../helpers/snack_bar_builder.dart'; +import '../../../l10n/l10n.dart'; +import '../../../models/channel.dart'; +import '../../../utils/radio_guard.dart'; +import '../../../widgets/empty_state.dart'; +import '../../../widgets/mesh_nav_tile.dart'; +import '../../../widgets/mesh_ui.dart'; +import '../chess_game.dart'; +import '../chess_service.dart'; +import 'chess_game_screen.dart'; +import 'chess_new_game_sheet.dart'; +import 'chess_text.dart'; + +/// Label of the channel menu entry: "Chess games", with the number of open +/// games and invites when there are any. +String chessMenuLabel(BuildContext context, Channel channel) { + final id = channel.storageId; + var count = 0; + try { + if (id != null) { + count = context.read().openCountForChannel(id); + } + } on ProviderNotFoundException { + // Hosts without chess (some tests) just show the plain label. + } + return count == 0 + ? context.l10n.chess_menuGames + : context.l10n.chess_menuGamesCount(count); +} + +/// Games on [channel]: yours, open invites, games to watch, and buttons to +/// start a new one. +Future showChessGamesSheet(BuildContext context, Channel channel) async { + final channelId = channel.storageId; + if (channelId == null) return; + final action = await showMeshSheet<_NewGameAction>( + context, + builder: (sheetContext) => DraggableScrollableSheet( + expand: false, + initialChildSize: 0.7, + minChildSize: 0.4, + maxChildSize: 0.95, + builder: (_, controller) => _ChessGamesSheetBody( + channel: channel, + channelId: channelId, + controller: controller, + hostContext: context, + ), + ), + ); + if (action == null || !context.mounted) return; + // Close-then-open: the new-game sheet replaces this one. + await showChessNewGameSheet( + context, + channel: channel, + direct: action == _NewGameAction.challenge, + ); +} + +enum _NewGameAction { challenge, openInvite } + +class _ChessGamesSheetBody extends StatelessWidget { + final Channel channel; + final String channelId; + final ScrollController controller; + final BuildContext hostContext; + + const _ChessGamesSheetBody({ + required this.channel, + required this.channelId, + required this.controller, + required this.hostContext, + }); + + @override + Widget build(BuildContext context) { + final l10n = context.l10n; + final service = context.watch(); + final readOnly = context.radioReadOnly; + final games = service.gamesForChannel(channelId); + final mine = games + .where( + (g) => + g.isOpen && + (g.isPlayer || + g.iAmInviter || + g.status == ChessGameStatus.starting), + ) + .toList(); + final invites = games + .where( + (g) => + g.status == ChessGameStatus.invite && + !g.iAmInviter && + (g.targetName == null || + _sameName(g.targetName!, service.selfName)), + ) + .toList(); + final live = games + .where( + (g) => + g.isOpen && + !mine.contains(g) && + !invites.contains(g) && + g.status == ChessGameStatus.active, + ) + .toList(); + final finished = games.where((g) => !g.isOpen).take(10).toList(); + final canStart = !readOnly && service.canSend; + + return Column( + children: [ + BottomSheetHeader(title: l10n.chess_sheetTitle, subtitle: channel.name), + Expanded( + child: ListView( + controller: controller, + padding: const EdgeInsets.only(bottom: 24), + children: [ + if (!readOnly && !service.canSend) + MeshCard(child: Text(l10n.settings_requiresFirmware('v1.15'))), + SectionHeader(l10n.chess_sectionNewGame), + _ActionCard( + icon: Icons.person_add_alt_1_outlined, + title: l10n.chess_newChallenge, + subtitle: l10n.chess_newChallengeSubtitle, + onTap: canStart + ? () => Navigator.pop(context, _NewGameAction.challenge) + : null, + ), + _ActionCard( + icon: Icons.campaign_outlined, + title: l10n.chess_newOpenInvite, + subtitle: l10n.chess_newOpenInviteSubtitle, + onTap: canStart + ? () => Navigator.pop(context, _NewGameAction.openInvite) + : null, + ), + if (games.isEmpty) + EmptyState( + icon: Icons.sports_esports_outlined, + title: l10n.chess_emptyTitle, + subtitle: l10n.chess_emptySubtitle, + ), + if (mine.isNotEmpty) ...[ + SectionHeader(l10n.chess_sectionYourGames), + for (final g in mine) _GameCard(game: g, host: hostContext), + ], + if (invites.isNotEmpty) ...[ + SectionHeader(l10n.chess_sectionInvites), + for (final g in invites) + _InviteCard(game: g, readOnly: readOnly, host: hostContext), + ], + if (live.isNotEmpty) ...[ + SectionHeader(l10n.chess_sectionLive), + for (final g in live) _GameCard(game: g, host: hostContext), + ], + if (finished.isNotEmpty) ...[ + SectionHeader(l10n.chess_sectionFinished), + for (final g in finished) _GameCard(game: g, host: hostContext), + ], + ], + ), + ), + ], + ); + } +} + +bool _sameName(String a, String b) => + a.trim().toLowerCase() == b.trim().toLowerCase(); + +class _ActionCard extends StatelessWidget { + final IconData icon; + final String title; + final String subtitle; + final VoidCallback? onTap; + + const _ActionCard({ + required this.icon, + required this.title, + required this.subtitle, + required this.onTap, + }); + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + final enabled = onTap != null; + return Opacity( + opacity: enabled ? 1 : 0.5, + child: MeshCard( + onTap: onTap, + child: Row( + children: [ + Icon(icon, size: 24, color: theme.colorScheme.primary), + const SizedBox(width: 16), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(title, style: meshTileTitleStyle(theme)), + const SizedBox(height: 2), + Text( + subtitle, + style: theme.textTheme.bodyMedium?.copyWith( + color: theme.colorScheme.onSurfaceVariant, + ), + ), + ], + ), + ), + ], + ), + ), + ); + } +} + +/// One game: players, and whose move it is or how it ended. +class _GameCard extends StatelessWidget { + final ChessGame game; + final BuildContext host; + + const _GameCard({required this.game, required this.host}); + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + final l10n = context.l10n; + final service = context.read(); + final String title; + final String subtitle; + switch (game.status) { + case ChessGameStatus.invite: + title = game.targetName == null + ? l10n.chess_rowYourOpenInvite + : l10n.chess_rowYourChallenge(game.targetName!); + subtitle = l10n.chessDeadlineLabel(game.deadline); + case ChessGameStatus.starting: + title = l10n.chess_rowInviteFrom(game.inviter?.name ?? ''); + subtitle = l10n.chess_rowStarting; + case ChessGameStatus.active: + title = l10n.chessPlayers(game); + final toMove = game.nameOf(game.sideToMove) ?? l10n.chess_unknownPlayer; + final turn = game.isMyTurn + ? l10n.chess_statusYourMove + : l10n.chess_statusToMove(toMove); + subtitle = l10n.chess_rowMoveTurn((game.ply ~/ 2) + 1, turn); + case ChessGameStatus.finished: + title = l10n.chessPlayers(game); + subtitle = l10n.chessResult(game); + } + return MeshCard( + onTap: game.status == ChessGameStatus.invite && game.iAmInviter + ? () => _confirmCancel(context, service) + : () { + Navigator.pop(context); + Navigator.push( + host, + MaterialPageRoute( + builder: (_) => ChessGameScreen( + channelId: game.channelId, + gameId: game.gameId, + ), + ), + ); + }, + child: Row( + children: [ + _PieceIcon(highlight: game.isMyTurn), + const SizedBox(width: 16), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(title, style: meshTileTitleStyle(theme)), + const SizedBox(height: 2), + Text( + subtitle, + style: theme.textTheme.bodyMedium?.copyWith( + color: game.isMyTurn + ? theme.colorScheme.primary + : theme.colorScheme.onSurfaceVariant, + fontWeight: game.isMyTurn ? FontWeight.w600 : null, + ), + ), + ], + ), + ), + if (!game.isOpen) + IconButton( + tooltip: l10n.chess_remove, + icon: const Icon(Icons.close), + onPressed: () => service.remove(game), + ), + ], + ), + ); + } + + Future _confirmCancel( + BuildContext context, + ChessService service, + ) async { + final l10n = context.l10n; + final cancel = await showDialog( + context: context, + builder: (dialogContext) => AlertDialog( + title: Text(l10n.chess_cancelInviteTitle), + actions: [ + TextButton( + onPressed: () => Navigator.pop(dialogContext, false), + child: Text(l10n.common_cancel), + ), + FilledButton( + onPressed: () => Navigator.pop(dialogContext, true), + child: Text(l10n.chess_cancelInvite), + ), + ], + ), + ); + if (cancel != true || !context.mounted) return; + if (!ensureRadioConnected(context)) return; + final ok = await service.cancelInvite(game); + if (!ok && context.mounted) { + showDismissibleSnackBar(context, content: Text(l10n.chess_sendFailed)); + } + } +} + +/// Someone else's invite with Accept (and Decline for a challenge to us). +class _InviteCard extends StatelessWidget { + final ChessGame game; + final bool readOnly; + final BuildContext host; + + const _InviteCard({ + required this.game, + required this.readOnly, + required this.host, + }); + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + final l10n = context.l10n; + final service = context.watch(); + final inviter = game.inviter?.name ?? l10n.chess_unknownPlayer; + final busy = service.isSending(game); + final canAct = !readOnly && service.canSend && !busy; + return MeshCard( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + const _PieceIcon(highlight: false), + const SizedBox(width: 16), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + game.targetName == null + ? l10n.chess_rowOpenInvite(inviter) + : l10n.chess_rowChallengedYou(inviter), + style: meshTileTitleStyle(theme), + ), + const SizedBox(height: 2), + Text( + l10n.chess_rowInviteDetails( + l10n.chessDeadlineLabel(game.deadline), + ), + style: theme.textTheme.bodyMedium?.copyWith( + color: theme.colorScheme.onSurfaceVariant, + ), + ), + ], + ), + ), + ], + ), + const SizedBox(height: 8), + Wrap( + alignment: WrapAlignment.end, + spacing: 8, + runSpacing: 4, + children: [ + if (game.targetName != null) + OutlinedButton( + onPressed: canAct + ? () => _run(context, service.decline) + : null, + child: Text(l10n.chess_decline), + ), + FilledButton( + onPressed: canAct ? () => _run(context, service.accept) : null, + child: Text(l10n.chess_accept), + ), + ], + ), + ], + ), + ); + } + + Future _run( + BuildContext context, + Future Function(ChessGame) action, + ) async { + if (!ensureRadioConnected(context)) return; + final ok = await action(game); + if (!ok && context.mounted) { + showDismissibleSnackBar( + context, + content: Text(context.l10n.chess_sendFailed), + ); + } + } +} + +class _PieceIcon extends StatelessWidget { + final bool highlight; + + const _PieceIcon({required this.highlight}); + + @override + Widget build(BuildContext context) { + final scheme = Theme.of(context).colorScheme; + return Container( + width: 40, + height: 40, + decoration: BoxDecoration( + color: highlight + ? scheme.primaryContainer + : scheme.surfaceContainerHigh, + shape: BoxShape.circle, + ), + alignment: Alignment.center, + child: WhiteKnight(size: 30), + ); + } +} diff --git a/lib/games/chess/ui/chess_new_game_sheet.dart b/lib/games/chess/ui/chess_new_game_sheet.dart new file mode 100644 index 00000000..2074c359 --- /dev/null +++ b/lib/games/chess/ui/chess_new_game_sheet.dart @@ -0,0 +1,183 @@ +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../../../connector/meshcore_connector.dart'; +import '../../../helpers/snack_bar_builder.dart'; +import '../../../l10n/l10n.dart'; +import '../../../models/channel.dart'; +import '../../../utils/radio_guard.dart'; +import '../../../widgets/mesh_nav_tile.dart'; +import '../../../widgets/mesh_ui.dart'; +import '../chess_packets.dart'; +import '../chess_service.dart'; +import 'chess_text.dart'; + +/// Names recently heard on [channel], newest first, without our own. +List recentChannelSenders( + MeshCoreConnector connector, + Channel channel, { + int limit = 30, +}) { + final self = (connector.selfName ?? '').trim().toLowerCase(); + final seen = {}; + final out = []; + final messages = connector.getChannelMessages(channel); + for (final m in messages.reversed) { + if (m.isOutgoing) continue; + final name = m.senderName.trim(); + final key = name.toLowerCase(); + if (name.isEmpty || key == self || !seen.add(key)) continue; + out.add(name); + if (out.length >= limit) break; + } + return out; +} + +/// Picks the opponent (for a [direct] challenge), time per move and colour, +/// then sends the invite. +Future showChessNewGameSheet( + BuildContext context, { + required Channel channel, + required bool direct, +}) async { + final channelId = channel.storageId; + if (channelId == null) return; + final senders = direct + ? recentChannelSenders(context.read(), channel) + : const []; + final service = context.read(); + final l10n = context.l10n; + + final result = await showMeshSheet<_NewGameChoice>( + context, + builder: (sheetContext) => DraggableScrollableSheet( + expand: false, + initialChildSize: 0.8, + minChildSize: 0.4, + maxChildSize: 0.95, + builder: (_, controller) => _NewGameBody( + direct: direct, + senders: senders, + controller: controller, + ), + ), + ); + if (result == null || !context.mounted) return; + if (!ensureRadioConnected(context)) return; + final game = await service.createInvite( + channelId: channelId, + deadline: result.deadline, + colour: result.colour, + targetName: result.target, + ); + if (!context.mounted) return; + showDismissibleSnackBar( + context, + content: Text( + game == null + ? l10n.chess_sendFailed + : direct + ? l10n.chess_challengeSent(result.target ?? '') + : l10n.chess_inviteSent, + ), + ); +} + +class _NewGameChoice { + final String? target; + final ChessDeadline deadline; + final ChessColourPreference colour; + + const _NewGameChoice(this.target, this.deadline, this.colour); +} + +class _NewGameBody extends StatefulWidget { + final bool direct; + final List senders; + final ScrollController controller; + + const _NewGameBody({ + required this.direct, + required this.senders, + required this.controller, + }); + + @override + State<_NewGameBody> createState() => _NewGameBodyState(); +} + +class _NewGameBodyState extends State<_NewGameBody> { + String? _target; + ChessDeadline _deadline = ChessDeadline.defaultValue; + ChessColourPreference _colour = ChessColourPreference.random; + + @override + Widget build(BuildContext context) { + final l10n = context.l10n; + final ready = !widget.direct || _target != null; + return Column( + children: [ + BottomSheetHeader( + title: widget.direct + ? l10n.chess_newChallenge + : l10n.chess_newOpenInvite, + ), + Expanded( + child: ListView( + controller: widget.controller, + children: [ + if (widget.direct) ...[ + SectionHeader(l10n.chess_pickOpponent), + if (widget.senders.isEmpty) + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Text(l10n.chess_noRecentSenders), + ), + for (final name in widget.senders) + MeshSheetOption( + label: name, + selected: _target == name, + onTap: () => setState(() => _target = name), + ), + ], + SectionHeader(l10n.chess_deadlineLabel), + for (final d in ChessDeadline.values) + MeshSheetOption( + label: l10n.chessDeadlineLabel(d), + selected: _deadline == d, + onTap: () => setState(() => _deadline = d), + ), + SectionHeader(l10n.chess_colourLabel), + for (final c in ChessColourPreference.values) + MeshSheetOption( + label: l10n.chessColourLabel(c), + selected: _colour == c, + onTap: () => setState(() => _colour = c), + ), + const SizedBox(height: 8), + ], + ), + ), + Padding( + padding: const EdgeInsets.fromLTRB(16, 8, 16, 12), + child: SizedBox( + width: double.infinity, + child: FilledButton( + onPressed: ready + ? () => Navigator.pop( + context, + _NewGameChoice(_target, _deadline, _colour), + ) + : null, + child: Text( + widget.direct + ? l10n.chess_sendChallenge + : l10n.chess_postInvite, + ), + ), + ), + ), + ], + ); + } +} diff --git a/lib/games/chess/ui/chess_text.dart b/lib/games/chess/ui/chess_text.dart new file mode 100644 index 00000000..8bbad404 --- /dev/null +++ b/lib/games/chess/ui/chess_text.dart @@ -0,0 +1,67 @@ +import '../../../l10n/app_localizations.dart'; +import '../chess_game.dart'; +import '../chess_packets.dart'; + +/// Localized labels shared by the chess sheet and screen. +extension ChessText on AppLocalizations { + String chessDeadlineLabel(ChessDeadline d) => switch (d) { + ChessDeadline.none => chess_deadlineNone, + ChessDeadline.min15 => chess_deadline15m, + ChessDeadline.hour1 => chess_deadline1h, + ChessDeadline.hours6 => chess_deadline6h, + ChessDeadline.day1 => chess_deadline1d, + ChessDeadline.days3 => chess_deadline3d, + }; + + String chessColourLabel(ChessColourPreference c) => switch (c) { + ChessColourPreference.random => chess_colourRandom, + ChessColourPreference.white => chess_colourWhite, + ChessColourPreference.black => chess_colourBlack, + }; + + String chessEndReason(ChessEndReason r) => switch (r) { + ChessEndReason.checkmate => chess_endCheckmate, + ChessEndReason.resignation => chess_endResignation, + ChessEndReason.timeout => chess_endTimeout, + ChessEndReason.drawAgreed => chess_endDrawAgreed, + ChessEndReason.stalemate => chess_endStalemate, + ChessEndReason.insufficientMaterial => chess_endInsufficient, + ChessEndReason.fiftyMoves => chess_endFiftyMoves, + ChessEndReason.repetition => chess_endRepetition, + ChessEndReason.cancelled => chess_endCancelled, + ChessEndReason.declined => chess_endDeclined, + ChessEndReason.expired => chess_endExpired, + ChessEndReason.taken => chess_endTaken, + }; + + /// "Alice vs Bob", with placeholders for unknown players. + String chessPlayers(ChessGame game) => chess_vs( + game.nameOf(ChessSide.white) ?? chess_unknownPlayer, + game.nameOf(ChessSide.black) ?? chess_unknownPlayer, + ); + + /// Result line of a finished game: "Bob won · Checkmate" or "Draw · …". + String chessResult(ChessGame game) { + final reason = game.endReason; + final reasonText = reason == null ? '' : chessEndReason(reason); + final winner = game.winner; + final noGame = { + ChessEndReason.cancelled, + ChessEndReason.declined, + ChessEndReason.expired, + ChessEndReason.taken, + }.contains(reason); + if (noGame) return reasonText; + final head = winner == null + ? chess_resultDraw + : chess_resultWon(game.nameOf(winner) ?? chess_unknownPlayer); + return reasonText.isEmpty ? head : chess_resultWithReason(head, reasonText); + } + + /// Compact remaining time: "43 min", "5 h 10 min", "2 d 3 h". + String chessDuration(Duration d) { + if (d.inDays >= 1) return chess_timeDays(d.inDays, d.inHours % 24); + if (d.inHours >= 1) return chess_timeHours(d.inHours, d.inMinutes % 60); + return chess_timeMinutes(d.inMinutes < 1 ? 1 : d.inMinutes); + } +} diff --git a/lib/games/game_packet.dart b/lib/games/game_packet.dart new file mode 100644 index 00000000..fa19b221 --- /dev/null +++ b/lib/games/game_packet.dart @@ -0,0 +1,160 @@ +import 'dart:convert'; +import 'dart:typed_data'; + +/// GRP_DATA data type registered to MeshCore Open in the firmware's +/// `docs/number_allocations.md`. Everything inside it is owned by this app; +/// the first payload byte's high nibble says which game (or other app +/// feature) the packet belongs to. +const int meshcoreOpenDataType = 0x0100; + +/// Largest GRP_DATA payload a companion can deliver to us: the 172-byte +/// frame minus the 9-byte RESP_CODE_CHANNEL_DATA_RECV header. +const int maxGamePayloadBytes = 163; + +/// Size of the encrypted body on air for a payload of [payloadBytes]: the +/// firmware prepends data type (2) and length (1), then pads to the 16-byte +/// AES block. +int encryptedGamePayloadSize(int payloadBytes) => + ((payloadBytes + 3 + 15) ~/ 16) * 16; + +/// App identifiers carried in the high nibble of a packet's first byte. +abstract final class GameApp { + static const int chess = 1; +} + +/// The 4-byte header every game packet starts with: +/// `[app << 4 | kind][gameId LE16][ply mod 256]`. +class GamePacketHeader { + static const int length = 4; + + final int app; + final int kind; + final int gameId; + final int ply; + + const GamePacketHeader({ + required this.app, + required this.kind, + required this.gameId, + required this.ply, + }); + + void writeTo(BytesBuilder out) { + out + ..addByte(((app & 0x0F) << 4) | (kind & 0x0F)) + ..addByte(gameId & 0xFF) + ..addByte((gameId >> 8) & 0xFF) + ..addByte(ply & 0xFF); + } + + static GamePacketHeader? parse(Uint8List bytes) { + if (bytes.length < length) return null; + return GamePacketHeader( + app: bytes[0] >> 4, + kind: bytes[0] & 0x0F, + gameId: bytes[1] | (bytes[2] << 8), + ply: bytes[3], + ); + } + + /// The app nibble of [payload], or null when it is too short. + static int? appOf(Uint8List payload) => + payload.isEmpty ? null : payload[0] >> 4; +} + +/// Sequential reader over a packet body. Every read returns null (and stays +/// failed) once the data runs out, so decoders can bail out with one check. +class GamePacketReader { + final Uint8List _bytes; + int _offset; + bool _failed = false; + + GamePacketReader(this._bytes, [this._offset = 0]); + + bool get failed => _failed; + int get remaining => _failed ? 0 : _bytes.length - _offset; + bool get atEnd => remaining == 0; + + int? u8() { + if (_failed || _offset + 1 > _bytes.length) return _fail(); + return _bytes[_offset++]; + } + + int? u16() { + if (_failed || _offset + 2 > _bytes.length) return _fail(); + final v = _bytes[_offset] | (_bytes[_offset + 1] << 8); + _offset += 2; + return v; + } + + int? u32() { + if (_failed || _offset + 4 > _bytes.length) return _fail(); + final v = ByteData.sublistView( + _bytes, + _offset, + _offset + 4, + ).getUint32(0, Endian.little); + _offset += 4; + return v; + } + + Uint8List? bytes(int count) { + if (_failed || count < 0 || _offset + count > _bytes.length) { + return _fail(); + } + final v = Uint8List.fromList(_bytes.sublist(_offset, _offset + count)); + _offset += count; + return v; + } + + Uint8List? rest() => bytes(remaining); + + /// A length-prefixed UTF-8 string (see [writeShortString]). + String? shortString() { + final len = u8(); + if (len == null) return null; + final raw = bytes(len); + if (raw == null) return null; + return utf8.decode(raw, allowMalformed: true); + } + + Null _fail() { + _failed = true; + return null; + } +} + +/// Longest name, in UTF-8 bytes, a game packet carries. +const int maxGameNameBytes = 31; + +/// Writes [value] as a 1-byte length plus UTF-8, truncated on a character +/// boundary to [maxGameNameBytes]. +void writeShortString(BytesBuilder out, String value) { + final encoded = truncateUtf8(value, maxGameNameBytes); + out + ..addByte(encoded.length) + ..add(encoded); +} + +/// UTF-8 bytes of [value], cut to at most [maxBytes] without splitting a +/// character. +Uint8List truncateUtf8(String value, int maxBytes) { + final out = BytesBuilder(); + for (final rune in value.runes) { + final encoded = utf8.encode(String.fromCharCode(rune)); + if (out.length + encoded.length > maxBytes) break; + out.add(encoded); + } + return out.toBytes(); +} + +void writeU16(BytesBuilder out, int value) { + out + ..addByte(value & 0xFF) + ..addByte((value >> 8) & 0xFF); +} + +void writeU32(BytesBuilder out, int value) { + final b = ByteData(4)..setUint32(0, value & 0xFFFFFFFF, Endian.little); + out.add(b.buffer.asUint8List()); +} diff --git a/lib/games/hash_chain.dart b/lib/games/hash_chain.dart new file mode 100644 index 00000000..3636b01b --- /dev/null +++ b/lib/games/hash_chain.dart @@ -0,0 +1,71 @@ +import 'dart:math'; +import 'dart:typed_data'; + +import 'package:crypto/crypto.dart'; + +/// A one-way hash chain used to authenticate a player's actions without +/// 64-byte signatures. +/// +/// `v[length] = seed` and `v[i] = H(v[i + 1])`, where H is SHA-256 cut to +/// [valueBytes]. The player publishes `v[0]` (the commitment) when joining a +/// game and reveals `v[1]`, `v[2]`, … with each later action. Anyone holding +/// an earlier value can check a new one by hashing it forward, but only the +/// seed holder can produce the next one. +class HashChain { + static const int length = 512; + static const int valueBytes = 16; + + final Uint8List seed; + + HashChain(this.seed) : assert(seed.length == valueBytes); + + factory HashChain.generate([Random? random]) { + final rng = random ?? Random.secure(); + return HashChain( + Uint8List.fromList(List.generate(valueBytes, (_) => rng.nextInt(256))), + ); + } + + /// `v[index]`, for `0 <= index <= length`. + Uint8List valueAt(int index) { + RangeError.checkValueInInterval(index, 0, length, 'index'); + var v = seed; + for (var i = length; i > index; i--) { + v = hashChainStep(v); + } + return v; + } + + Uint8List get commitment => valueAt(0); +} + +/// One step towards the commitment: SHA-256 cut to [HashChain.valueBytes]. +Uint8List hashChainStep(Uint8List value) => + Uint8List.fromList(sha256.convert(value).bytes.sublist(0, 16)); + +/// How many chain steps [candidate] lies beyond [lastVerified]: 0 when it is +/// the same value (a duplicate), a positive count when hashing it forward +/// that many times reaches [lastVerified], or null when it is not on the +/// chain within [maxSteps] (forged, or older than [lastVerified]). +int? hashChainDistance( + Uint8List candidate, + Uint8List lastVerified, { + int maxSteps = HashChain.length, +}) { + if (candidate.length != HashChain.valueBytes) return null; + if (bytesEqual(candidate, lastVerified)) return 0; + var v = candidate; + for (var steps = 1; steps <= maxSteps; steps++) { + v = hashChainStep(v); + if (bytesEqual(v, lastVerified)) return steps; + } + return null; +} + +bool bytesEqual(List a, List b) { + if (a.length != b.length) return false; + for (var i = 0; i < a.length; i++) { + if (a[i] != b[i]) return false; + } + return true; +} diff --git a/lib/l10n/app_bg.arb b/lib/l10n/app_bg.arb index 9609a8a5..583b1e43 100644 --- a/lib/l10n/app_bg.arb +++ b/lib/l10n/app_bg.arb @@ -3802,5 +3802,110 @@ "modelDownload_verifying": "Проверка на изтеглянето", "modelDownload_useModel": "Използвай този модел", "modelDownload_removeFailed": "Моделът не можа да бъде премахнат: {error}", - "modelDownload_progress": "{current} / {total} MB ({percent}%)" + "modelDownload_progress": "{current} / {total} MB ({percent}%)", + "chess_menuGames": "Игри на шах", + "chess_menuGamesCount": "Игри на шах ({count})", + "chess_sheetTitle": "Шах", + "chess_sectionNewGame": "Нова игра", + "chess_sectionYourGames": "Вашите игри", + "chess_sectionInvites": "Отворени покани", + "chess_sectionLive": "Текущи игри", + "chess_sectionFinished": "Приключили", + "chess_newChallenge": "Предизвикай някого", + "chess_newChallengeSubtitle": "Изберете някого, чут наскоро в този канал", + "chess_newOpenInvite": "Публикувай отворена покана", + "chess_newOpenInviteSubtitle": "Всеки в този канал може да приеме", + "chess_emptyTitle": "Все още няма игри", + "chess_emptySubtitle": "Предизвикайте някого или публикувайте отворена покана. Всеки в канала може да наблюдава.", + "chess_vs": "{white} срещу {black}", + "chess_unknownPlayer": "Неизвестен", + "chess_rowYourOpenInvite": "Вашата отворена покана", + "chess_rowYourChallenge": "Предизвикахте {name}", + "chess_rowInviteFrom": "Игра с {name}", + "chess_rowStarting": "Изчакване играта да започне", + "chess_rowMoveTurn": "Ход {number} · {turn}", + "chess_rowOpenInvite": "{name} търси игра", + "chess_rowChallengedYou": "{name} ви предизвиква", + "chess_rowInviteDetails": "Време за ход: {deadline}", + "chess_accept": "Приеми", + "chess_decline": "Откажи", + "chess_remove": "Премахни", + "chess_cancelInvite": "Отмени поканата", + "chess_cancelInviteTitle": "Да се отмени ли тази покана?", + "chess_sendFailed": "Неуспешно изпращане. Проверете връзката с радиото.", + "chess_challengeSent": "Предизвикателството е изпратено до {name}", + "chess_inviteSent": "Отворената покана е публикувана", + "chess_pickOpponent": "Скоро никой не е писал в този канал.", + "chess_noRecentSenders": "Кого да предизвикате", + "chess_deadlineLabel": "Време за ход", + "chess_deadlineNone": "Без ограничение", + "chess_deadline15m": "15 минути", + "chess_deadline1h": "1 час", + "chess_deadline6h": "6 часа", + "chess_deadline1d": "1 ден", + "chess_deadline3d": "3 дни", + "chess_colourLabel": "Вашият цвят", + "chess_colourRandom": "Случаен", + "chess_colourWhite": "Бели", + "chess_colourBlack": "Черни", + "chess_sendChallenge": "Изпрати предизвикателство", + "chess_postInvite": "Публикувай поканата", + "chess_gameGone": "Тази игра вече не е налична.", + "chess_playerYou": "{name} (вие)", + "chess_toMoveChip": "На ход", + "chess_statusYourMove": "Вашият ход", + "chess_statusWaiting": "Изчакване на {name}", + "chess_statusToMove": "{name} е на ход", + "chess_statusTimeLeft": "Остава {time} за този ход", + "chess_statusOverdue": "Времето за този ход изтече", + "chess_statusDrawOffered": "{name} предлага реми", + "chess_statusUnknownPosition": "Дъската ще се появи със следващия ход.", + "chess_statusUnverified": "Играчите още не са потвърдени. Поискайте обновяване, за да ги проверите.", + "chess_actionResign": "Предай се", + "chess_actionOfferDraw": "Предложи реми", + "chess_actionAcceptDraw": "Приеми реми", + "chess_actionClaimTimeout": "Поискай победа по време", + "chess_actionNudge": "Поискай обновяване", + "chess_actionNudgeTooltip": "Помолете играчите да изпратят отново последния ход", + "chess_resignConfirmTitle": "Да се предадете ли в тази игра?", + "chess_resignConfirmBody": "Противникът ви печели.", + "chess_movesTitle": "Ходове", + "chess_noMovesYet": "Още няма ходове", + "chess_movesMissed": "(пропуснат)", + "chess_promoteTitle": "Промоция в", + "chess_pieceQueen": "Дама", + "chess_pieceRook": "Топ", + "chess_pieceBishop": "Офицер", + "chess_pieceKnight": "Кон", + "chess_resultDraw": "Реми", + "chess_resultWon": "{name} печели", + "chess_resultWithReason": "{result} · {reason}", + "chess_endCheckmate": "Мат", + "chess_endResignation": "Предаване", + "chess_endTimeout": "По време", + "chess_endDrawAgreed": "Реми по споразумение", + "chess_endStalemate": "Пат", + "chess_endInsufficient": "Недостатъчно материал за мат", + "chess_endFiftyMoves": "Правило за 50 хода", + "chess_endRepetition": "Повторение", + "chess_endCancelled": "Поканата е отменена", + "chess_endDeclined": "Предизвикателството е отхвърлено", + "chess_endExpired": "Поканата е изтекла", + "chess_endTaken": "Някой друг прие първи", + "chess_timeMinutes": "{minutes} мин", + "chess_timeHours": "{hours} ч {minutes} мин", + "chess_timeDays": "{days} д {hours} ч", + "chess_notificationSender": "Шах", + "chess_notifyChallenge": "{name} ви предизвиква на игра", + "chess_notifyAccepted": "{name} прие играта ви", + "chess_notifyAcceptedYourMove": "{name} прие играта ви. Играете с белите, ваш ред е.", + "chess_notifyDeclined": "{name} отхвърли предизвикателството ви", + "chess_notifyTaken": "Някой друг прие тази игра първи", + "chess_notifyGameStartedYourMove": "Играта ви започна. Играете с белите, ваш ред е.", + "chess_notifyYourMove": "{name} изигра {move}. Ваш ред е.", + "chess_notifyGameOver": "Играта ви с {name} приключи", + "chess_notifyResigned": "{name} се предаде. Вие печелите.", + "chess_notifyDrawOffered": "{name} предлага реми", + "chess_notifyDrawAccepted": "{name} прие реми", + "chess_notifyTimeout": "{name} поиска победа по време" } diff --git a/lib/l10n/app_cs.arb b/lib/l10n/app_cs.arb index ddf97e6f..de102983 100644 --- a/lib/l10n/app_cs.arb +++ b/lib/l10n/app_cs.arb @@ -4415,5 +4415,110 @@ "modelDownload_verifying": "Ověřování stažení", "modelDownload_useModel": "Použít tento model", "modelDownload_removeFailed": "Model se nepodařilo odebrat: {error}", - "modelDownload_progress": "{current} / {total} MB ({percent}%)" + "modelDownload_progress": "{current} / {total} MB ({percent}%)", + "chess_menuGames": "Šachové hry", + "chess_menuGamesCount": "Šachové hry ({count})", + "chess_sheetTitle": "Šachy", + "chess_sectionNewGame": "Nová hra", + "chess_sectionYourGames": "Vaše hry", + "chess_sectionInvites": "Otevřené výzvy", + "chess_sectionLive": "Probíhající hry", + "chess_sectionFinished": "Dohrané", + "chess_newChallenge": "Vyzvat někoho", + "chess_newChallengeSubtitle": "Vyberte někoho, koho jste nedávno slyšeli na tomto kanálu", + "chess_newOpenInvite": "Zveřejnit otevřenou výzvu", + "chess_newOpenInviteSubtitle": "Přijmout ji může kdokoli na tomto kanálu", + "chess_emptyTitle": "Zatím žádné hry", + "chess_emptySubtitle": "Vyzvěte někoho nebo zveřejněte otevřenou výzvu. Kdokoli na kanálu se může dívat.", + "chess_vs": "{white} vs {black}", + "chess_unknownPlayer": "Neznámý", + "chess_rowYourOpenInvite": "Vaše otevřená výzva", + "chess_rowYourChallenge": "Vyzvali jste hráče {name}", + "chess_rowInviteFrom": "Hra s hráčem {name}", + "chess_rowStarting": "Čekání na zahájení hry", + "chess_rowMoveTurn": "Tah {number} · {turn}", + "chess_rowOpenInvite": "{name} hledá soupeře", + "chess_rowChallengedYou": "{name} vás vyzývá", + "chess_rowInviteDetails": "Čas na tah: {deadline}", + "chess_accept": "Přijmout", + "chess_decline": "Odmítnout", + "chess_remove": "Odstranit", + "chess_cancelInvite": "Zrušit výzvu", + "chess_cancelInviteTitle": "Zrušit tuto výzvu?", + "chess_sendFailed": "Odeslání se nezdařilo. Zkontrolujte spojení s rádiem.", + "chess_challengeSent": "Výzva odeslána hráči {name}", + "chess_inviteSent": "Otevřená výzva zveřejněna", + "chess_pickOpponent": "Koho vyzvat", + "chess_noRecentSenders": "Na tomto kanálu nedávno nikdo nepsal.", + "chess_deadlineLabel": "Čas na tah", + "chess_deadlineNone": "Bez limitu", + "chess_deadline15m": "15 minut", + "chess_deadline1h": "1 hodina", + "chess_deadline6h": "6 hodin", + "chess_deadline1d": "1 den", + "chess_deadline3d": "3 dny", + "chess_colourLabel": "Vaše barva", + "chess_colourRandom": "Náhodná", + "chess_colourWhite": "Bílá", + "chess_colourBlack": "Černá", + "chess_sendChallenge": "Odeslat výzvu", + "chess_postInvite": "Zveřejnit výzvu", + "chess_gameGone": "Tato hra už není k dispozici.", + "chess_playerYou": "{name} (vy)", + "chess_toMoveChip": "Na tahu", + "chess_statusYourMove": "Váš tah", + "chess_statusWaiting": "Čekání na hráče {name}", + "chess_statusToMove": "Na tahu: {name}", + "chess_statusTimeLeft": "Na tento tah zbývá {time}", + "chess_statusOverdue": "Čas na tento tah vypršel", + "chess_statusDrawOffered": "{name} nabízí remízu", + "chess_statusUnknownPosition": "Šachovnice se zobrazí s dalším tahem.", + "chess_statusUnverified": "Hráči zatím nejsou potvrzeni. Vyžádejte si aktualizaci a ověřte je.", + "chess_actionResign": "Vzdát se", + "chess_actionOfferDraw": "Nabídnout remízu", + "chess_actionAcceptDraw": "Přijmout remízu", + "chess_actionClaimTimeout": "Uplatnit výhru na čas", + "chess_actionNudge": "Vyžádat aktualizaci", + "chess_actionNudgeTooltip": "Požádat hráče o opětovné odeslání posledního tahu", + "chess_resignConfirmTitle": "Vzdát se této hry?", + "chess_resignConfirmBody": "Soupeř vyhrává.", + "chess_movesTitle": "Tahy", + "chess_noMovesYet": "Zatím žádné tahy", + "chess_movesMissed": "(zmeškáno)", + "chess_promoteTitle": "Proměnit na", + "chess_pieceQueen": "Dáma", + "chess_pieceRook": "Věž", + "chess_pieceBishop": "Střelec", + "chess_pieceKnight": "Jezdec", + "chess_resultDraw": "Remíza", + "chess_resultWon": "Vítězí {name}", + "chess_resultWithReason": "{result} · {reason}", + "chess_endCheckmate": "Mat", + "chess_endResignation": "Vzdání se", + "chess_endTimeout": "Na čas", + "chess_endDrawAgreed": "Remíza dohodou", + "chess_endStalemate": "Pat", + "chess_endInsufficient": "Nedostatek materiálu k matu", + "chess_endFiftyMoves": "Pravidlo 50 tahů", + "chess_endRepetition": "Opakování pozice", + "chess_endCancelled": "Výzva zrušena", + "chess_endDeclined": "Výzva odmítnuta", + "chess_endExpired": "Výzva vypršela", + "chess_endTaken": "Přijal ji někdo jiný", + "chess_timeMinutes": "{minutes} min", + "chess_timeHours": "{hours} h {minutes} min", + "chess_timeDays": "{days} d {hours} h", + "chess_notificationSender": "Šachy", + "chess_notifyChallenge": "{name} vás vyzývá ke hře", + "chess_notifyAccepted": "Hráč {name} přijal vaši hru", + "chess_notifyAcceptedYourMove": "Hráč {name} přijal vaši hru. Hrajete bílými, jste na tahu.", + "chess_notifyDeclined": "Hráč {name} odmítl vaši výzvu", + "chess_notifyTaken": "Tuto hru přijal dřív někdo jiný", + "chess_notifyGameStartedYourMove": "Vaše hra začala. Hrajete bílými, jste na tahu.", + "chess_notifyYourMove": "Hráč {name} táhl {move}. Jste na tahu.", + "chess_notifyGameOver": "Vaše hra s hráčem {name} skončila", + "chess_notifyResigned": "Hráč {name} se vzdal. Vyhráváte.", + "chess_notifyDrawOffered": "{name} nabízí remízu", + "chess_notifyDrawAccepted": "Hráč {name} přijal remízu", + "chess_notifyTimeout": "Hráč {name} uplatnil výhru na čas" } diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index 27e27770..b296fd4a 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -3937,5 +3937,110 @@ "modelDownload_verifying": "Download wird geprüft", "modelDownload_useModel": "Dieses Modell verwenden", "modelDownload_removeFailed": "Das Modell konnte nicht entfernt werden: {error}", - "modelDownload_progress": "{current} / {total} MB ({percent}%)" + "modelDownload_progress": "{current} / {total} MB ({percent}%)", + "chess_menuGames": "Schachpartien", + "chess_menuGamesCount": "Schachpartien ({count})", + "chess_sheetTitle": "Schach", + "chess_sectionNewGame": "Neue Partie", + "chess_sectionYourGames": "Ihre Partien", + "chess_sectionInvites": "Offene Einladungen", + "chess_sectionLive": "Laufende Partien", + "chess_sectionFinished": "Beendet", + "chess_newChallenge": "Jemanden herausfordern", + "chess_newChallengeSubtitle": "Zuletzt in diesem Kanal gehörte Person wählen", + "chess_newOpenInvite": "Offene Einladung senden", + "chess_newOpenInviteSubtitle": "Jeder in diesem Kanal kann annehmen", + "chess_emptyTitle": "Noch keine Partien", + "chess_emptySubtitle": "Fordern Sie jemanden heraus oder senden Sie eine offene Einladung. Jeder im Kanal kann zusehen.", + "chess_vs": "{white} gegen {black}", + "chess_unknownPlayer": "Unbekannt", + "chess_rowYourOpenInvite": "Ihre offene Einladung", + "chess_rowYourChallenge": "Sie haben {name} herausgefordert", + "chess_rowInviteFrom": "Partie mit {name}", + "chess_rowStarting": "Warten auf den Spielbeginn", + "chess_rowMoveTurn": "Zug {number} · {turn}", + "chess_rowOpenInvite": "{name} sucht eine Partie", + "chess_rowChallengedYou": "{name} hat Sie herausgefordert", + "chess_rowInviteDetails": "Bedenkzeit pro Zug: {deadline}", + "chess_accept": "Annehmen", + "chess_decline": "Ablehnen", + "chess_remove": "Entfernen", + "chess_cancelInvite": "Einladung zurückziehen", + "chess_cancelInviteTitle": "Diese Einladung zurückziehen?", + "chess_sendFailed": "Senden fehlgeschlagen. Funkverbindung prüfen.", + "chess_challengeSent": "Herausforderung an {name} gesendet", + "chess_inviteSent": "Offene Einladung gesendet", + "chess_pickOpponent": "Wen herausfordern", + "chess_noRecentSenders": "In diesem Kanal hat zuletzt niemand geschrieben.", + "chess_deadlineLabel": "Bedenkzeit pro Zug", + "chess_deadlineNone": "Keine Begrenzung", + "chess_deadline15m": "15 Minuten", + "chess_deadline1h": "1 Stunde", + "chess_deadline6h": "6 Stunden", + "chess_deadline1d": "1 Tag", + "chess_deadline3d": "3 Tage", + "chess_colourLabel": "Ihre Farbe", + "chess_colourRandom": "Zufällig", + "chess_colourWhite": "Weiß", + "chess_colourBlack": "Schwarz", + "chess_sendChallenge": "Herausforderung senden", + "chess_postInvite": "Einladung senden", + "chess_gameGone": "Diese Partie ist nicht mehr verfügbar.", + "chess_playerYou": "{name} (Sie)", + "chess_toMoveChip": "Am Zug", + "chess_statusYourMove": "Sie sind am Zug", + "chess_statusWaiting": "Warten auf {name}", + "chess_statusToMove": "{name} ist am Zug", + "chess_statusTimeLeft": "Noch {time} für diesen Zug", + "chess_statusOverdue": "Die Zeit für diesen Zug ist abgelaufen", + "chess_statusDrawOffered": "{name} bietet Remis an", + "chess_statusUnknownPosition": "Das Brett erscheint mit dem nächsten Zug.", + "chess_statusUnverified": "Spieler noch nicht bestätigt. Aktualisierung anfordern, um sie zu prüfen.", + "chess_actionResign": "Aufgeben", + "chess_actionOfferDraw": "Remis anbieten", + "chess_actionAcceptDraw": "Remis annehmen", + "chess_actionClaimTimeout": "Sieg wegen Zeit beanspruchen", + "chess_actionNudge": "Aktualisierung anfordern", + "chess_actionNudgeTooltip": "Die Spieler bitten, den letzten Zug erneut zu senden", + "chess_resignConfirmTitle": "Partie aufgeben?", + "chess_resignConfirmBody": "Ihr Gegner gewinnt.", + "chess_movesTitle": "Züge", + "chess_noMovesYet": "Noch keine Züge", + "chess_movesMissed": "(verpasst)", + "chess_promoteTitle": "Umwandeln in", + "chess_pieceQueen": "Dame", + "chess_pieceRook": "Turm", + "chess_pieceBishop": "Läufer", + "chess_pieceKnight": "Springer", + "chess_resultDraw": "Remis", + "chess_resultWon": "{name} hat gewonnen", + "chess_resultWithReason": "{result} · {reason}", + "chess_endCheckmate": "Schachmatt", + "chess_endResignation": "Aufgabe", + "chess_endTimeout": "Zeit", + "chess_endDrawAgreed": "Remis vereinbart", + "chess_endStalemate": "Patt", + "chess_endInsufficient": "Nicht genug Material für ein Matt", + "chess_endFiftyMoves": "50-Züge-Regel", + "chess_endRepetition": "Stellungswiederholung", + "chess_endCancelled": "Einladung zurückgezogen", + "chess_endDeclined": "Herausforderung abgelehnt", + "chess_endExpired": "Einladung abgelaufen", + "chess_endTaken": "Jemand anderes war schneller", + "chess_timeMinutes": "{minutes} Min.", + "chess_timeHours": "{hours} Std. {minutes} Min.", + "chess_timeDays": "{days} T. {hours} Std.", + "chess_notificationSender": "Schach", + "chess_notifyChallenge": "{name} hat Sie zu einer Partie herausgefordert", + "chess_notifyAccepted": "{name} hat Ihre Partie angenommen", + "chess_notifyAcceptedYourMove": "{name} hat Ihre Partie angenommen. Sie spielen Weiß und sind am Zug.", + "chess_notifyDeclined": "{name} hat Ihre Herausforderung abgelehnt", + "chess_notifyTaken": "Jemand anderes hat die Partie zuerst angenommen", + "chess_notifyGameStartedYourMove": "Ihre Partie hat begonnen. Sie spielen Weiß und sind am Zug.", + "chess_notifyYourMove": "{name} hat {move} gespielt. Sie sind am Zug.", + "chess_notifyGameOver": "Ihre Partie mit {name} ist beendet", + "chess_notifyResigned": "{name} hat aufgegeben. Sie gewinnen.", + "chess_notifyDrawOffered": "{name} bietet Remis an", + "chess_notifyDrawAccepted": "{name} hat das Remis angenommen", + "chess_notifyTimeout": "{name} hat den Sieg wegen Zeit beansprucht" } diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index fb372f12..0a67f4c4 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -4463,5 +4463,331 @@ "coordinateMap_title": "Location", "coordinate_copyLocation": "Copy location", "coordinate_openInMaps": "Open in maps", - "coordinate_copied": "Location copied" + "coordinate_copied": "Location copied", + "chess_menuGames": "Chess games", + "chess_menuGamesCount": "Chess games ({count})", + "@chess_menuGamesCount": { + "placeholders": { + "count": { + "type": "int" + } + } + }, + "chess_sheetTitle": "Chess", + "chess_sectionNewGame": "New game", + "chess_sectionYourGames": "Your games", + "chess_sectionInvites": "Open invites", + "chess_sectionLive": "Live games", + "chess_sectionFinished": "Finished", + "chess_newChallenge": "Challenge someone", + "chess_newChallengeSubtitle": "Pick someone recently heard on this channel", + "chess_newOpenInvite": "Post an open invite", + "chess_newOpenInviteSubtitle": "Anyone on this channel can accept", + "chess_emptyTitle": "No games yet", + "chess_emptySubtitle": "Challenge someone or post an open invite. Anyone on the channel can watch.", + "chess_vs": "{white} vs {black}", + "@chess_vs": { + "placeholders": { + "white": { + "type": "String" + }, + "black": { + "type": "String" + } + } + }, + "chess_unknownPlayer": "Unknown", + "chess_rowYourOpenInvite": "Your open invite", + "chess_rowYourChallenge": "You challenged {name}", + "@chess_rowYourChallenge": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "chess_rowInviteFrom": "Game with {name}", + "@chess_rowInviteFrom": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "chess_rowStarting": "Waiting for the game to start", + "chess_rowMoveTurn": "Move {number} · {turn}", + "@chess_rowMoveTurn": { + "placeholders": { + "number": { + "type": "int" + }, + "turn": { + "type": "String" + } + } + }, + "chess_rowOpenInvite": "{name} is looking for a game", + "@chess_rowOpenInvite": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "chess_rowChallengedYou": "{name} challenged you", + "@chess_rowChallengedYou": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "chess_rowInviteDetails": "Time per move: {deadline}", + "@chess_rowInviteDetails": { + "placeholders": { + "deadline": { + "type": "String" + } + } + }, + "chess_accept": "Accept", + "chess_decline": "Decline", + "chess_remove": "Remove", + "chess_cancelInvite": "Cancel invite", + "chess_cancelInviteTitle": "Cancel this invite?", + "chess_sendFailed": "Couldn't send. Check the radio connection.", + "chess_challengeSent": "Challenge sent to {name}", + "@chess_challengeSent": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "chess_inviteSent": "Open invite posted", + "chess_pickOpponent": "Who to challenge", + "chess_noRecentSenders": "Nobody has posted on this channel recently.", + "chess_deadlineLabel": "Time per move", + "chess_deadlineNone": "No limit", + "chess_deadline15m": "15 minutes", + "chess_deadline1h": "1 hour", + "chess_deadline6h": "6 hours", + "chess_deadline1d": "1 day", + "chess_deadline3d": "3 days", + "chess_colourLabel": "Your colour", + "chess_colourRandom": "Random", + "chess_colourWhite": "White", + "chess_colourBlack": "Black", + "chess_sendChallenge": "Send challenge", + "chess_postInvite": "Post invite", + "chess_gameGone": "This game is no longer available.", + "chess_playerYou": "{name} (you)", + "@chess_playerYou": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "chess_toMoveChip": "To move", + "chess_statusYourMove": "Your move", + "chess_statusWaiting": "Waiting for {name}", + "@chess_statusWaiting": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "chess_statusToMove": "{name} to move", + "@chess_statusToMove": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "chess_statusTimeLeft": "{time} left for this move", + "@chess_statusTimeLeft": { + "placeholders": { + "time": { + "type": "String" + } + } + }, + "chess_statusOverdue": "Time for this move is up", + "chess_statusDrawOffered": "{name} offers a draw", + "@chess_statusDrawOffered": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "chess_statusUnknownPosition": "The board appears with the next move.", + "chess_statusUnverified": "Players not confirmed yet. Ask for an update to check them.", + "chess_actionResign": "Resign", + "chess_actionOfferDraw": "Offer draw", + "chess_actionAcceptDraw": "Accept draw", + "chess_actionClaimTimeout": "Claim win on time", + "chess_actionNudge": "Ask for update", + "chess_actionNudgeTooltip": "Ask the players to resend the latest move", + "chess_resignConfirmTitle": "Resign this game?", + "chess_resignConfirmBody": "Your opponent wins.", + "chess_movesTitle": "Moves", + "chess_noMovesYet": "No moves yet", + "chess_movesMissed": "(missed)", + "chess_promoteTitle": "Promote to", + "chess_pieceQueen": "Queen", + "chess_pieceRook": "Rook", + "chess_pieceBishop": "Bishop", + "chess_pieceKnight": "Knight", + "chess_resultDraw": "Draw", + "chess_resultWon": "{name} won", + "@chess_resultWon": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "chess_resultWithReason": "{result} · {reason}", + "@chess_resultWithReason": { + "placeholders": { + "result": { + "type": "String" + }, + "reason": { + "type": "String" + } + } + }, + "chess_endCheckmate": "Checkmate", + "chess_endResignation": "Resignation", + "chess_endTimeout": "On time", + "chess_endDrawAgreed": "Draw agreed", + "chess_endStalemate": "Stalemate", + "chess_endInsufficient": "Not enough pieces to mate", + "chess_endFiftyMoves": "50-move rule", + "chess_endRepetition": "Repetition", + "chess_endCancelled": "Invite cancelled", + "chess_endDeclined": "Challenge declined", + "chess_endExpired": "Invite expired", + "chess_endTaken": "Someone else accepted first", + "chess_timeMinutes": "{minutes} min", + "@chess_timeMinutes": { + "placeholders": { + "minutes": { + "type": "int" + } + } + }, + "chess_timeHours": "{hours} h {minutes} min", + "@chess_timeHours": { + "placeholders": { + "hours": { + "type": "int" + }, + "minutes": { + "type": "int" + } + } + }, + "chess_timeDays": "{days} d {hours} h", + "@chess_timeDays": { + "placeholders": { + "days": { + "type": "int" + }, + "hours": { + "type": "int" + } + } + }, + "chess_notificationSender": "Chess", + "chess_notifyChallenge": "{name} challenged you to a game", + "@chess_notifyChallenge": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "chess_notifyAccepted": "{name} accepted your game", + "@chess_notifyAccepted": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "chess_notifyAcceptedYourMove": "{name} accepted your game. You play white, your move.", + "@chess_notifyAcceptedYourMove": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "chess_notifyDeclined": "{name} declined your challenge", + "@chess_notifyDeclined": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "chess_notifyTaken": "Someone else accepted that game first", + "chess_notifyGameStartedYourMove": "Your game started. You play white, your move.", + "chess_notifyYourMove": "{name} played {move}. Your move.", + "@chess_notifyYourMove": { + "placeholders": { + "name": { + "type": "String" + }, + "move": { + "type": "String" + } + } + }, + "chess_notifyGameOver": "Your game with {name} is over", + "@chess_notifyGameOver": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "chess_notifyResigned": "{name} resigned. You win.", + "@chess_notifyResigned": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "chess_notifyDrawOffered": "{name} offers a draw", + "@chess_notifyDrawOffered": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "chess_notifyDrawAccepted": "{name} accepted the draw", + "@chess_notifyDrawAccepted": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "chess_notifyTimeout": "{name} claimed a win on time", + "@chess_notifyTimeout": { + "placeholders": { + "name": { + "type": "String" + } + } + } } diff --git a/lib/l10n/app_es.arb b/lib/l10n/app_es.arb index a995ed2b..a096ac35 100644 --- a/lib/l10n/app_es.arb +++ b/lib/l10n/app_es.arb @@ -3988,5 +3988,110 @@ "modelDownload_verifying": "Comprobando la descarga", "modelDownload_useModel": "Usar este modelo", "modelDownload_removeFailed": "No se pudo quitar el modelo: {error}", - "modelDownload_progress": "{current} / {total} MB ({percent}%)" + "modelDownload_progress": "{current} / {total} MB ({percent}%)", + "chess_menuGames": "Partidas de ajedrez", + "chess_menuGamesCount": "Partidas de ajedrez ({count})", + "chess_sheetTitle": "Ajedrez", + "chess_sectionNewGame": "Nueva partida", + "chess_sectionYourGames": "Tus partidas", + "chess_sectionInvites": "Invitaciones abiertas", + "chess_sectionLive": "Partidas en vivo", + "chess_sectionFinished": "Terminadas", + "chess_newChallenge": "Retar a alguien", + "chess_newChallengeSubtitle": "Elige a alguien oído recientemente en este canal", + "chess_newOpenInvite": "Publicar una invitación abierta", + "chess_newOpenInviteSubtitle": "Cualquiera en este canal puede aceptar", + "chess_emptyTitle": "Aún no hay partidas", + "chess_emptySubtitle": "Reta a alguien o publica una invitación abierta. Cualquiera en el canal puede mirar.", + "chess_vs": "{white} contra {black}", + "chess_unknownPlayer": "Desconocido", + "chess_rowYourOpenInvite": "Tu invitación abierta", + "chess_rowYourChallenge": "Has retado a {name}", + "chess_rowInviteFrom": "Partida con {name}", + "chess_rowStarting": "Esperando a que empiece la partida", + "chess_rowMoveTurn": "Jugada {number} · {turn}", + "chess_rowOpenInvite": "{name} busca partida", + "chess_rowChallengedYou": "{name} te ha retado", + "chess_rowInviteDetails": "Tiempo por jugada: {deadline}", + "chess_accept": "Aceptar", + "chess_decline": "Rechazar", + "chess_remove": "Quitar", + "chess_cancelInvite": "Cancelar invitación", + "chess_cancelInviteTitle": "¿Cancelar esta invitación?", + "chess_sendFailed": "No se pudo enviar. Revisa la conexión con la radio.", + "chess_challengeSent": "Reto enviado a {name}", + "chess_inviteSent": "Invitación abierta publicada", + "chess_pickOpponent": "A quién retar", + "chess_noRecentSenders": "Nadie ha publicado en este canal recientemente.", + "chess_deadlineLabel": "Tiempo por jugada", + "chess_deadlineNone": "Sin límite", + "chess_deadline15m": "15 minutos", + "chess_deadline1h": "1 hora", + "chess_deadline6h": "6 horas", + "chess_deadline1d": "1 día", + "chess_deadline3d": "3 días", + "chess_colourLabel": "Tu color", + "chess_colourRandom": "Aleatorio", + "chess_colourWhite": "Blancas", + "chess_colourBlack": "Negras", + "chess_sendChallenge": "Enviar reto", + "chess_postInvite": "Publicar invitación", + "chess_gameGone": "Esta partida ya no está disponible.", + "chess_playerYou": "{name} (tú)", + "chess_toMoveChip": "Su turno", + "chess_statusYourMove": "Te toca", + "chess_statusWaiting": "Esperando a {name}", + "chess_statusToMove": "Mueve {name}", + "chess_statusTimeLeft": "Quedan {time} para esta jugada", + "chess_statusOverdue": "Se acabó el tiempo de esta jugada", + "chess_statusDrawOffered": "{name} ofrece tablas", + "chess_statusUnknownPosition": "El tablero aparecerá con la siguiente jugada.", + "chess_statusUnverified": "Jugadores aún sin confirmar. Pide una actualización para comprobarlos.", + "chess_actionResign": "Abandonar", + "chess_actionOfferDraw": "Ofrecer tablas", + "chess_actionAcceptDraw": "Aceptar tablas", + "chess_actionClaimTimeout": "Reclamar victoria por tiempo", + "chess_actionNudge": "Pedir actualización", + "chess_actionNudgeTooltip": "Pide a los jugadores que reenvíen la última jugada", + "chess_resignConfirmTitle": "¿Abandonar esta partida?", + "chess_resignConfirmBody": "Tu oponente gana.", + "chess_movesTitle": "Jugadas", + "chess_noMovesYet": "Aún no hay jugadas", + "chess_movesMissed": "(perdida)", + "chess_promoteTitle": "Coronar a", + "chess_pieceQueen": "Dama", + "chess_pieceRook": "Torre", + "chess_pieceBishop": "Alfil", + "chess_pieceKnight": "Caballo", + "chess_resultDraw": "Tablas", + "chess_resultWon": "Ganó {name}", + "chess_resultWithReason": "{result} · {reason}", + "chess_endCheckmate": "Jaque mate", + "chess_endResignation": "Abandono", + "chess_endTimeout": "Por tiempo", + "chess_endDrawAgreed": "Tablas por acuerdo", + "chess_endStalemate": "Rey ahogado", + "chess_endInsufficient": "Material insuficiente para dar mate", + "chess_endFiftyMoves": "Regla de los 50 movimientos", + "chess_endRepetition": "Repetición", + "chess_endCancelled": "Invitación cancelada", + "chess_endDeclined": "Reto rechazado", + "chess_endExpired": "Invitación caducada", + "chess_endTaken": "Otra persona aceptó antes", + "chess_timeMinutes": "{minutes} min", + "chess_timeHours": "{hours} h {minutes} min", + "chess_timeDays": "{days} d {hours} h", + "chess_notificationSender": "Ajedrez", + "chess_notifyChallenge": "{name} te ha retado a una partida", + "chess_notifyAccepted": "{name} ha aceptado tu partida", + "chess_notifyAcceptedYourMove": "{name} ha aceptado tu partida. Juegas con blancas, te toca.", + "chess_notifyDeclined": "{name} ha rechazado tu reto", + "chess_notifyTaken": "Otra persona aceptó esa partida antes", + "chess_notifyGameStartedYourMove": "Tu partida ha empezado. Juegas con blancas, te toca.", + "chess_notifyYourMove": "{name} jugó {move}. Te toca.", + "chess_notifyGameOver": "Tu partida con {name} ha terminado", + "chess_notifyResigned": "{name} abandonó. Ganas tú.", + "chess_notifyDrawOffered": "{name} ofrece tablas", + "chess_notifyDrawAccepted": "{name} ha aceptado las tablas", + "chess_notifyTimeout": "{name} reclamó la victoria por tiempo" } diff --git a/lib/l10n/app_fr.arb b/lib/l10n/app_fr.arb index 98a5ba74..9793d27f 100644 --- a/lib/l10n/app_fr.arb +++ b/lib/l10n/app_fr.arb @@ -3936,5 +3936,110 @@ "modelDownload_verifying": "Vérification du téléchargement", "modelDownload_useModel": "Utiliser ce modèle", "modelDownload_removeFailed": "Impossible de retirer le modèle : {error}", - "modelDownload_progress": "{current} / {total} MB ({percent}%)" + "modelDownload_progress": "{current} / {total} MB ({percent}%)", + "chess_menuGames": "Parties d'échecs", + "chess_menuGamesCount": "Parties d'échecs ({count})", + "chess_sheetTitle": "Échecs", + "chess_sectionNewGame": "Nouvelle partie", + "chess_sectionYourGames": "Vos parties", + "chess_sectionInvites": "Invitations ouvertes", + "chess_sectionLive": "Parties en direct", + "chess_sectionFinished": "Terminées", + "chess_newChallenge": "Défier quelqu'un", + "chess_newChallengeSubtitle": "Choisissez une personne entendue récemment sur ce canal", + "chess_newOpenInvite": "Publier une invitation ouverte", + "chess_newOpenInviteSubtitle": "Toute personne sur ce canal peut accepter", + "chess_emptyTitle": "Aucune partie pour l'instant", + "chess_emptySubtitle": "Défiez quelqu'un ou publiez une invitation ouverte. Tout le monde sur le canal peut regarder.", + "chess_vs": "{white} contre {black}", + "chess_unknownPlayer": "Inconnu", + "chess_rowYourOpenInvite": "Votre invitation ouverte", + "chess_rowYourChallenge": "Vous avez défié {name}", + "chess_rowInviteFrom": "Partie avec {name}", + "chess_rowStarting": "En attente du début de la partie", + "chess_rowMoveTurn": "Coup {number} · {turn}", + "chess_rowOpenInvite": "{name} cherche un adversaire", + "chess_rowChallengedYou": "{name} vous a défié", + "chess_rowInviteDetails": "Temps par coup : {deadline}", + "chess_accept": "Accepter", + "chess_decline": "Refuser", + "chess_remove": "Retirer", + "chess_cancelInvite": "Annuler l'invitation", + "chess_cancelInviteTitle": "Annuler cette invitation ?", + "chess_sendFailed": "Envoi impossible. Vérifiez la connexion à la radio.", + "chess_challengeSent": "Défi envoyé à {name}", + "chess_inviteSent": "Invitation ouverte publiée", + "chess_pickOpponent": "Qui défier", + "chess_noRecentSenders": "Personne n'a publié sur ce canal récemment.", + "chess_deadlineLabel": "Temps par coup", + "chess_deadlineNone": "Sans limite", + "chess_deadline15m": "15 minutes", + "chess_deadline1h": "1 heure", + "chess_deadline6h": "6 heures", + "chess_deadline1d": "1 jour", + "chess_deadline3d": "3 jours", + "chess_colourLabel": "Votre couleur", + "chess_colourRandom": "Aléatoire", + "chess_colourWhite": "Blancs", + "chess_colourBlack": "Noirs", + "chess_sendChallenge": "Envoyer le défi", + "chess_postInvite": "Publier l'invitation", + "chess_gameGone": "Cette partie n'est plus disponible.", + "chess_playerYou": "{name} (vous)", + "chess_toMoveChip": "Au trait", + "chess_statusYourMove": "À vous de jouer", + "chess_statusWaiting": "En attente de {name}", + "chess_statusToMove": "{name} au trait", + "chess_statusTimeLeft": "{time} restant pour ce coup", + "chess_statusOverdue": "Le temps pour ce coup est écoulé", + "chess_statusDrawOffered": "{name} propose la nulle", + "chess_statusUnknownPosition": "L'échiquier apparaîtra au prochain coup.", + "chess_statusUnverified": "Joueurs pas encore confirmés. Demandez une mise à jour pour les vérifier.", + "chess_actionResign": "Abandonner", + "chess_actionOfferDraw": "Proposer la nulle", + "chess_actionAcceptDraw": "Accepter la nulle", + "chess_actionClaimTimeout": "Réclamer la victoire au temps", + "chess_actionNudge": "Demander une mise à jour", + "chess_actionNudgeTooltip": "Demander aux joueurs de renvoyer le dernier coup", + "chess_resignConfirmTitle": "Abandonner cette partie ?", + "chess_resignConfirmBody": "Votre adversaire gagne.", + "chess_movesTitle": "Coups", + "chess_noMovesYet": "Aucun coup pour l'instant", + "chess_movesMissed": "(manqué)", + "chess_promoteTitle": "Promouvoir en", + "chess_pieceQueen": "Dame", + "chess_pieceRook": "Tour", + "chess_pieceBishop": "Fou", + "chess_pieceKnight": "Cavalier", + "chess_resultDraw": "Nulle", + "chess_resultWon": "{name} a gagné", + "chess_resultWithReason": "{result} · {reason}", + "chess_endCheckmate": "Échec et mat", + "chess_endResignation": "Abandon", + "chess_endTimeout": "Au temps", + "chess_endDrawAgreed": "Nulle par accord", + "chess_endStalemate": "Pat", + "chess_endInsufficient": "Matériel insuffisant pour mater", + "chess_endFiftyMoves": "Règle des 50 coups", + "chess_endRepetition": "Répétition", + "chess_endCancelled": "Invitation annulée", + "chess_endDeclined": "Défi refusé", + "chess_endExpired": "Invitation expirée", + "chess_endTaken": "Quelqu'un d'autre a accepté avant", + "chess_timeMinutes": "{minutes} min", + "chess_timeHours": "{hours} h {minutes} min", + "chess_timeDays": "{days} j {hours} h", + "chess_notificationSender": "Échecs", + "chess_notifyChallenge": "{name} vous a défié à une partie", + "chess_notifyAccepted": "{name} a accepté votre partie", + "chess_notifyAcceptedYourMove": "{name} a accepté votre partie. Vous jouez les blancs, à vous de jouer.", + "chess_notifyDeclined": "{name} a refusé votre défi", + "chess_notifyTaken": "Quelqu'un d'autre a accepté cette partie avant", + "chess_notifyGameStartedYourMove": "Votre partie a commencé. Vous jouez les blancs, à vous de jouer.", + "chess_notifyYourMove": "{name} a joué {move}. À vous de jouer.", + "chess_notifyGameOver": "Votre partie avec {name} est terminée", + "chess_notifyResigned": "{name} a abandonné. Vous gagnez.", + "chess_notifyDrawOffered": "{name} propose la nulle", + "chess_notifyDrawAccepted": "{name} a accepté la nulle", + "chess_notifyTimeout": "{name} a réclamé la victoire au temps" } diff --git a/lib/l10n/app_hu.arb b/lib/l10n/app_hu.arb index 5a0f1cc5..4b440752 100644 --- a/lib/l10n/app_hu.arb +++ b/lib/l10n/app_hu.arb @@ -3893,5 +3893,110 @@ "modelDownload_verifying": "A letöltés ellenőrzése", "modelDownload_useModel": "Ezt a modellt használja", "modelDownload_removeFailed": "A modellt nem sikerült eltávolítani: {error}", - "modelDownload_progress": "{current} / {total} MB ({percent}%)" + "modelDownload_progress": "{current} / {total} MB ({percent}%)", + "chess_menuGames": "Sakkjátszmák", + "chess_menuGamesCount": "Sakkjátszmák ({count})", + "chess_sheetTitle": "Sakk", + "chess_sectionNewGame": "Új játszma", + "chess_sectionYourGames": "Játszmáid", + "chess_sectionInvites": "Nyitott felkérések", + "chess_sectionLive": "Élő játszmák", + "chess_sectionFinished": "Befejezett", + "chess_newChallenge": "Kihívás valakinek", + "chess_newChallengeSubtitle": "Válassz valakit, akit nemrég hallottál ezen a csatornán", + "chess_newOpenInvite": "Nyitott felkérés közzététele", + "chess_newOpenInviteSubtitle": "Bárki elfogadhatja ezen a csatornán", + "chess_emptyTitle": "Még nincs játszma", + "chess_emptySubtitle": "Hívj ki valakit, vagy tegyél közzé nyitott felkérést. A csatornán bárki nézheti.", + "chess_vs": "{white} – {black}", + "chess_unknownPlayer": "Ismeretlen", + "chess_rowYourOpenInvite": "Nyitott felkérésed", + "chess_rowYourChallenge": "Kihívtad: {name}", + "chess_rowInviteFrom": "Játszma vele: {name}", + "chess_rowStarting": "Várakozás a játszma kezdetére", + "chess_rowMoveTurn": "{number}. lépés · {turn}", + "chess_rowOpenInvite": "{name} ellenfelet keres", + "chess_rowChallengedYou": "{name} kihívott téged", + "chess_rowInviteDetails": "Idő lépésenként: {deadline}", + "chess_accept": "Elfogadás", + "chess_decline": "Elutasítás", + "chess_remove": "Eltávolítás", + "chess_cancelInvite": "Felkérés visszavonása", + "chess_cancelInviteTitle": "Visszavonod ezt a felkérést?", + "chess_sendFailed": "A küldés nem sikerült. Ellenőrizd a rádiókapcsolatot.", + "chess_challengeSent": "Kihívás elküldve: {name}", + "chess_inviteSent": "Nyitott felkérés közzétéve", + "chess_pickOpponent": "Kit hívsz ki?", + "chess_noRecentSenders": "Ezen a csatornán nemrég senki sem írt.", + "chess_deadlineLabel": "Idő lépésenként", + "chess_deadlineNone": "Nincs korlát", + "chess_deadline15m": "15 perc", + "chess_deadline1h": "1 óra", + "chess_deadline6h": "6 óra", + "chess_deadline1d": "1 nap", + "chess_deadline3d": "3 nap", + "chess_colourLabel": "Színed", + "chess_colourRandom": "Véletlen", + "chess_colourWhite": "Világos", + "chess_colourBlack": "Sötét", + "chess_sendChallenge": "Kihívás küldése", + "chess_postInvite": "Felkérés közzététele", + "chess_gameGone": "Ez a játszma már nem elérhető.", + "chess_playerYou": "{name} (te)", + "chess_toMoveChip": "Lépésen van", + "chess_statusYourMove": "Te lépsz", + "chess_statusWaiting": "Várakozás rá: {name}", + "chess_statusToMove": "{name} lép", + "chess_statusTimeLeft": "Erre a lépésre még {time} van hátra", + "chess_statusOverdue": "Az erre a lépésre szánt idő lejárt", + "chess_statusDrawOffered": "{name} döntetlent ajánl", + "chess_statusUnknownPosition": "A tábla a következő lépéssel jelenik meg.", + "chess_statusUnverified": "A játékosok még nincsenek megerősítve. Kérj frissítést az ellenőrzésükhöz.", + "chess_actionResign": "Feladás", + "chess_actionOfferDraw": "Döntetlen ajánlása", + "chess_actionAcceptDraw": "Döntetlen elfogadása", + "chess_actionClaimTimeout": "Nyerés követelése időtúllépés miatt", + "chess_actionNudge": "Frissítés kérése", + "chess_actionNudgeTooltip": "Kérd meg a játékosokat, hogy küldjék el újra a legutóbbi lépést", + "chess_resignConfirmTitle": "Feladod ezt a játszmát?", + "chess_resignConfirmBody": "Az ellenfeled nyer.", + "chess_movesTitle": "Lépések", + "chess_noMovesYet": "Még nincs lépés", + "chess_movesMissed": "(kimaradt)", + "chess_promoteTitle": "Átváltozás", + "chess_pieceQueen": "Vezér", + "chess_pieceRook": "Bástya", + "chess_pieceBishop": "Futó", + "chess_pieceKnight": "Huszár", + "chess_resultDraw": "Döntetlen", + "chess_resultWon": "{name} nyert", + "chess_resultWithReason": "{result} · {reason}", + "chess_endCheckmate": "Matt", + "chess_endResignation": "Feladás", + "chess_endTimeout": "Időtúllépés", + "chess_endDrawAgreed": "Megegyezéses döntetlen", + "chess_endStalemate": "Patt", + "chess_endInsufficient": "Nincs elég figura a mattadáshoz", + "chess_endFiftyMoves": "Ötvenlépéses szabály", + "chess_endRepetition": "Állásismétlés", + "chess_endCancelled": "Felkérés visszavonva", + "chess_endDeclined": "Kihívás elutasítva", + "chess_endExpired": "A felkérés lejárt", + "chess_endTaken": "Valaki más előbb elfogadta", + "chess_timeMinutes": "{minutes} perc", + "chess_timeHours": "{hours} ó {minutes} perc", + "chess_timeDays": "{days} n {hours} ó", + "chess_notificationSender": "Sakk", + "chess_notifyChallenge": "{name} kihívott egy játszmára", + "chess_notifyAccepted": "{name} elfogadta a játszmádat", + "chess_notifyAcceptedYourMove": "{name} elfogadta a játszmádat. Világossal játszol, te lépsz.", + "chess_notifyDeclined": "{name} elutasította a kihívásodat", + "chess_notifyTaken": "Valaki más előbb elfogadta ezt a játszmát", + "chess_notifyGameStartedYourMove": "A játszmád elindult. Világossal játszol, te lépsz.", + "chess_notifyYourMove": "{name} lépett: {move}. Te jössz.", + "chess_notifyGameOver": "A {name} elleni játszmád véget ért", + "chess_notifyResigned": "{name} feladta. Te nyertél.", + "chess_notifyDrawOffered": "{name} döntetlent ajánl", + "chess_notifyDrawAccepted": "{name} elfogadta a döntetlent", + "chess_notifyTimeout": "{name} időtúllépés miatt nyerést követelt" } diff --git a/lib/l10n/app_it.arb b/lib/l10n/app_it.arb index d8e32f3a..532b0119 100644 --- a/lib/l10n/app_it.arb +++ b/lib/l10n/app_it.arb @@ -3936,5 +3936,110 @@ "modelDownload_verifying": "Verifica del download", "modelDownload_useModel": "Usa questo modello", "modelDownload_removeFailed": "Impossibile rimuovere il modello: {error}", - "modelDownload_progress": "{current} / {total} MB ({percent}%)" + "modelDownload_progress": "{current} / {total} MB ({percent}%)", + "chess_menuGames": "Partite a scacchi", + "chess_menuGamesCount": "Partite a scacchi ({count})", + "chess_sheetTitle": "Scacchi", + "chess_sectionNewGame": "Nuova partita", + "chess_sectionYourGames": "Le tue partite", + "chess_sectionInvites": "Inviti aperti", + "chess_sectionLive": "Partite in corso", + "chess_sectionFinished": "Terminate", + "chess_newChallenge": "Sfida qualcuno", + "chess_newChallengeSubtitle": "Scegli qualcuno sentito di recente su questo canale", + "chess_newOpenInvite": "Pubblica un invito aperto", + "chess_newOpenInviteSubtitle": "Chiunque su questo canale può accettare", + "chess_emptyTitle": "Nessuna partita per ora", + "chess_emptySubtitle": "Sfida qualcuno o pubblica un invito aperto. Chiunque sul canale può guardare.", + "chess_vs": "{white} contro {black}", + "chess_unknownPlayer": "Sconosciuto", + "chess_rowYourOpenInvite": "Il tuo invito aperto", + "chess_rowYourChallenge": "Hai sfidato {name}", + "chess_rowInviteFrom": "Partita con {name}", + "chess_rowStarting": "In attesa dell'inizio della partita", + "chess_rowMoveTurn": "Mossa {number} · {turn}", + "chess_rowOpenInvite": "{name} cerca una partita", + "chess_rowChallengedYou": "{name} ti ha sfidato", + "chess_rowInviteDetails": "Tempo per mossa: {deadline}", + "chess_accept": "Accetta", + "chess_decline": "Rifiuta", + "chess_remove": "Rimuovi", + "chess_cancelInvite": "Annulla invito", + "chess_cancelInviteTitle": "Annullare questo invito?", + "chess_sendFailed": "Invio non riuscito. Controlla la connessione alla radio.", + "chess_challengeSent": "Sfida inviata a {name}", + "chess_inviteSent": "Invito aperto pubblicato", + "chess_pickOpponent": "Chi sfidare", + "chess_noRecentSenders": "Nessuno ha scritto su questo canale di recente.", + "chess_deadlineLabel": "Tempo per mossa", + "chess_deadlineNone": "Nessun limite", + "chess_deadline15m": "15 minuti", + "chess_deadline1h": "1 ora", + "chess_deadline6h": "6 ore", + "chess_deadline1d": "1 giorno", + "chess_deadline3d": "3 giorni", + "chess_colourLabel": "Il tuo colore", + "chess_colourRandom": "Casuale", + "chess_colourWhite": "Bianco", + "chess_colourBlack": "Nero", + "chess_sendChallenge": "Invia sfida", + "chess_postInvite": "Pubblica invito", + "chess_gameGone": "Questa partita non è più disponibile.", + "chess_playerYou": "{name} (tu)", + "chess_toMoveChip": "Al tratto", + "chess_statusYourMove": "Tocca a te", + "chess_statusWaiting": "In attesa di {name}", + "chess_statusToMove": "Muove {name}", + "chess_statusTimeLeft": "{time} rimasti per questa mossa", + "chess_statusOverdue": "Il tempo per questa mossa è scaduto", + "chess_statusDrawOffered": "{name} offre la patta", + "chess_statusUnknownPosition": "La scacchiera apparirà con la prossima mossa.", + "chess_statusUnverified": "Giocatori non ancora confermati. Chiedi un aggiornamento per verificarli.", + "chess_actionResign": "Abbandona", + "chess_actionOfferDraw": "Offri la patta", + "chess_actionAcceptDraw": "Accetta la patta", + "chess_actionClaimTimeout": "Rivendica la vittoria a tempo", + "chess_actionNudge": "Chiedi aggiornamento", + "chess_actionNudgeTooltip": "Chiedi ai giocatori di rinviare l'ultima mossa", + "chess_resignConfirmTitle": "Abbandonare questa partita?", + "chess_resignConfirmBody": "Il tuo avversario vince.", + "chess_movesTitle": "Mosse", + "chess_noMovesYet": "Ancora nessuna mossa", + "chess_movesMissed": "(persa)", + "chess_promoteTitle": "Promuovi a", + "chess_pieceQueen": "Donna", + "chess_pieceRook": "Torre", + "chess_pieceBishop": "Alfiere", + "chess_pieceKnight": "Cavallo", + "chess_resultDraw": "Patta", + "chess_resultWon": "{name} ha vinto", + "chess_resultWithReason": "{result} · {reason}", + "chess_endCheckmate": "Scacco matto", + "chess_endResignation": "Abbandono", + "chess_endTimeout": "A tempo", + "chess_endDrawAgreed": "Patta concordata", + "chess_endStalemate": "Stallo", + "chess_endInsufficient": "Materiale insufficiente per dare matto", + "chess_endFiftyMoves": "Regola delle 50 mosse", + "chess_endRepetition": "Ripetizione", + "chess_endCancelled": "Invito annullato", + "chess_endDeclined": "Sfida rifiutata", + "chess_endExpired": "Invito scaduto", + "chess_endTaken": "Un altro ha accettato per primo", + "chess_timeMinutes": "{minutes} min", + "chess_timeHours": "{hours} h {minutes} min", + "chess_timeDays": "{days} g {hours} h", + "chess_notificationSender": "Scacchi", + "chess_notifyChallenge": "{name} ti ha sfidato a una partita", + "chess_notifyAccepted": "{name} ha accettato la tua partita", + "chess_notifyAcceptedYourMove": "{name} ha accettato la tua partita. Giochi con il bianco, tocca a te.", + "chess_notifyDeclined": "{name} ha rifiutato la tua sfida", + "chess_notifyTaken": "Un altro ha accettato quella partita per primo", + "chess_notifyGameStartedYourMove": "La tua partita è iniziata. Giochi con il bianco, tocca a te.", + "chess_notifyYourMove": "{name} ha giocato {move}. Tocca a te.", + "chess_notifyGameOver": "La tua partita con {name} è finita", + "chess_notifyResigned": "{name} ha abbandonato. Hai vinto.", + "chess_notifyDrawOffered": "{name} offre la patta", + "chess_notifyDrawAccepted": "{name} ha accettato la patta", + "chess_notifyTimeout": "{name} ha rivendicato la vittoria a tempo" } diff --git a/lib/l10n/app_ja.arb b/lib/l10n/app_ja.arb index 71462a6b..39892d2a 100644 --- a/lib/l10n/app_ja.arb +++ b/lib/l10n/app_ja.arb @@ -4142,5 +4142,110 @@ "modelDownload_verifying": "ダウンロードを確認しています", "modelDownload_useModel": "このモデルを使う", "modelDownload_removeFailed": "モデルを削除できませんでした: {error}", - "modelDownload_progress": "{current} / {total} MB ({percent}%)" + "modelDownload_progress": "{current} / {total} MB ({percent}%)", + "chess_menuGames": "チェスの対局", + "chess_menuGamesCount": "チェスの対局 ({count})", + "chess_sheetTitle": "チェス", + "chess_sectionNewGame": "新しい対局", + "chess_sectionYourGames": "あなたの対局", + "chess_sectionInvites": "募集中の対局", + "chess_sectionLive": "進行中の対局", + "chess_sectionFinished": "終了した対局", + "chess_newChallenge": "誰かに挑戦する", + "chess_newChallengeSubtitle": "このチャンネルで最近発言した人から選ぶ", + "chess_newOpenInvite": "対戦相手を募集する", + "chess_newOpenInviteSubtitle": "このチャンネルの誰でも参加できます", + "chess_emptyTitle": "対局はまだありません", + "chess_emptySubtitle": "誰かに挑戦するか、対戦相手を募集しましょう。チャンネルの誰でも観戦できます。", + "chess_vs": "{white} 対 {black}", + "chess_unknownPlayer": "不明", + "chess_rowYourOpenInvite": "あなたの募集", + "chess_rowYourChallenge": "{name} に挑戦しました", + "chess_rowInviteFrom": "{name} との対局", + "chess_rowStarting": "対局の開始を待っています", + "chess_rowMoveTurn": "{number} 手目 · {turn}", + "chess_rowOpenInvite": "{name} が対戦相手を探しています", + "chess_rowChallengedYou": "{name} から挑戦されました", + "chess_rowInviteDetails": "1手の持ち時間: {deadline}", + "chess_accept": "承諾", + "chess_decline": "辞退", + "chess_remove": "削除", + "chess_cancelInvite": "募集を取り消す", + "chess_cancelInviteTitle": "この募集を取り消しますか?", + "chess_sendFailed": "送信できませんでした。ラジオの接続を確認してください。", + "chess_challengeSent": "{name} に挑戦を送信しました", + "chess_inviteSent": "対戦相手の募集を投稿しました", + "chess_pickOpponent": "挑戦する相手", + "chess_noRecentSenders": "このチャンネルで最近発言した人はいません。", + "chess_deadlineLabel": "1手の持ち時間", + "chess_deadlineNone": "無制限", + "chess_deadline15m": "15分", + "chess_deadline1h": "1時間", + "chess_deadline6h": "6時間", + "chess_deadline1d": "1日", + "chess_deadline3d": "3日", + "chess_colourLabel": "あなたの色", + "chess_colourRandom": "ランダム", + "chess_colourWhite": "白", + "chess_colourBlack": "黒", + "chess_sendChallenge": "挑戦を送る", + "chess_postInvite": "募集を投稿", + "chess_gameGone": "この対局はもう利用できません。", + "chess_playerYou": "{name} (あなた)", + "chess_toMoveChip": "手番", + "chess_statusYourMove": "あなたの手番です", + "chess_statusWaiting": "{name} を待っています", + "chess_statusToMove": "{name} の手番", + "chess_statusTimeLeft": "この手の残り時間 {time}", + "chess_statusOverdue": "この手の持ち時間が切れました", + "chess_statusDrawOffered": "{name} が引き分けを提案しています", + "chess_statusUnknownPosition": "盤面は次の手で表示されます。", + "chess_statusUnverified": "対局者がまだ確認されていません。更新を依頼して確認してください。", + "chess_actionResign": "投了", + "chess_actionOfferDraw": "引き分けを提案", + "chess_actionAcceptDraw": "引き分けを承諾", + "chess_actionClaimTimeout": "時間切れによる勝ちを申請", + "chess_actionNudge": "更新を依頼", + "chess_actionNudgeTooltip": "対局者に最新の手の再送を依頼します", + "chess_resignConfirmTitle": "この対局を投了しますか?", + "chess_resignConfirmBody": "相手の勝ちになります。", + "chess_movesTitle": "棋譜", + "chess_noMovesYet": "まだ手がありません", + "chess_movesMissed": "(未受信)", + "chess_promoteTitle": "プロモーション", + "chess_pieceQueen": "クイーン", + "chess_pieceRook": "ルーク", + "chess_pieceBishop": "ビショップ", + "chess_pieceKnight": "ナイト", + "chess_resultDraw": "引き分け", + "chess_resultWon": "{name} の勝ち", + "chess_resultWithReason": "{result} · {reason}", + "chess_endCheckmate": "チェックメイト", + "chess_endResignation": "投了", + "chess_endTimeout": "時間切れ", + "chess_endDrawAgreed": "合意による引き分け", + "chess_endStalemate": "ステイルメイト", + "chess_endInsufficient": "チェックメイトに必要な駒が不足", + "chess_endFiftyMoves": "50手ルール", + "chess_endRepetition": "同一局面の繰り返し", + "chess_endCancelled": "募集は取り消されました", + "chess_endDeclined": "挑戦は辞退されました", + "chess_endExpired": "募集の期限が切れました", + "chess_endTaken": "他の人が先に承諾しました", + "chess_timeMinutes": "{minutes} 分", + "chess_timeHours": "{hours} 時間 {minutes} 分", + "chess_timeDays": "{days} 日 {hours} 時間", + "chess_notificationSender": "チェス", + "chess_notifyChallenge": "{name} から対局を挑まれました", + "chess_notifyAccepted": "{name} が対局を承諾しました", + "chess_notifyAcceptedYourMove": "{name} が対局を承諾しました。あなたが白で、先手です。", + "chess_notifyDeclined": "{name} が挑戦を辞退しました", + "chess_notifyTaken": "他の人が先にその対局を承諾しました", + "chess_notifyGameStartedYourMove": "対局が始まりました。あなたが白で、先手です。", + "chess_notifyYourMove": "{name} が {move} を指しました。あなたの手番です。", + "chess_notifyGameOver": "{name} との対局が終了しました", + "chess_notifyResigned": "{name} が投了しました。あなたの勝ちです。", + "chess_notifyDrawOffered": "{name} が引き分けを提案しています", + "chess_notifyDrawAccepted": "{name} が引き分けを承諾しました", + "chess_notifyTimeout": "{name} が時間切れによる勝ちを申請しました" } diff --git a/lib/l10n/app_ko.arb b/lib/l10n/app_ko.arb index f35ccdf1..d3566a70 100644 --- a/lib/l10n/app_ko.arb +++ b/lib/l10n/app_ko.arb @@ -3383,7 +3383,7 @@ "translation_downloadProgressBytes": "{fileName}: {current} MB", "translation_downloadProgressTotal": "{fileName}: {current} / {total} MB ({percent}%)", "translation_downloadedModelDetails": "{size} MB • {source}", - "repeater_radioDisconnected": "무전기 연결 끊김", + "repeater_radioDisconnected": "라디오 연결 끊김", "repeater_radioDisconnectedHint": "명령을 보내거나 새로고침 또는 변경 사항을 저장하려면 무전기에 다시 연결하세요.", "repeater_cliSend": "명령 보내기", "repeater_cliCopyTranscript": "기록 복사", @@ -4110,7 +4110,7 @@ "appBar_offlineSubtitle": "오프라인 · {name}", "appBar_offline": "오프라인", "appBar_reconnecting": "다시 연결 중…", - "connectSheet_title": "무전기 연결", + "connectSheet_title": "라디오 연결", "connectSheet_reconnect": "{name}에 다시 연결", "connectSheet_chooseRadio": "무전기 선택", "connectSheet_chooseRadioSubtitle": "Bluetooth, USB 또는 TCP", @@ -4142,5 +4142,110 @@ "modelDownload_verifying": "다운로드를 확인하는 중", "modelDownload_useModel": "이 모델 사용", "modelDownload_removeFailed": "모델을 제거하지 못했습니다: {error}", - "modelDownload_progress": "{current} / {total} MB ({percent}%)" + "modelDownload_progress": "{current} / {total} MB ({percent}%)", + "chess_menuGames": "체스 게임", + "chess_menuGamesCount": "체스 게임 ({count})", + "chess_sheetTitle": "체스", + "chess_sectionNewGame": "새 게임", + "chess_sectionYourGames": "내 게임", + "chess_sectionInvites": "열린 초대", + "chess_sectionLive": "진행 중인 게임", + "chess_sectionFinished": "종료된 게임", + "chess_newChallenge": "누군가에게 도전", + "chess_newChallengeSubtitle": "이 채널에서 최근 메시지를 보낸 사람 중에서 선택", + "chess_newOpenInvite": "공개 초대 올리기", + "chess_newOpenInviteSubtitle": "이 채널의 누구나 수락할 수 있습니다", + "chess_emptyTitle": "아직 게임이 없습니다", + "chess_emptySubtitle": "누군가에게 도전하거나 공개 초대를 올려 보세요. 채널의 누구나 관전할 수 있습니다.", + "chess_vs": "{white} 대 {black}", + "chess_unknownPlayer": "알 수 없음", + "chess_rowYourOpenInvite": "내 공개 초대", + "chess_rowYourChallenge": "{name}님에게 도전했습니다", + "chess_rowInviteFrom": "{name}님과의 게임", + "chess_rowStarting": "게임 시작을 기다리는 중", + "chess_rowMoveTurn": "{number}수 · {turn}", + "chess_rowOpenInvite": "{name}님이 게임 상대를 찾고 있습니다", + "chess_rowChallengedYou": "{name}님이 도전했습니다", + "chess_rowInviteDetails": "수당 제한 시간: {deadline}", + "chess_accept": "수락", + "chess_decline": "거절", + "chess_remove": "제거", + "chess_cancelInvite": "초대 취소", + "chess_cancelInviteTitle": "이 초대를 취소하시겠습니까?", + "chess_sendFailed": "전송하지 못했습니다. 라디오 연결을 확인하세요.", + "chess_challengeSent": "{name}님에게 도전을 보냈습니다", + "chess_inviteSent": "공개 초대를 올렸습니다", + "chess_pickOpponent": "도전할 상대", + "chess_noRecentSenders": "이 채널에 최근 메시지를 보낸 사람이 없습니다.", + "chess_deadlineLabel": "수당 제한 시간", + "chess_deadlineNone": "제한 없음", + "chess_deadline15m": "15분", + "chess_deadline1h": "1시간", + "chess_deadline6h": "6시간", + "chess_deadline1d": "1일", + "chess_deadline3d": "3일", + "chess_colourLabel": "내 색", + "chess_colourRandom": "무작위", + "chess_colourWhite": "백", + "chess_colourBlack": "흑", + "chess_sendChallenge": "도전 보내기", + "chess_postInvite": "초대 올리기", + "chess_gameGone": "이 게임은 더 이상 사용할 수 없습니다.", + "chess_playerYou": "{name} (나)", + "chess_toMoveChip": "차례", + "chess_statusYourMove": "내 차례", + "chess_statusWaiting": "{name}님을 기다리는 중", + "chess_statusToMove": "{name}님의 차례", + "chess_statusTimeLeft": "이 수의 남은 시간 {time}", + "chess_statusOverdue": "이 수의 제한 시간이 끝났습니다", + "chess_statusDrawOffered": "{name}님이 무승부를 제안했습니다", + "chess_statusUnknownPosition": "다음 수가 오면 판이 표시됩니다.", + "chess_statusUnverified": "플레이어가 아직 확인되지 않았습니다. 업데이트를 요청해 확인하세요.", + "chess_actionResign": "기권", + "chess_actionOfferDraw": "무승부 제안", + "chess_actionAcceptDraw": "무승부 수락", + "chess_actionClaimTimeout": "시간 초과 승리 요청", + "chess_actionNudge": "업데이트 요청", + "chess_actionNudgeTooltip": "플레이어에게 최신 수를 다시 보내 달라고 요청합니다", + "chess_resignConfirmTitle": "이 게임을 기권하시겠습니까?", + "chess_resignConfirmBody": "상대가 승리합니다.", + "chess_movesTitle": "기보", + "chess_noMovesYet": "아직 수가 없습니다", + "chess_movesMissed": "(누락)", + "chess_promoteTitle": "승급할 기물", + "chess_pieceQueen": "퀸", + "chess_pieceRook": "룩", + "chess_pieceBishop": "비숍", + "chess_pieceKnight": "나이트", + "chess_resultDraw": "무승부", + "chess_resultWon": "{name}님 승리", + "chess_resultWithReason": "{result} · {reason}", + "chess_endCheckmate": "체크메이트", + "chess_endResignation": "기권", + "chess_endTimeout": "시간 초과", + "chess_endDrawAgreed": "합의 무승부", + "chess_endStalemate": "스테일메이트", + "chess_endInsufficient": "체크메이트에 필요한 기물 부족", + "chess_endFiftyMoves": "50수 규칙", + "chess_endRepetition": "동일 국면 반복", + "chess_endCancelled": "초대가 취소되었습니다", + "chess_endDeclined": "도전이 거절되었습니다", + "chess_endExpired": "초대가 만료되었습니다", + "chess_endTaken": "다른 사람이 먼저 수락했습니다", + "chess_timeMinutes": "{minutes}분", + "chess_timeHours": "{hours}시간 {minutes}분", + "chess_timeDays": "{days}일 {hours}시간", + "chess_notificationSender": "체스", + "chess_notifyChallenge": "{name}님이 게임을 도전했습니다", + "chess_notifyAccepted": "{name}님이 게임을 수락했습니다", + "chess_notifyAcceptedYourMove": "{name}님이 게임을 수락했습니다. 백이며 내 차례입니다.", + "chess_notifyDeclined": "{name}님이 도전을 거절했습니다", + "chess_notifyTaken": "다른 사람이 그 게임을 먼저 수락했습니다", + "chess_notifyGameStartedYourMove": "게임이 시작되었습니다. 백이며 내 차례입니다.", + "chess_notifyYourMove": "{name}님이 {move}을(를) 두었습니다. 내 차례입니다.", + "chess_notifyGameOver": "{name}님과의 게임이 종료되었습니다", + "chess_notifyResigned": "{name}님이 기권했습니다. 승리했습니다.", + "chess_notifyDrawOffered": "{name}님이 무승부를 제안했습니다", + "chess_notifyDrawAccepted": "{name}님이 무승부를 수락했습니다", + "chess_notifyTimeout": "{name}님이 시간 초과 승리를 요청했습니다" } diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index 91f0e099..1e6d721c 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -12981,6 +12981,636 @@ abstract class AppLocalizations { /// In en, this message translates to: /// **'Location copied'** String get coordinate_copied; + + /// No description provided for @chess_menuGames. + /// + /// In en, this message translates to: + /// **'Chess games'** + String get chess_menuGames; + + /// No description provided for @chess_menuGamesCount. + /// + /// In en, this message translates to: + /// **'Chess games ({count})'** + String chess_menuGamesCount(int count); + + /// No description provided for @chess_sheetTitle. + /// + /// In en, this message translates to: + /// **'Chess'** + String get chess_sheetTitle; + + /// No description provided for @chess_sectionNewGame. + /// + /// In en, this message translates to: + /// **'New game'** + String get chess_sectionNewGame; + + /// No description provided for @chess_sectionYourGames. + /// + /// In en, this message translates to: + /// **'Your games'** + String get chess_sectionYourGames; + + /// No description provided for @chess_sectionInvites. + /// + /// In en, this message translates to: + /// **'Open invites'** + String get chess_sectionInvites; + + /// No description provided for @chess_sectionLive. + /// + /// In en, this message translates to: + /// **'Live games'** + String get chess_sectionLive; + + /// No description provided for @chess_sectionFinished. + /// + /// In en, this message translates to: + /// **'Finished'** + String get chess_sectionFinished; + + /// No description provided for @chess_newChallenge. + /// + /// In en, this message translates to: + /// **'Challenge someone'** + String get chess_newChallenge; + + /// No description provided for @chess_newChallengeSubtitle. + /// + /// In en, this message translates to: + /// **'Pick someone recently heard on this channel'** + String get chess_newChallengeSubtitle; + + /// No description provided for @chess_newOpenInvite. + /// + /// In en, this message translates to: + /// **'Post an open invite'** + String get chess_newOpenInvite; + + /// No description provided for @chess_newOpenInviteSubtitle. + /// + /// In en, this message translates to: + /// **'Anyone on this channel can accept'** + String get chess_newOpenInviteSubtitle; + + /// No description provided for @chess_emptyTitle. + /// + /// In en, this message translates to: + /// **'No games yet'** + String get chess_emptyTitle; + + /// No description provided for @chess_emptySubtitle. + /// + /// In en, this message translates to: + /// **'Challenge someone or post an open invite. Anyone on the channel can watch.'** + String get chess_emptySubtitle; + + /// No description provided for @chess_vs. + /// + /// In en, this message translates to: + /// **'{white} vs {black}'** + String chess_vs(String white, String black); + + /// No description provided for @chess_unknownPlayer. + /// + /// In en, this message translates to: + /// **'Unknown'** + String get chess_unknownPlayer; + + /// No description provided for @chess_rowYourOpenInvite. + /// + /// In en, this message translates to: + /// **'Your open invite'** + String get chess_rowYourOpenInvite; + + /// No description provided for @chess_rowYourChallenge. + /// + /// In en, this message translates to: + /// **'You challenged {name}'** + String chess_rowYourChallenge(String name); + + /// No description provided for @chess_rowInviteFrom. + /// + /// In en, this message translates to: + /// **'Game with {name}'** + String chess_rowInviteFrom(String name); + + /// No description provided for @chess_rowStarting. + /// + /// In en, this message translates to: + /// **'Waiting for the game to start'** + String get chess_rowStarting; + + /// No description provided for @chess_rowMoveTurn. + /// + /// In en, this message translates to: + /// **'Move {number} · {turn}'** + String chess_rowMoveTurn(int number, String turn); + + /// No description provided for @chess_rowOpenInvite. + /// + /// In en, this message translates to: + /// **'{name} is looking for a game'** + String chess_rowOpenInvite(String name); + + /// No description provided for @chess_rowChallengedYou. + /// + /// In en, this message translates to: + /// **'{name} challenged you'** + String chess_rowChallengedYou(String name); + + /// No description provided for @chess_rowInviteDetails. + /// + /// In en, this message translates to: + /// **'Time per move: {deadline}'** + String chess_rowInviteDetails(String deadline); + + /// No description provided for @chess_accept. + /// + /// In en, this message translates to: + /// **'Accept'** + String get chess_accept; + + /// No description provided for @chess_decline. + /// + /// In en, this message translates to: + /// **'Decline'** + String get chess_decline; + + /// No description provided for @chess_remove. + /// + /// In en, this message translates to: + /// **'Remove'** + String get chess_remove; + + /// No description provided for @chess_cancelInvite. + /// + /// In en, this message translates to: + /// **'Cancel invite'** + String get chess_cancelInvite; + + /// No description provided for @chess_cancelInviteTitle. + /// + /// In en, this message translates to: + /// **'Cancel this invite?'** + String get chess_cancelInviteTitle; + + /// No description provided for @chess_sendFailed. + /// + /// In en, this message translates to: + /// **'Couldn\'t send. Check the radio connection.'** + String get chess_sendFailed; + + /// No description provided for @chess_challengeSent. + /// + /// In en, this message translates to: + /// **'Challenge sent to {name}'** + String chess_challengeSent(String name); + + /// No description provided for @chess_inviteSent. + /// + /// In en, this message translates to: + /// **'Open invite posted'** + String get chess_inviteSent; + + /// No description provided for @chess_pickOpponent. + /// + /// In en, this message translates to: + /// **'Who to challenge'** + String get chess_pickOpponent; + + /// No description provided for @chess_noRecentSenders. + /// + /// In en, this message translates to: + /// **'Nobody has posted on this channel recently.'** + String get chess_noRecentSenders; + + /// No description provided for @chess_deadlineLabel. + /// + /// In en, this message translates to: + /// **'Time per move'** + String get chess_deadlineLabel; + + /// No description provided for @chess_deadlineNone. + /// + /// In en, this message translates to: + /// **'No limit'** + String get chess_deadlineNone; + + /// No description provided for @chess_deadline15m. + /// + /// In en, this message translates to: + /// **'15 minutes'** + String get chess_deadline15m; + + /// No description provided for @chess_deadline1h. + /// + /// In en, this message translates to: + /// **'1 hour'** + String get chess_deadline1h; + + /// No description provided for @chess_deadline6h. + /// + /// In en, this message translates to: + /// **'6 hours'** + String get chess_deadline6h; + + /// No description provided for @chess_deadline1d. + /// + /// In en, this message translates to: + /// **'1 day'** + String get chess_deadline1d; + + /// No description provided for @chess_deadline3d. + /// + /// In en, this message translates to: + /// **'3 days'** + String get chess_deadline3d; + + /// No description provided for @chess_colourLabel. + /// + /// In en, this message translates to: + /// **'Your colour'** + String get chess_colourLabel; + + /// No description provided for @chess_colourRandom. + /// + /// In en, this message translates to: + /// **'Random'** + String get chess_colourRandom; + + /// No description provided for @chess_colourWhite. + /// + /// In en, this message translates to: + /// **'White'** + String get chess_colourWhite; + + /// No description provided for @chess_colourBlack. + /// + /// In en, this message translates to: + /// **'Black'** + String get chess_colourBlack; + + /// No description provided for @chess_sendChallenge. + /// + /// In en, this message translates to: + /// **'Send challenge'** + String get chess_sendChallenge; + + /// No description provided for @chess_postInvite. + /// + /// In en, this message translates to: + /// **'Post invite'** + String get chess_postInvite; + + /// No description provided for @chess_gameGone. + /// + /// In en, this message translates to: + /// **'This game is no longer available.'** + String get chess_gameGone; + + /// No description provided for @chess_playerYou. + /// + /// In en, this message translates to: + /// **'{name} (you)'** + String chess_playerYou(String name); + + /// No description provided for @chess_toMoveChip. + /// + /// In en, this message translates to: + /// **'To move'** + String get chess_toMoveChip; + + /// No description provided for @chess_statusYourMove. + /// + /// In en, this message translates to: + /// **'Your move'** + String get chess_statusYourMove; + + /// No description provided for @chess_statusWaiting. + /// + /// In en, this message translates to: + /// **'Waiting for {name}'** + String chess_statusWaiting(String name); + + /// No description provided for @chess_statusToMove. + /// + /// In en, this message translates to: + /// **'{name} to move'** + String chess_statusToMove(String name); + + /// No description provided for @chess_statusTimeLeft. + /// + /// In en, this message translates to: + /// **'{time} left for this move'** + String chess_statusTimeLeft(String time); + + /// No description provided for @chess_statusOverdue. + /// + /// In en, this message translates to: + /// **'Time for this move is up'** + String get chess_statusOverdue; + + /// No description provided for @chess_statusDrawOffered. + /// + /// In en, this message translates to: + /// **'{name} offers a draw'** + String chess_statusDrawOffered(String name); + + /// No description provided for @chess_statusUnknownPosition. + /// + /// In en, this message translates to: + /// **'The board appears with the next move.'** + String get chess_statusUnknownPosition; + + /// No description provided for @chess_statusUnverified. + /// + /// In en, this message translates to: + /// **'Players not confirmed yet. Ask for an update to check them.'** + String get chess_statusUnverified; + + /// No description provided for @chess_actionResign. + /// + /// In en, this message translates to: + /// **'Resign'** + String get chess_actionResign; + + /// No description provided for @chess_actionOfferDraw. + /// + /// In en, this message translates to: + /// **'Offer draw'** + String get chess_actionOfferDraw; + + /// No description provided for @chess_actionAcceptDraw. + /// + /// In en, this message translates to: + /// **'Accept draw'** + String get chess_actionAcceptDraw; + + /// No description provided for @chess_actionClaimTimeout. + /// + /// In en, this message translates to: + /// **'Claim win on time'** + String get chess_actionClaimTimeout; + + /// No description provided for @chess_actionNudge. + /// + /// In en, this message translates to: + /// **'Ask for update'** + String get chess_actionNudge; + + /// No description provided for @chess_actionNudgeTooltip. + /// + /// In en, this message translates to: + /// **'Ask the players to resend the latest move'** + String get chess_actionNudgeTooltip; + + /// No description provided for @chess_resignConfirmTitle. + /// + /// In en, this message translates to: + /// **'Resign this game?'** + String get chess_resignConfirmTitle; + + /// No description provided for @chess_resignConfirmBody. + /// + /// In en, this message translates to: + /// **'Your opponent wins.'** + String get chess_resignConfirmBody; + + /// No description provided for @chess_movesTitle. + /// + /// In en, this message translates to: + /// **'Moves'** + String get chess_movesTitle; + + /// No description provided for @chess_noMovesYet. + /// + /// In en, this message translates to: + /// **'No moves yet'** + String get chess_noMovesYet; + + /// No description provided for @chess_movesMissed. + /// + /// In en, this message translates to: + /// **'(missed)'** + String get chess_movesMissed; + + /// No description provided for @chess_promoteTitle. + /// + /// In en, this message translates to: + /// **'Promote to'** + String get chess_promoteTitle; + + /// No description provided for @chess_pieceQueen. + /// + /// In en, this message translates to: + /// **'Queen'** + String get chess_pieceQueen; + + /// No description provided for @chess_pieceRook. + /// + /// In en, this message translates to: + /// **'Rook'** + String get chess_pieceRook; + + /// No description provided for @chess_pieceBishop. + /// + /// In en, this message translates to: + /// **'Bishop'** + String get chess_pieceBishop; + + /// No description provided for @chess_pieceKnight. + /// + /// In en, this message translates to: + /// **'Knight'** + String get chess_pieceKnight; + + /// No description provided for @chess_resultDraw. + /// + /// In en, this message translates to: + /// **'Draw'** + String get chess_resultDraw; + + /// No description provided for @chess_resultWon. + /// + /// In en, this message translates to: + /// **'{name} won'** + String chess_resultWon(String name); + + /// No description provided for @chess_resultWithReason. + /// + /// In en, this message translates to: + /// **'{result} · {reason}'** + String chess_resultWithReason(String result, String reason); + + /// No description provided for @chess_endCheckmate. + /// + /// In en, this message translates to: + /// **'Checkmate'** + String get chess_endCheckmate; + + /// No description provided for @chess_endResignation. + /// + /// In en, this message translates to: + /// **'Resignation'** + String get chess_endResignation; + + /// No description provided for @chess_endTimeout. + /// + /// In en, this message translates to: + /// **'On time'** + String get chess_endTimeout; + + /// No description provided for @chess_endDrawAgreed. + /// + /// In en, this message translates to: + /// **'Draw agreed'** + String get chess_endDrawAgreed; + + /// No description provided for @chess_endStalemate. + /// + /// In en, this message translates to: + /// **'Stalemate'** + String get chess_endStalemate; + + /// No description provided for @chess_endInsufficient. + /// + /// In en, this message translates to: + /// **'Not enough pieces to mate'** + String get chess_endInsufficient; + + /// No description provided for @chess_endFiftyMoves. + /// + /// In en, this message translates to: + /// **'50-move rule'** + String get chess_endFiftyMoves; + + /// No description provided for @chess_endRepetition. + /// + /// In en, this message translates to: + /// **'Repetition'** + String get chess_endRepetition; + + /// No description provided for @chess_endCancelled. + /// + /// In en, this message translates to: + /// **'Invite cancelled'** + String get chess_endCancelled; + + /// No description provided for @chess_endDeclined. + /// + /// In en, this message translates to: + /// **'Challenge declined'** + String get chess_endDeclined; + + /// No description provided for @chess_endExpired. + /// + /// In en, this message translates to: + /// **'Invite expired'** + String get chess_endExpired; + + /// No description provided for @chess_endTaken. + /// + /// In en, this message translates to: + /// **'Someone else accepted first'** + String get chess_endTaken; + + /// No description provided for @chess_timeMinutes. + /// + /// In en, this message translates to: + /// **'{minutes} min'** + String chess_timeMinutes(int minutes); + + /// No description provided for @chess_timeHours. + /// + /// In en, this message translates to: + /// **'{hours} h {minutes} min'** + String chess_timeHours(int hours, int minutes); + + /// No description provided for @chess_timeDays. + /// + /// In en, this message translates to: + /// **'{days} d {hours} h'** + String chess_timeDays(int days, int hours); + + /// No description provided for @chess_notificationSender. + /// + /// In en, this message translates to: + /// **'Chess'** + String get chess_notificationSender; + + /// No description provided for @chess_notifyChallenge. + /// + /// In en, this message translates to: + /// **'{name} challenged you to a game'** + String chess_notifyChallenge(String name); + + /// No description provided for @chess_notifyAccepted. + /// + /// In en, this message translates to: + /// **'{name} accepted your game'** + String chess_notifyAccepted(String name); + + /// No description provided for @chess_notifyAcceptedYourMove. + /// + /// In en, this message translates to: + /// **'{name} accepted your game. You play white, your move.'** + String chess_notifyAcceptedYourMove(String name); + + /// No description provided for @chess_notifyDeclined. + /// + /// In en, this message translates to: + /// **'{name} declined your challenge'** + String chess_notifyDeclined(String name); + + /// No description provided for @chess_notifyTaken. + /// + /// In en, this message translates to: + /// **'Someone else accepted that game first'** + String get chess_notifyTaken; + + /// No description provided for @chess_notifyGameStartedYourMove. + /// + /// In en, this message translates to: + /// **'Your game started. You play white, your move.'** + String get chess_notifyGameStartedYourMove; + + /// No description provided for @chess_notifyYourMove. + /// + /// In en, this message translates to: + /// **'{name} played {move}. Your move.'** + String chess_notifyYourMove(String name, String move); + + /// No description provided for @chess_notifyGameOver. + /// + /// In en, this message translates to: + /// **'Your game with {name} is over'** + String chess_notifyGameOver(String name); + + /// No description provided for @chess_notifyResigned. + /// + /// In en, this message translates to: + /// **'{name} resigned. You win.'** + String chess_notifyResigned(String name); + + /// No description provided for @chess_notifyDrawOffered. + /// + /// In en, this message translates to: + /// **'{name} offers a draw'** + String chess_notifyDrawOffered(String name); + + /// No description provided for @chess_notifyDrawAccepted. + /// + /// In en, this message translates to: + /// **'{name} accepted the draw'** + String chess_notifyDrawAccepted(String name); + + /// No description provided for @chess_notifyTimeout. + /// + /// In en, this message translates to: + /// **'{name} claimed a win on time'** + String chess_notifyTimeout(String name); } class _AppLocalizationsDelegate diff --git a/lib/l10n/app_localizations_bg.dart b/lib/l10n/app_localizations_bg.dart index c34ce131..213ba4a1 100644 --- a/lib/l10n/app_localizations_bg.dart +++ b/lib/l10n/app_localizations_bg.dart @@ -7792,4 +7792,384 @@ class AppLocalizationsBg extends AppLocalizations { @override String get coordinate_copied => 'Location copied'; + + @override + String get chess_menuGames => 'Игри на шах'; + + @override + String chess_menuGamesCount(int count) { + return 'Игри на шах ($count)'; + } + + @override + String get chess_sheetTitle => 'Шах'; + + @override + String get chess_sectionNewGame => 'Нова игра'; + + @override + String get chess_sectionYourGames => 'Вашите игри'; + + @override + String get chess_sectionInvites => 'Отворени покани'; + + @override + String get chess_sectionLive => 'Текущи игри'; + + @override + String get chess_sectionFinished => 'Приключили'; + + @override + String get chess_newChallenge => 'Предизвикай някого'; + + @override + String get chess_newChallengeSubtitle => + 'Изберете някого, чут наскоро в този канал'; + + @override + String get chess_newOpenInvite => 'Публикувай отворена покана'; + + @override + String get chess_newOpenInviteSubtitle => 'Всеки в този канал може да приеме'; + + @override + String get chess_emptyTitle => 'Все още няма игри'; + + @override + String get chess_emptySubtitle => + 'Предизвикайте някого или публикувайте отворена покана. Всеки в канала може да наблюдава.'; + + @override + String chess_vs(String white, String black) { + return '$white срещу $black'; + } + + @override + String get chess_unknownPlayer => 'Неизвестен'; + + @override + String get chess_rowYourOpenInvite => 'Вашата отворена покана'; + + @override + String chess_rowYourChallenge(String name) { + return 'Предизвикахте $name'; + } + + @override + String chess_rowInviteFrom(String name) { + return 'Игра с $name'; + } + + @override + String get chess_rowStarting => 'Изчакване играта да започне'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return 'Ход $number · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name търси игра'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name ви предизвиква'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return 'Време за ход: $deadline'; + } + + @override + String get chess_accept => 'Приеми'; + + @override + String get chess_decline => 'Откажи'; + + @override + String get chess_remove => 'Премахни'; + + @override + String get chess_cancelInvite => 'Отмени поканата'; + + @override + String get chess_cancelInviteTitle => 'Да се отмени ли тази покана?'; + + @override + String get chess_sendFailed => + 'Неуспешно изпращане. Проверете връзката с радиото.'; + + @override + String chess_challengeSent(String name) { + return 'Предизвикателството е изпратено до $name'; + } + + @override + String get chess_inviteSent => 'Отворената покана е публикувана'; + + @override + String get chess_pickOpponent => 'Скоро никой не е писал в този канал.'; + + @override + String get chess_noRecentSenders => 'Кого да предизвикате'; + + @override + String get chess_deadlineLabel => 'Време за ход'; + + @override + String get chess_deadlineNone => 'Без ограничение'; + + @override + String get chess_deadline15m => '15 минути'; + + @override + String get chess_deadline1h => '1 час'; + + @override + String get chess_deadline6h => '6 часа'; + + @override + String get chess_deadline1d => '1 ден'; + + @override + String get chess_deadline3d => '3 дни'; + + @override + String get chess_colourLabel => 'Вашият цвят'; + + @override + String get chess_colourRandom => 'Случаен'; + + @override + String get chess_colourWhite => 'Бели'; + + @override + String get chess_colourBlack => 'Черни'; + + @override + String get chess_sendChallenge => 'Изпрати предизвикателство'; + + @override + String get chess_postInvite => 'Публикувай поканата'; + + @override + String get chess_gameGone => 'Тази игра вече не е налична.'; + + @override + String chess_playerYou(String name) { + return '$name (вие)'; + } + + @override + String get chess_toMoveChip => 'На ход'; + + @override + String get chess_statusYourMove => 'Вашият ход'; + + @override + String chess_statusWaiting(String name) { + return 'Изчакване на $name'; + } + + @override + String chess_statusToMove(String name) { + return '$name е на ход'; + } + + @override + String chess_statusTimeLeft(String time) { + return 'Остава $time за този ход'; + } + + @override + String get chess_statusOverdue => 'Времето за този ход изтече'; + + @override + String chess_statusDrawOffered(String name) { + return '$name предлага реми'; + } + + @override + String get chess_statusUnknownPosition => + 'Дъската ще се появи със следващия ход.'; + + @override + String get chess_statusUnverified => + 'Играчите още не са потвърдени. Поискайте обновяване, за да ги проверите.'; + + @override + String get chess_actionResign => 'Предай се'; + + @override + String get chess_actionOfferDraw => 'Предложи реми'; + + @override + String get chess_actionAcceptDraw => 'Приеми реми'; + + @override + String get chess_actionClaimTimeout => 'Поискай победа по време'; + + @override + String get chess_actionNudge => 'Поискай обновяване'; + + @override + String get chess_actionNudgeTooltip => + 'Помолете играчите да изпратят отново последния ход'; + + @override + String get chess_resignConfirmTitle => 'Да се предадете ли в тази игра?'; + + @override + String get chess_resignConfirmBody => 'Противникът ви печели.'; + + @override + String get chess_movesTitle => 'Ходове'; + + @override + String get chess_noMovesYet => 'Още няма ходове'; + + @override + String get chess_movesMissed => '(пропуснат)'; + + @override + String get chess_promoteTitle => 'Промоция в'; + + @override + String get chess_pieceQueen => 'Дама'; + + @override + String get chess_pieceRook => 'Топ'; + + @override + String get chess_pieceBishop => 'Офицер'; + + @override + String get chess_pieceKnight => 'Кон'; + + @override + String get chess_resultDraw => 'Реми'; + + @override + String chess_resultWon(String name) { + return '$name печели'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => 'Мат'; + + @override + String get chess_endResignation => 'Предаване'; + + @override + String get chess_endTimeout => 'По време'; + + @override + String get chess_endDrawAgreed => 'Реми по споразумение'; + + @override + String get chess_endStalemate => 'Пат'; + + @override + String get chess_endInsufficient => 'Недостатъчно материал за мат'; + + @override + String get chess_endFiftyMoves => 'Правило за 50 хода'; + + @override + String get chess_endRepetition => 'Повторение'; + + @override + String get chess_endCancelled => 'Поканата е отменена'; + + @override + String get chess_endDeclined => 'Предизвикателството е отхвърлено'; + + @override + String get chess_endExpired => 'Поканата е изтекла'; + + @override + String get chess_endTaken => 'Някой друг прие първи'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes мин'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours ч $minutes мин'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days д $hours ч'; + } + + @override + String get chess_notificationSender => 'Шах'; + + @override + String chess_notifyChallenge(String name) { + return '$name ви предизвиква на игра'; + } + + @override + String chess_notifyAccepted(String name) { + return '$name прие играта ви'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return '$name прие играта ви. Играете с белите, ваш ред е.'; + } + + @override + String chess_notifyDeclined(String name) { + return '$name отхвърли предизвикателството ви'; + } + + @override + String get chess_notifyTaken => 'Някой друг прие тази игра първи'; + + @override + String get chess_notifyGameStartedYourMove => + 'Играта ви започна. Играете с белите, ваш ред е.'; + + @override + String chess_notifyYourMove(String name, String move) { + return '$name изигра $move. Ваш ред е.'; + } + + @override + String chess_notifyGameOver(String name) { + return 'Играта ви с $name приключи'; + } + + @override + String chess_notifyResigned(String name) { + return '$name се предаде. Вие печелите.'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name предлага реми'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return '$name прие реми'; + } + + @override + String chess_notifyTimeout(String name) { + return '$name поиска победа по време'; + } } diff --git a/lib/l10n/app_localizations_cs.dart b/lib/l10n/app_localizations_cs.dart index dd1c2f0e..3488569f 100644 --- a/lib/l10n/app_localizations_cs.dart +++ b/lib/l10n/app_localizations_cs.dart @@ -7763,4 +7763,385 @@ class AppLocalizationsCs extends AppLocalizations { @override String get coordinate_copied => 'Location copied'; + + @override + String get chess_menuGames => 'Šachové hry'; + + @override + String chess_menuGamesCount(int count) { + return 'Šachové hry ($count)'; + } + + @override + String get chess_sheetTitle => 'Šachy'; + + @override + String get chess_sectionNewGame => 'Nová hra'; + + @override + String get chess_sectionYourGames => 'Vaše hry'; + + @override + String get chess_sectionInvites => 'Otevřené výzvy'; + + @override + String get chess_sectionLive => 'Probíhající hry'; + + @override + String get chess_sectionFinished => 'Dohrané'; + + @override + String get chess_newChallenge => 'Vyzvat někoho'; + + @override + String get chess_newChallengeSubtitle => + 'Vyberte někoho, koho jste nedávno slyšeli na tomto kanálu'; + + @override + String get chess_newOpenInvite => 'Zveřejnit otevřenou výzvu'; + + @override + String get chess_newOpenInviteSubtitle => + 'Přijmout ji může kdokoli na tomto kanálu'; + + @override + String get chess_emptyTitle => 'Zatím žádné hry'; + + @override + String get chess_emptySubtitle => + 'Vyzvěte někoho nebo zveřejněte otevřenou výzvu. Kdokoli na kanálu se může dívat.'; + + @override + String chess_vs(String white, String black) { + return '$white vs $black'; + } + + @override + String get chess_unknownPlayer => 'Neznámý'; + + @override + String get chess_rowYourOpenInvite => 'Vaše otevřená výzva'; + + @override + String chess_rowYourChallenge(String name) { + return 'Vyzvali jste hráče $name'; + } + + @override + String chess_rowInviteFrom(String name) { + return 'Hra s hráčem $name'; + } + + @override + String get chess_rowStarting => 'Čekání na zahájení hry'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return 'Tah $number · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name hledá soupeře'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name vás vyzývá'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return 'Čas na tah: $deadline'; + } + + @override + String get chess_accept => 'Přijmout'; + + @override + String get chess_decline => 'Odmítnout'; + + @override + String get chess_remove => 'Odstranit'; + + @override + String get chess_cancelInvite => 'Zrušit výzvu'; + + @override + String get chess_cancelInviteTitle => 'Zrušit tuto výzvu?'; + + @override + String get chess_sendFailed => + 'Odeslání se nezdařilo. Zkontrolujte spojení s rádiem.'; + + @override + String chess_challengeSent(String name) { + return 'Výzva odeslána hráči $name'; + } + + @override + String get chess_inviteSent => 'Otevřená výzva zveřejněna'; + + @override + String get chess_pickOpponent => 'Koho vyzvat'; + + @override + String get chess_noRecentSenders => 'Na tomto kanálu nedávno nikdo nepsal.'; + + @override + String get chess_deadlineLabel => 'Čas na tah'; + + @override + String get chess_deadlineNone => 'Bez limitu'; + + @override + String get chess_deadline15m => '15 minut'; + + @override + String get chess_deadline1h => '1 hodina'; + + @override + String get chess_deadline6h => '6 hodin'; + + @override + String get chess_deadline1d => '1 den'; + + @override + String get chess_deadline3d => '3 dny'; + + @override + String get chess_colourLabel => 'Vaše barva'; + + @override + String get chess_colourRandom => 'Náhodná'; + + @override + String get chess_colourWhite => 'Bílá'; + + @override + String get chess_colourBlack => 'Černá'; + + @override + String get chess_sendChallenge => 'Odeslat výzvu'; + + @override + String get chess_postInvite => 'Zveřejnit výzvu'; + + @override + String get chess_gameGone => 'Tato hra už není k dispozici.'; + + @override + String chess_playerYou(String name) { + return '$name (vy)'; + } + + @override + String get chess_toMoveChip => 'Na tahu'; + + @override + String get chess_statusYourMove => 'Váš tah'; + + @override + String chess_statusWaiting(String name) { + return 'Čekání na hráče $name'; + } + + @override + String chess_statusToMove(String name) { + return 'Na tahu: $name'; + } + + @override + String chess_statusTimeLeft(String time) { + return 'Na tento tah zbývá $time'; + } + + @override + String get chess_statusOverdue => 'Čas na tento tah vypršel'; + + @override + String chess_statusDrawOffered(String name) { + return '$name nabízí remízu'; + } + + @override + String get chess_statusUnknownPosition => + 'Šachovnice se zobrazí s dalším tahem.'; + + @override + String get chess_statusUnverified => + 'Hráči zatím nejsou potvrzeni. Vyžádejte si aktualizaci a ověřte je.'; + + @override + String get chess_actionResign => 'Vzdát se'; + + @override + String get chess_actionOfferDraw => 'Nabídnout remízu'; + + @override + String get chess_actionAcceptDraw => 'Přijmout remízu'; + + @override + String get chess_actionClaimTimeout => 'Uplatnit výhru na čas'; + + @override + String get chess_actionNudge => 'Vyžádat aktualizaci'; + + @override + String get chess_actionNudgeTooltip => + 'Požádat hráče o opětovné odeslání posledního tahu'; + + @override + String get chess_resignConfirmTitle => 'Vzdát se této hry?'; + + @override + String get chess_resignConfirmBody => 'Soupeř vyhrává.'; + + @override + String get chess_movesTitle => 'Tahy'; + + @override + String get chess_noMovesYet => 'Zatím žádné tahy'; + + @override + String get chess_movesMissed => '(zmeškáno)'; + + @override + String get chess_promoteTitle => 'Proměnit na'; + + @override + String get chess_pieceQueen => 'Dáma'; + + @override + String get chess_pieceRook => 'Věž'; + + @override + String get chess_pieceBishop => 'Střelec'; + + @override + String get chess_pieceKnight => 'Jezdec'; + + @override + String get chess_resultDraw => 'Remíza'; + + @override + String chess_resultWon(String name) { + return 'Vítězí $name'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => 'Mat'; + + @override + String get chess_endResignation => 'Vzdání se'; + + @override + String get chess_endTimeout => 'Na čas'; + + @override + String get chess_endDrawAgreed => 'Remíza dohodou'; + + @override + String get chess_endStalemate => 'Pat'; + + @override + String get chess_endInsufficient => 'Nedostatek materiálu k matu'; + + @override + String get chess_endFiftyMoves => 'Pravidlo 50 tahů'; + + @override + String get chess_endRepetition => 'Opakování pozice'; + + @override + String get chess_endCancelled => 'Výzva zrušena'; + + @override + String get chess_endDeclined => 'Výzva odmítnuta'; + + @override + String get chess_endExpired => 'Výzva vypršela'; + + @override + String get chess_endTaken => 'Přijal ji někdo jiný'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes min'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours h $minutes min'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days d $hours h'; + } + + @override + String get chess_notificationSender => 'Šachy'; + + @override + String chess_notifyChallenge(String name) { + return '$name vás vyzývá ke hře'; + } + + @override + String chess_notifyAccepted(String name) { + return 'Hráč $name přijal vaši hru'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return 'Hráč $name přijal vaši hru. Hrajete bílými, jste na tahu.'; + } + + @override + String chess_notifyDeclined(String name) { + return 'Hráč $name odmítl vaši výzvu'; + } + + @override + String get chess_notifyTaken => 'Tuto hru přijal dřív někdo jiný'; + + @override + String get chess_notifyGameStartedYourMove => + 'Vaše hra začala. Hrajete bílými, jste na tahu.'; + + @override + String chess_notifyYourMove(String name, String move) { + return 'Hráč $name táhl $move. Jste na tahu.'; + } + + @override + String chess_notifyGameOver(String name) { + return 'Vaše hra s hráčem $name skončila'; + } + + @override + String chess_notifyResigned(String name) { + return 'Hráč $name se vzdal. Vyhráváte.'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name nabízí remízu'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return 'Hráč $name přijal remízu'; + } + + @override + String chess_notifyTimeout(String name) { + return 'Hráč $name uplatnil výhru na čas'; + } } diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart index 6ba0bdc1..e99a6e48 100644 --- a/lib/l10n/app_localizations_de.dart +++ b/lib/l10n/app_localizations_de.dart @@ -7806,4 +7806,387 @@ class AppLocalizationsDe extends AppLocalizations { @override String get coordinate_copied => 'Location copied'; + + @override + String get chess_menuGames => 'Schachpartien'; + + @override + String chess_menuGamesCount(int count) { + return 'Schachpartien ($count)'; + } + + @override + String get chess_sheetTitle => 'Schach'; + + @override + String get chess_sectionNewGame => 'Neue Partie'; + + @override + String get chess_sectionYourGames => 'Ihre Partien'; + + @override + String get chess_sectionInvites => 'Offene Einladungen'; + + @override + String get chess_sectionLive => 'Laufende Partien'; + + @override + String get chess_sectionFinished => 'Beendet'; + + @override + String get chess_newChallenge => 'Jemanden herausfordern'; + + @override + String get chess_newChallengeSubtitle => + 'Zuletzt in diesem Kanal gehörte Person wählen'; + + @override + String get chess_newOpenInvite => 'Offene Einladung senden'; + + @override + String get chess_newOpenInviteSubtitle => + 'Jeder in diesem Kanal kann annehmen'; + + @override + String get chess_emptyTitle => 'Noch keine Partien'; + + @override + String get chess_emptySubtitle => + 'Fordern Sie jemanden heraus oder senden Sie eine offene Einladung. Jeder im Kanal kann zusehen.'; + + @override + String chess_vs(String white, String black) { + return '$white gegen $black'; + } + + @override + String get chess_unknownPlayer => 'Unbekannt'; + + @override + String get chess_rowYourOpenInvite => 'Ihre offene Einladung'; + + @override + String chess_rowYourChallenge(String name) { + return 'Sie haben $name herausgefordert'; + } + + @override + String chess_rowInviteFrom(String name) { + return 'Partie mit $name'; + } + + @override + String get chess_rowStarting => 'Warten auf den Spielbeginn'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return 'Zug $number · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name sucht eine Partie'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name hat Sie herausgefordert'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return 'Bedenkzeit pro Zug: $deadline'; + } + + @override + String get chess_accept => 'Annehmen'; + + @override + String get chess_decline => 'Ablehnen'; + + @override + String get chess_remove => 'Entfernen'; + + @override + String get chess_cancelInvite => 'Einladung zurückziehen'; + + @override + String get chess_cancelInviteTitle => 'Diese Einladung zurückziehen?'; + + @override + String get chess_sendFailed => + 'Senden fehlgeschlagen. Funkverbindung prüfen.'; + + @override + String chess_challengeSent(String name) { + return 'Herausforderung an $name gesendet'; + } + + @override + String get chess_inviteSent => 'Offene Einladung gesendet'; + + @override + String get chess_pickOpponent => 'Wen herausfordern'; + + @override + String get chess_noRecentSenders => + 'In diesem Kanal hat zuletzt niemand geschrieben.'; + + @override + String get chess_deadlineLabel => 'Bedenkzeit pro Zug'; + + @override + String get chess_deadlineNone => 'Keine Begrenzung'; + + @override + String get chess_deadline15m => '15 Minuten'; + + @override + String get chess_deadline1h => '1 Stunde'; + + @override + String get chess_deadline6h => '6 Stunden'; + + @override + String get chess_deadline1d => '1 Tag'; + + @override + String get chess_deadline3d => '3 Tage'; + + @override + String get chess_colourLabel => 'Ihre Farbe'; + + @override + String get chess_colourRandom => 'Zufällig'; + + @override + String get chess_colourWhite => 'Weiß'; + + @override + String get chess_colourBlack => 'Schwarz'; + + @override + String get chess_sendChallenge => 'Herausforderung senden'; + + @override + String get chess_postInvite => 'Einladung senden'; + + @override + String get chess_gameGone => 'Diese Partie ist nicht mehr verfügbar.'; + + @override + String chess_playerYou(String name) { + return '$name (Sie)'; + } + + @override + String get chess_toMoveChip => 'Am Zug'; + + @override + String get chess_statusYourMove => 'Sie sind am Zug'; + + @override + String chess_statusWaiting(String name) { + return 'Warten auf $name'; + } + + @override + String chess_statusToMove(String name) { + return '$name ist am Zug'; + } + + @override + String chess_statusTimeLeft(String time) { + return 'Noch $time für diesen Zug'; + } + + @override + String get chess_statusOverdue => 'Die Zeit für diesen Zug ist abgelaufen'; + + @override + String chess_statusDrawOffered(String name) { + return '$name bietet Remis an'; + } + + @override + String get chess_statusUnknownPosition => + 'Das Brett erscheint mit dem nächsten Zug.'; + + @override + String get chess_statusUnverified => + 'Spieler noch nicht bestätigt. Aktualisierung anfordern, um sie zu prüfen.'; + + @override + String get chess_actionResign => 'Aufgeben'; + + @override + String get chess_actionOfferDraw => 'Remis anbieten'; + + @override + String get chess_actionAcceptDraw => 'Remis annehmen'; + + @override + String get chess_actionClaimTimeout => 'Sieg wegen Zeit beanspruchen'; + + @override + String get chess_actionNudge => 'Aktualisierung anfordern'; + + @override + String get chess_actionNudgeTooltip => + 'Die Spieler bitten, den letzten Zug erneut zu senden'; + + @override + String get chess_resignConfirmTitle => 'Partie aufgeben?'; + + @override + String get chess_resignConfirmBody => 'Ihr Gegner gewinnt.'; + + @override + String get chess_movesTitle => 'Züge'; + + @override + String get chess_noMovesYet => 'Noch keine Züge'; + + @override + String get chess_movesMissed => '(verpasst)'; + + @override + String get chess_promoteTitle => 'Umwandeln in'; + + @override + String get chess_pieceQueen => 'Dame'; + + @override + String get chess_pieceRook => 'Turm'; + + @override + String get chess_pieceBishop => 'Läufer'; + + @override + String get chess_pieceKnight => 'Springer'; + + @override + String get chess_resultDraw => 'Remis'; + + @override + String chess_resultWon(String name) { + return '$name hat gewonnen'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => 'Schachmatt'; + + @override + String get chess_endResignation => 'Aufgabe'; + + @override + String get chess_endTimeout => 'Zeit'; + + @override + String get chess_endDrawAgreed => 'Remis vereinbart'; + + @override + String get chess_endStalemate => 'Patt'; + + @override + String get chess_endInsufficient => 'Nicht genug Material für ein Matt'; + + @override + String get chess_endFiftyMoves => '50-Züge-Regel'; + + @override + String get chess_endRepetition => 'Stellungswiederholung'; + + @override + String get chess_endCancelled => 'Einladung zurückgezogen'; + + @override + String get chess_endDeclined => 'Herausforderung abgelehnt'; + + @override + String get chess_endExpired => 'Einladung abgelaufen'; + + @override + String get chess_endTaken => 'Jemand anderes war schneller'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes Min.'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours Std. $minutes Min.'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days T. $hours Std.'; + } + + @override + String get chess_notificationSender => 'Schach'; + + @override + String chess_notifyChallenge(String name) { + return '$name hat Sie zu einer Partie herausgefordert'; + } + + @override + String chess_notifyAccepted(String name) { + return '$name hat Ihre Partie angenommen'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return '$name hat Ihre Partie angenommen. Sie spielen Weiß und sind am Zug.'; + } + + @override + String chess_notifyDeclined(String name) { + return '$name hat Ihre Herausforderung abgelehnt'; + } + + @override + String get chess_notifyTaken => + 'Jemand anderes hat die Partie zuerst angenommen'; + + @override + String get chess_notifyGameStartedYourMove => + 'Ihre Partie hat begonnen. Sie spielen Weiß und sind am Zug.'; + + @override + String chess_notifyYourMove(String name, String move) { + return '$name hat $move gespielt. Sie sind am Zug.'; + } + + @override + String chess_notifyGameOver(String name) { + return 'Ihre Partie mit $name ist beendet'; + } + + @override + String chess_notifyResigned(String name) { + return '$name hat aufgegeben. Sie gewinnen.'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name bietet Remis an'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return '$name hat das Remis angenommen'; + } + + @override + String chess_notifyTimeout(String name) { + return '$name hat den Sieg wegen Zeit beansprucht'; + } } diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index 73403d34..7a20141a 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -7677,4 +7677,384 @@ class AppLocalizationsEn extends AppLocalizations { @override String get coordinate_copied => 'Location copied'; + + @override + String get chess_menuGames => 'Chess games'; + + @override + String chess_menuGamesCount(int count) { + return 'Chess games ($count)'; + } + + @override + String get chess_sheetTitle => 'Chess'; + + @override + String get chess_sectionNewGame => 'New game'; + + @override + String get chess_sectionYourGames => 'Your games'; + + @override + String get chess_sectionInvites => 'Open invites'; + + @override + String get chess_sectionLive => 'Live games'; + + @override + String get chess_sectionFinished => 'Finished'; + + @override + String get chess_newChallenge => 'Challenge someone'; + + @override + String get chess_newChallengeSubtitle => + 'Pick someone recently heard on this channel'; + + @override + String get chess_newOpenInvite => 'Post an open invite'; + + @override + String get chess_newOpenInviteSubtitle => 'Anyone on this channel can accept'; + + @override + String get chess_emptyTitle => 'No games yet'; + + @override + String get chess_emptySubtitle => + 'Challenge someone or post an open invite. Anyone on the channel can watch.'; + + @override + String chess_vs(String white, String black) { + return '$white vs $black'; + } + + @override + String get chess_unknownPlayer => 'Unknown'; + + @override + String get chess_rowYourOpenInvite => 'Your open invite'; + + @override + String chess_rowYourChallenge(String name) { + return 'You challenged $name'; + } + + @override + String chess_rowInviteFrom(String name) { + return 'Game with $name'; + } + + @override + String get chess_rowStarting => 'Waiting for the game to start'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return 'Move $number · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name is looking for a game'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name challenged you'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return 'Time per move: $deadline'; + } + + @override + String get chess_accept => 'Accept'; + + @override + String get chess_decline => 'Decline'; + + @override + String get chess_remove => 'Remove'; + + @override + String get chess_cancelInvite => 'Cancel invite'; + + @override + String get chess_cancelInviteTitle => 'Cancel this invite?'; + + @override + String get chess_sendFailed => 'Couldn\'t send. Check the radio connection.'; + + @override + String chess_challengeSent(String name) { + return 'Challenge sent to $name'; + } + + @override + String get chess_inviteSent => 'Open invite posted'; + + @override + String get chess_pickOpponent => 'Who to challenge'; + + @override + String get chess_noRecentSenders => + 'Nobody has posted on this channel recently.'; + + @override + String get chess_deadlineLabel => 'Time per move'; + + @override + String get chess_deadlineNone => 'No limit'; + + @override + String get chess_deadline15m => '15 minutes'; + + @override + String get chess_deadline1h => '1 hour'; + + @override + String get chess_deadline6h => '6 hours'; + + @override + String get chess_deadline1d => '1 day'; + + @override + String get chess_deadline3d => '3 days'; + + @override + String get chess_colourLabel => 'Your colour'; + + @override + String get chess_colourRandom => 'Random'; + + @override + String get chess_colourWhite => 'White'; + + @override + String get chess_colourBlack => 'Black'; + + @override + String get chess_sendChallenge => 'Send challenge'; + + @override + String get chess_postInvite => 'Post invite'; + + @override + String get chess_gameGone => 'This game is no longer available.'; + + @override + String chess_playerYou(String name) { + return '$name (you)'; + } + + @override + String get chess_toMoveChip => 'To move'; + + @override + String get chess_statusYourMove => 'Your move'; + + @override + String chess_statusWaiting(String name) { + return 'Waiting for $name'; + } + + @override + String chess_statusToMove(String name) { + return '$name to move'; + } + + @override + String chess_statusTimeLeft(String time) { + return '$time left for this move'; + } + + @override + String get chess_statusOverdue => 'Time for this move is up'; + + @override + String chess_statusDrawOffered(String name) { + return '$name offers a draw'; + } + + @override + String get chess_statusUnknownPosition => + 'The board appears with the next move.'; + + @override + String get chess_statusUnverified => + 'Players not confirmed yet. Ask for an update to check them.'; + + @override + String get chess_actionResign => 'Resign'; + + @override + String get chess_actionOfferDraw => 'Offer draw'; + + @override + String get chess_actionAcceptDraw => 'Accept draw'; + + @override + String get chess_actionClaimTimeout => 'Claim win on time'; + + @override + String get chess_actionNudge => 'Ask for update'; + + @override + String get chess_actionNudgeTooltip => + 'Ask the players to resend the latest move'; + + @override + String get chess_resignConfirmTitle => 'Resign this game?'; + + @override + String get chess_resignConfirmBody => 'Your opponent wins.'; + + @override + String get chess_movesTitle => 'Moves'; + + @override + String get chess_noMovesYet => 'No moves yet'; + + @override + String get chess_movesMissed => '(missed)'; + + @override + String get chess_promoteTitle => 'Promote to'; + + @override + String get chess_pieceQueen => 'Queen'; + + @override + String get chess_pieceRook => 'Rook'; + + @override + String get chess_pieceBishop => 'Bishop'; + + @override + String get chess_pieceKnight => 'Knight'; + + @override + String get chess_resultDraw => 'Draw'; + + @override + String chess_resultWon(String name) { + return '$name won'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => 'Checkmate'; + + @override + String get chess_endResignation => 'Resignation'; + + @override + String get chess_endTimeout => 'On time'; + + @override + String get chess_endDrawAgreed => 'Draw agreed'; + + @override + String get chess_endStalemate => 'Stalemate'; + + @override + String get chess_endInsufficient => 'Not enough pieces to mate'; + + @override + String get chess_endFiftyMoves => '50-move rule'; + + @override + String get chess_endRepetition => 'Repetition'; + + @override + String get chess_endCancelled => 'Invite cancelled'; + + @override + String get chess_endDeclined => 'Challenge declined'; + + @override + String get chess_endExpired => 'Invite expired'; + + @override + String get chess_endTaken => 'Someone else accepted first'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes min'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours h $minutes min'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days d $hours h'; + } + + @override + String get chess_notificationSender => 'Chess'; + + @override + String chess_notifyChallenge(String name) { + return '$name challenged you to a game'; + } + + @override + String chess_notifyAccepted(String name) { + return '$name accepted your game'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return '$name accepted your game. You play white, your move.'; + } + + @override + String chess_notifyDeclined(String name) { + return '$name declined your challenge'; + } + + @override + String get chess_notifyTaken => 'Someone else accepted that game first'; + + @override + String get chess_notifyGameStartedYourMove => + 'Your game started. You play white, your move.'; + + @override + String chess_notifyYourMove(String name, String move) { + return '$name played $move. Your move.'; + } + + @override + String chess_notifyGameOver(String name) { + return 'Your game with $name is over'; + } + + @override + String chess_notifyResigned(String name) { + return '$name resigned. You win.'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name offers a draw'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return '$name accepted the draw'; + } + + @override + String chess_notifyTimeout(String name) { + return '$name claimed a win on time'; + } } diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart index d6decaeb..78ec3383 100644 --- a/lib/l10n/app_localizations_es.dart +++ b/lib/l10n/app_localizations_es.dart @@ -7784,4 +7784,386 @@ class AppLocalizationsEs extends AppLocalizations { @override String get coordinate_copied => 'Location copied'; + + @override + String get chess_menuGames => 'Partidas de ajedrez'; + + @override + String chess_menuGamesCount(int count) { + return 'Partidas de ajedrez ($count)'; + } + + @override + String get chess_sheetTitle => 'Ajedrez'; + + @override + String get chess_sectionNewGame => 'Nueva partida'; + + @override + String get chess_sectionYourGames => 'Tus partidas'; + + @override + String get chess_sectionInvites => 'Invitaciones abiertas'; + + @override + String get chess_sectionLive => 'Partidas en vivo'; + + @override + String get chess_sectionFinished => 'Terminadas'; + + @override + String get chess_newChallenge => 'Retar a alguien'; + + @override + String get chess_newChallengeSubtitle => + 'Elige a alguien oído recientemente en este canal'; + + @override + String get chess_newOpenInvite => 'Publicar una invitación abierta'; + + @override + String get chess_newOpenInviteSubtitle => + 'Cualquiera en este canal puede aceptar'; + + @override + String get chess_emptyTitle => 'Aún no hay partidas'; + + @override + String get chess_emptySubtitle => + 'Reta a alguien o publica una invitación abierta. Cualquiera en el canal puede mirar.'; + + @override + String chess_vs(String white, String black) { + return '$white contra $black'; + } + + @override + String get chess_unknownPlayer => 'Desconocido'; + + @override + String get chess_rowYourOpenInvite => 'Tu invitación abierta'; + + @override + String chess_rowYourChallenge(String name) { + return 'Has retado a $name'; + } + + @override + String chess_rowInviteFrom(String name) { + return 'Partida con $name'; + } + + @override + String get chess_rowStarting => 'Esperando a que empiece la partida'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return 'Jugada $number · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name busca partida'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name te ha retado'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return 'Tiempo por jugada: $deadline'; + } + + @override + String get chess_accept => 'Aceptar'; + + @override + String get chess_decline => 'Rechazar'; + + @override + String get chess_remove => 'Quitar'; + + @override + String get chess_cancelInvite => 'Cancelar invitación'; + + @override + String get chess_cancelInviteTitle => '¿Cancelar esta invitación?'; + + @override + String get chess_sendFailed => + 'No se pudo enviar. Revisa la conexión con la radio.'; + + @override + String chess_challengeSent(String name) { + return 'Reto enviado a $name'; + } + + @override + String get chess_inviteSent => 'Invitación abierta publicada'; + + @override + String get chess_pickOpponent => 'A quién retar'; + + @override + String get chess_noRecentSenders => + 'Nadie ha publicado en este canal recientemente.'; + + @override + String get chess_deadlineLabel => 'Tiempo por jugada'; + + @override + String get chess_deadlineNone => 'Sin límite'; + + @override + String get chess_deadline15m => '15 minutos'; + + @override + String get chess_deadline1h => '1 hora'; + + @override + String get chess_deadline6h => '6 horas'; + + @override + String get chess_deadline1d => '1 día'; + + @override + String get chess_deadline3d => '3 días'; + + @override + String get chess_colourLabel => 'Tu color'; + + @override + String get chess_colourRandom => 'Aleatorio'; + + @override + String get chess_colourWhite => 'Blancas'; + + @override + String get chess_colourBlack => 'Negras'; + + @override + String get chess_sendChallenge => 'Enviar reto'; + + @override + String get chess_postInvite => 'Publicar invitación'; + + @override + String get chess_gameGone => 'Esta partida ya no está disponible.'; + + @override + String chess_playerYou(String name) { + return '$name (tú)'; + } + + @override + String get chess_toMoveChip => 'Su turno'; + + @override + String get chess_statusYourMove => 'Te toca'; + + @override + String chess_statusWaiting(String name) { + return 'Esperando a $name'; + } + + @override + String chess_statusToMove(String name) { + return 'Mueve $name'; + } + + @override + String chess_statusTimeLeft(String time) { + return 'Quedan $time para esta jugada'; + } + + @override + String get chess_statusOverdue => 'Se acabó el tiempo de esta jugada'; + + @override + String chess_statusDrawOffered(String name) { + return '$name ofrece tablas'; + } + + @override + String get chess_statusUnknownPosition => + 'El tablero aparecerá con la siguiente jugada.'; + + @override + String get chess_statusUnverified => + 'Jugadores aún sin confirmar. Pide una actualización para comprobarlos.'; + + @override + String get chess_actionResign => 'Abandonar'; + + @override + String get chess_actionOfferDraw => 'Ofrecer tablas'; + + @override + String get chess_actionAcceptDraw => 'Aceptar tablas'; + + @override + String get chess_actionClaimTimeout => 'Reclamar victoria por tiempo'; + + @override + String get chess_actionNudge => 'Pedir actualización'; + + @override + String get chess_actionNudgeTooltip => + 'Pide a los jugadores que reenvíen la última jugada'; + + @override + String get chess_resignConfirmTitle => '¿Abandonar esta partida?'; + + @override + String get chess_resignConfirmBody => 'Tu oponente gana.'; + + @override + String get chess_movesTitle => 'Jugadas'; + + @override + String get chess_noMovesYet => 'Aún no hay jugadas'; + + @override + String get chess_movesMissed => '(perdida)'; + + @override + String get chess_promoteTitle => 'Coronar a'; + + @override + String get chess_pieceQueen => 'Dama'; + + @override + String get chess_pieceRook => 'Torre'; + + @override + String get chess_pieceBishop => 'Alfil'; + + @override + String get chess_pieceKnight => 'Caballo'; + + @override + String get chess_resultDraw => 'Tablas'; + + @override + String chess_resultWon(String name) { + return 'Ganó $name'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => 'Jaque mate'; + + @override + String get chess_endResignation => 'Abandono'; + + @override + String get chess_endTimeout => 'Por tiempo'; + + @override + String get chess_endDrawAgreed => 'Tablas por acuerdo'; + + @override + String get chess_endStalemate => 'Rey ahogado'; + + @override + String get chess_endInsufficient => 'Material insuficiente para dar mate'; + + @override + String get chess_endFiftyMoves => 'Regla de los 50 movimientos'; + + @override + String get chess_endRepetition => 'Repetición'; + + @override + String get chess_endCancelled => 'Invitación cancelada'; + + @override + String get chess_endDeclined => 'Reto rechazado'; + + @override + String get chess_endExpired => 'Invitación caducada'; + + @override + String get chess_endTaken => 'Otra persona aceptó antes'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes min'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours h $minutes min'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days d $hours h'; + } + + @override + String get chess_notificationSender => 'Ajedrez'; + + @override + String chess_notifyChallenge(String name) { + return '$name te ha retado a una partida'; + } + + @override + String chess_notifyAccepted(String name) { + return '$name ha aceptado tu partida'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return '$name ha aceptado tu partida. Juegas con blancas, te toca.'; + } + + @override + String chess_notifyDeclined(String name) { + return '$name ha rechazado tu reto'; + } + + @override + String get chess_notifyTaken => 'Otra persona aceptó esa partida antes'; + + @override + String get chess_notifyGameStartedYourMove => + 'Tu partida ha empezado. Juegas con blancas, te toca.'; + + @override + String chess_notifyYourMove(String name, String move) { + return '$name jugó $move. Te toca.'; + } + + @override + String chess_notifyGameOver(String name) { + return 'Tu partida con $name ha terminado'; + } + + @override + String chess_notifyResigned(String name) { + return '$name abandonó. Ganas tú.'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name ofrece tablas'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return '$name ha aceptado las tablas'; + } + + @override + String chess_notifyTimeout(String name) { + return '$name reclamó la victoria por tiempo'; + } } diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart index 3dc856b8..583fddff 100644 --- a/lib/l10n/app_localizations_fr.dart +++ b/lib/l10n/app_localizations_fr.dart @@ -7812,4 +7812,387 @@ class AppLocalizationsFr extends AppLocalizations { @override String get coordinate_copied => 'Location copied'; + + @override + String get chess_menuGames => 'Parties d\'échecs'; + + @override + String chess_menuGamesCount(int count) { + return 'Parties d\'échecs ($count)'; + } + + @override + String get chess_sheetTitle => 'Échecs'; + + @override + String get chess_sectionNewGame => 'Nouvelle partie'; + + @override + String get chess_sectionYourGames => 'Vos parties'; + + @override + String get chess_sectionInvites => 'Invitations ouvertes'; + + @override + String get chess_sectionLive => 'Parties en direct'; + + @override + String get chess_sectionFinished => 'Terminées'; + + @override + String get chess_newChallenge => 'Défier quelqu\'un'; + + @override + String get chess_newChallengeSubtitle => + 'Choisissez une personne entendue récemment sur ce canal'; + + @override + String get chess_newOpenInvite => 'Publier une invitation ouverte'; + + @override + String get chess_newOpenInviteSubtitle => + 'Toute personne sur ce canal peut accepter'; + + @override + String get chess_emptyTitle => 'Aucune partie pour l\'instant'; + + @override + String get chess_emptySubtitle => + 'Défiez quelqu\'un ou publiez une invitation ouverte. Tout le monde sur le canal peut regarder.'; + + @override + String chess_vs(String white, String black) { + return '$white contre $black'; + } + + @override + String get chess_unknownPlayer => 'Inconnu'; + + @override + String get chess_rowYourOpenInvite => 'Votre invitation ouverte'; + + @override + String chess_rowYourChallenge(String name) { + return 'Vous avez défié $name'; + } + + @override + String chess_rowInviteFrom(String name) { + return 'Partie avec $name'; + } + + @override + String get chess_rowStarting => 'En attente du début de la partie'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return 'Coup $number · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name cherche un adversaire'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name vous a défié'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return 'Temps par coup : $deadline'; + } + + @override + String get chess_accept => 'Accepter'; + + @override + String get chess_decline => 'Refuser'; + + @override + String get chess_remove => 'Retirer'; + + @override + String get chess_cancelInvite => 'Annuler l\'invitation'; + + @override + String get chess_cancelInviteTitle => 'Annuler cette invitation ?'; + + @override + String get chess_sendFailed => + 'Envoi impossible. Vérifiez la connexion à la radio.'; + + @override + String chess_challengeSent(String name) { + return 'Défi envoyé à $name'; + } + + @override + String get chess_inviteSent => 'Invitation ouverte publiée'; + + @override + String get chess_pickOpponent => 'Qui défier'; + + @override + String get chess_noRecentSenders => + 'Personne n\'a publié sur ce canal récemment.'; + + @override + String get chess_deadlineLabel => 'Temps par coup'; + + @override + String get chess_deadlineNone => 'Sans limite'; + + @override + String get chess_deadline15m => '15 minutes'; + + @override + String get chess_deadline1h => '1 heure'; + + @override + String get chess_deadline6h => '6 heures'; + + @override + String get chess_deadline1d => '1 jour'; + + @override + String get chess_deadline3d => '3 jours'; + + @override + String get chess_colourLabel => 'Votre couleur'; + + @override + String get chess_colourRandom => 'Aléatoire'; + + @override + String get chess_colourWhite => 'Blancs'; + + @override + String get chess_colourBlack => 'Noirs'; + + @override + String get chess_sendChallenge => 'Envoyer le défi'; + + @override + String get chess_postInvite => 'Publier l\'invitation'; + + @override + String get chess_gameGone => 'Cette partie n\'est plus disponible.'; + + @override + String chess_playerYou(String name) { + return '$name (vous)'; + } + + @override + String get chess_toMoveChip => 'Au trait'; + + @override + String get chess_statusYourMove => 'À vous de jouer'; + + @override + String chess_statusWaiting(String name) { + return 'En attente de $name'; + } + + @override + String chess_statusToMove(String name) { + return '$name au trait'; + } + + @override + String chess_statusTimeLeft(String time) { + return '$time restant pour ce coup'; + } + + @override + String get chess_statusOverdue => 'Le temps pour ce coup est écoulé'; + + @override + String chess_statusDrawOffered(String name) { + return '$name propose la nulle'; + } + + @override + String get chess_statusUnknownPosition => + 'L\'échiquier apparaîtra au prochain coup.'; + + @override + String get chess_statusUnverified => + 'Joueurs pas encore confirmés. Demandez une mise à jour pour les vérifier.'; + + @override + String get chess_actionResign => 'Abandonner'; + + @override + String get chess_actionOfferDraw => 'Proposer la nulle'; + + @override + String get chess_actionAcceptDraw => 'Accepter la nulle'; + + @override + String get chess_actionClaimTimeout => 'Réclamer la victoire au temps'; + + @override + String get chess_actionNudge => 'Demander une mise à jour'; + + @override + String get chess_actionNudgeTooltip => + 'Demander aux joueurs de renvoyer le dernier coup'; + + @override + String get chess_resignConfirmTitle => 'Abandonner cette partie ?'; + + @override + String get chess_resignConfirmBody => 'Votre adversaire gagne.'; + + @override + String get chess_movesTitle => 'Coups'; + + @override + String get chess_noMovesYet => 'Aucun coup pour l\'instant'; + + @override + String get chess_movesMissed => '(manqué)'; + + @override + String get chess_promoteTitle => 'Promouvoir en'; + + @override + String get chess_pieceQueen => 'Dame'; + + @override + String get chess_pieceRook => 'Tour'; + + @override + String get chess_pieceBishop => 'Fou'; + + @override + String get chess_pieceKnight => 'Cavalier'; + + @override + String get chess_resultDraw => 'Nulle'; + + @override + String chess_resultWon(String name) { + return '$name a gagné'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => 'Échec et mat'; + + @override + String get chess_endResignation => 'Abandon'; + + @override + String get chess_endTimeout => 'Au temps'; + + @override + String get chess_endDrawAgreed => 'Nulle par accord'; + + @override + String get chess_endStalemate => 'Pat'; + + @override + String get chess_endInsufficient => 'Matériel insuffisant pour mater'; + + @override + String get chess_endFiftyMoves => 'Règle des 50 coups'; + + @override + String get chess_endRepetition => 'Répétition'; + + @override + String get chess_endCancelled => 'Invitation annulée'; + + @override + String get chess_endDeclined => 'Défi refusé'; + + @override + String get chess_endExpired => 'Invitation expirée'; + + @override + String get chess_endTaken => 'Quelqu\'un d\'autre a accepté avant'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes min'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours h $minutes min'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days j $hours h'; + } + + @override + String get chess_notificationSender => 'Échecs'; + + @override + String chess_notifyChallenge(String name) { + return '$name vous a défié à une partie'; + } + + @override + String chess_notifyAccepted(String name) { + return '$name a accepté votre partie'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return '$name a accepté votre partie. Vous jouez les blancs, à vous de jouer.'; + } + + @override + String chess_notifyDeclined(String name) { + return '$name a refusé votre défi'; + } + + @override + String get chess_notifyTaken => + 'Quelqu\'un d\'autre a accepté cette partie avant'; + + @override + String get chess_notifyGameStartedYourMove => + 'Votre partie a commencé. Vous jouez les blancs, à vous de jouer.'; + + @override + String chess_notifyYourMove(String name, String move) { + return '$name a joué $move. À vous de jouer.'; + } + + @override + String chess_notifyGameOver(String name) { + return 'Votre partie avec $name est terminée'; + } + + @override + String chess_notifyResigned(String name) { + return '$name a abandonné. Vous gagnez.'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name propose la nulle'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return '$name a accepté la nulle'; + } + + @override + String chess_notifyTimeout(String name) { + return '$name a réclamé la victoire au temps'; + } } diff --git a/lib/l10n/app_localizations_hu.dart b/lib/l10n/app_localizations_hu.dart index 1b79ee96..777fd9eb 100644 --- a/lib/l10n/app_localizations_hu.dart +++ b/lib/l10n/app_localizations_hu.dart @@ -7775,4 +7775,385 @@ class AppLocalizationsHu extends AppLocalizations { @override String get coordinate_copied => 'Location copied'; + + @override + String get chess_menuGames => 'Sakkjátszmák'; + + @override + String chess_menuGamesCount(int count) { + return 'Sakkjátszmák ($count)'; + } + + @override + String get chess_sheetTitle => 'Sakk'; + + @override + String get chess_sectionNewGame => 'Új játszma'; + + @override + String get chess_sectionYourGames => 'Játszmáid'; + + @override + String get chess_sectionInvites => 'Nyitott felkérések'; + + @override + String get chess_sectionLive => 'Élő játszmák'; + + @override + String get chess_sectionFinished => 'Befejezett'; + + @override + String get chess_newChallenge => 'Kihívás valakinek'; + + @override + String get chess_newChallengeSubtitle => + 'Válassz valakit, akit nemrég hallottál ezen a csatornán'; + + @override + String get chess_newOpenInvite => 'Nyitott felkérés közzététele'; + + @override + String get chess_newOpenInviteSubtitle => + 'Bárki elfogadhatja ezen a csatornán'; + + @override + String get chess_emptyTitle => 'Még nincs játszma'; + + @override + String get chess_emptySubtitle => + 'Hívj ki valakit, vagy tegyél közzé nyitott felkérést. A csatornán bárki nézheti.'; + + @override + String chess_vs(String white, String black) { + return '$white – $black'; + } + + @override + String get chess_unknownPlayer => 'Ismeretlen'; + + @override + String get chess_rowYourOpenInvite => 'Nyitott felkérésed'; + + @override + String chess_rowYourChallenge(String name) { + return 'Kihívtad: $name'; + } + + @override + String chess_rowInviteFrom(String name) { + return 'Játszma vele: $name'; + } + + @override + String get chess_rowStarting => 'Várakozás a játszma kezdetére'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return '$number. lépés · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name ellenfelet keres'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name kihívott téged'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return 'Idő lépésenként: $deadline'; + } + + @override + String get chess_accept => 'Elfogadás'; + + @override + String get chess_decline => 'Elutasítás'; + + @override + String get chess_remove => 'Eltávolítás'; + + @override + String get chess_cancelInvite => 'Felkérés visszavonása'; + + @override + String get chess_cancelInviteTitle => 'Visszavonod ezt a felkérést?'; + + @override + String get chess_sendFailed => + 'A küldés nem sikerült. Ellenőrizd a rádiókapcsolatot.'; + + @override + String chess_challengeSent(String name) { + return 'Kihívás elküldve: $name'; + } + + @override + String get chess_inviteSent => 'Nyitott felkérés közzétéve'; + + @override + String get chess_pickOpponent => 'Kit hívsz ki?'; + + @override + String get chess_noRecentSenders => 'Ezen a csatornán nemrég senki sem írt.'; + + @override + String get chess_deadlineLabel => 'Idő lépésenként'; + + @override + String get chess_deadlineNone => 'Nincs korlát'; + + @override + String get chess_deadline15m => '15 perc'; + + @override + String get chess_deadline1h => '1 óra'; + + @override + String get chess_deadline6h => '6 óra'; + + @override + String get chess_deadline1d => '1 nap'; + + @override + String get chess_deadline3d => '3 nap'; + + @override + String get chess_colourLabel => 'Színed'; + + @override + String get chess_colourRandom => 'Véletlen'; + + @override + String get chess_colourWhite => 'Világos'; + + @override + String get chess_colourBlack => 'Sötét'; + + @override + String get chess_sendChallenge => 'Kihívás küldése'; + + @override + String get chess_postInvite => 'Felkérés közzététele'; + + @override + String get chess_gameGone => 'Ez a játszma már nem elérhető.'; + + @override + String chess_playerYou(String name) { + return '$name (te)'; + } + + @override + String get chess_toMoveChip => 'Lépésen van'; + + @override + String get chess_statusYourMove => 'Te lépsz'; + + @override + String chess_statusWaiting(String name) { + return 'Várakozás rá: $name'; + } + + @override + String chess_statusToMove(String name) { + return '$name lép'; + } + + @override + String chess_statusTimeLeft(String time) { + return 'Erre a lépésre még $time van hátra'; + } + + @override + String get chess_statusOverdue => 'Az erre a lépésre szánt idő lejárt'; + + @override + String chess_statusDrawOffered(String name) { + return '$name döntetlent ajánl'; + } + + @override + String get chess_statusUnknownPosition => + 'A tábla a következő lépéssel jelenik meg.'; + + @override + String get chess_statusUnverified => + 'A játékosok még nincsenek megerősítve. Kérj frissítést az ellenőrzésükhöz.'; + + @override + String get chess_actionResign => 'Feladás'; + + @override + String get chess_actionOfferDraw => 'Döntetlen ajánlása'; + + @override + String get chess_actionAcceptDraw => 'Döntetlen elfogadása'; + + @override + String get chess_actionClaimTimeout => 'Nyerés követelése időtúllépés miatt'; + + @override + String get chess_actionNudge => 'Frissítés kérése'; + + @override + String get chess_actionNudgeTooltip => + 'Kérd meg a játékosokat, hogy küldjék el újra a legutóbbi lépést'; + + @override + String get chess_resignConfirmTitle => 'Feladod ezt a játszmát?'; + + @override + String get chess_resignConfirmBody => 'Az ellenfeled nyer.'; + + @override + String get chess_movesTitle => 'Lépések'; + + @override + String get chess_noMovesYet => 'Még nincs lépés'; + + @override + String get chess_movesMissed => '(kimaradt)'; + + @override + String get chess_promoteTitle => 'Átváltozás'; + + @override + String get chess_pieceQueen => 'Vezér'; + + @override + String get chess_pieceRook => 'Bástya'; + + @override + String get chess_pieceBishop => 'Futó'; + + @override + String get chess_pieceKnight => 'Huszár'; + + @override + String get chess_resultDraw => 'Döntetlen'; + + @override + String chess_resultWon(String name) { + return '$name nyert'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => 'Matt'; + + @override + String get chess_endResignation => 'Feladás'; + + @override + String get chess_endTimeout => 'Időtúllépés'; + + @override + String get chess_endDrawAgreed => 'Megegyezéses döntetlen'; + + @override + String get chess_endStalemate => 'Patt'; + + @override + String get chess_endInsufficient => 'Nincs elég figura a mattadáshoz'; + + @override + String get chess_endFiftyMoves => 'Ötvenlépéses szabály'; + + @override + String get chess_endRepetition => 'Állásismétlés'; + + @override + String get chess_endCancelled => 'Felkérés visszavonva'; + + @override + String get chess_endDeclined => 'Kihívás elutasítva'; + + @override + String get chess_endExpired => 'A felkérés lejárt'; + + @override + String get chess_endTaken => 'Valaki más előbb elfogadta'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes perc'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours ó $minutes perc'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days n $hours ó'; + } + + @override + String get chess_notificationSender => 'Sakk'; + + @override + String chess_notifyChallenge(String name) { + return '$name kihívott egy játszmára'; + } + + @override + String chess_notifyAccepted(String name) { + return '$name elfogadta a játszmádat'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return '$name elfogadta a játszmádat. Világossal játszol, te lépsz.'; + } + + @override + String chess_notifyDeclined(String name) { + return '$name elutasította a kihívásodat'; + } + + @override + String get chess_notifyTaken => 'Valaki más előbb elfogadta ezt a játszmát'; + + @override + String get chess_notifyGameStartedYourMove => + 'A játszmád elindult. Világossal játszol, te lépsz.'; + + @override + String chess_notifyYourMove(String name, String move) { + return '$name lépett: $move. Te jössz.'; + } + + @override + String chess_notifyGameOver(String name) { + return 'A $name elleni játszmád véget ért'; + } + + @override + String chess_notifyResigned(String name) { + return '$name feladta. Te nyertél.'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name döntetlent ajánl'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return '$name elfogadta a döntetlent'; + } + + @override + String chess_notifyTimeout(String name) { + return '$name időtúllépés miatt nyerést követelt'; + } } diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart index b947fd5b..dbb0417d 100644 --- a/lib/l10n/app_localizations_it.dart +++ b/lib/l10n/app_localizations_it.dart @@ -7795,4 +7795,387 @@ class AppLocalizationsIt extends AppLocalizations { @override String get coordinate_copied => 'Location copied'; + + @override + String get chess_menuGames => 'Partite a scacchi'; + + @override + String chess_menuGamesCount(int count) { + return 'Partite a scacchi ($count)'; + } + + @override + String get chess_sheetTitle => 'Scacchi'; + + @override + String get chess_sectionNewGame => 'Nuova partita'; + + @override + String get chess_sectionYourGames => 'Le tue partite'; + + @override + String get chess_sectionInvites => 'Inviti aperti'; + + @override + String get chess_sectionLive => 'Partite in corso'; + + @override + String get chess_sectionFinished => 'Terminate'; + + @override + String get chess_newChallenge => 'Sfida qualcuno'; + + @override + String get chess_newChallengeSubtitle => + 'Scegli qualcuno sentito di recente su questo canale'; + + @override + String get chess_newOpenInvite => 'Pubblica un invito aperto'; + + @override + String get chess_newOpenInviteSubtitle => + 'Chiunque su questo canale può accettare'; + + @override + String get chess_emptyTitle => 'Nessuna partita per ora'; + + @override + String get chess_emptySubtitle => + 'Sfida qualcuno o pubblica un invito aperto. Chiunque sul canale può guardare.'; + + @override + String chess_vs(String white, String black) { + return '$white contro $black'; + } + + @override + String get chess_unknownPlayer => 'Sconosciuto'; + + @override + String get chess_rowYourOpenInvite => 'Il tuo invito aperto'; + + @override + String chess_rowYourChallenge(String name) { + return 'Hai sfidato $name'; + } + + @override + String chess_rowInviteFrom(String name) { + return 'Partita con $name'; + } + + @override + String get chess_rowStarting => 'In attesa dell\'inizio della partita'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return 'Mossa $number · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name cerca una partita'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name ti ha sfidato'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return 'Tempo per mossa: $deadline'; + } + + @override + String get chess_accept => 'Accetta'; + + @override + String get chess_decline => 'Rifiuta'; + + @override + String get chess_remove => 'Rimuovi'; + + @override + String get chess_cancelInvite => 'Annulla invito'; + + @override + String get chess_cancelInviteTitle => 'Annullare questo invito?'; + + @override + String get chess_sendFailed => + 'Invio non riuscito. Controlla la connessione alla radio.'; + + @override + String chess_challengeSent(String name) { + return 'Sfida inviata a $name'; + } + + @override + String get chess_inviteSent => 'Invito aperto pubblicato'; + + @override + String get chess_pickOpponent => 'Chi sfidare'; + + @override + String get chess_noRecentSenders => + 'Nessuno ha scritto su questo canale di recente.'; + + @override + String get chess_deadlineLabel => 'Tempo per mossa'; + + @override + String get chess_deadlineNone => 'Nessun limite'; + + @override + String get chess_deadline15m => '15 minuti'; + + @override + String get chess_deadline1h => '1 ora'; + + @override + String get chess_deadline6h => '6 ore'; + + @override + String get chess_deadline1d => '1 giorno'; + + @override + String get chess_deadline3d => '3 giorni'; + + @override + String get chess_colourLabel => 'Il tuo colore'; + + @override + String get chess_colourRandom => 'Casuale'; + + @override + String get chess_colourWhite => 'Bianco'; + + @override + String get chess_colourBlack => 'Nero'; + + @override + String get chess_sendChallenge => 'Invia sfida'; + + @override + String get chess_postInvite => 'Pubblica invito'; + + @override + String get chess_gameGone => 'Questa partita non è più disponibile.'; + + @override + String chess_playerYou(String name) { + return '$name (tu)'; + } + + @override + String get chess_toMoveChip => 'Al tratto'; + + @override + String get chess_statusYourMove => 'Tocca a te'; + + @override + String chess_statusWaiting(String name) { + return 'In attesa di $name'; + } + + @override + String chess_statusToMove(String name) { + return 'Muove $name'; + } + + @override + String chess_statusTimeLeft(String time) { + return '$time rimasti per questa mossa'; + } + + @override + String get chess_statusOverdue => 'Il tempo per questa mossa è scaduto'; + + @override + String chess_statusDrawOffered(String name) { + return '$name offre la patta'; + } + + @override + String get chess_statusUnknownPosition => + 'La scacchiera apparirà con la prossima mossa.'; + + @override + String get chess_statusUnverified => + 'Giocatori non ancora confermati. Chiedi un aggiornamento per verificarli.'; + + @override + String get chess_actionResign => 'Abbandona'; + + @override + String get chess_actionOfferDraw => 'Offri la patta'; + + @override + String get chess_actionAcceptDraw => 'Accetta la patta'; + + @override + String get chess_actionClaimTimeout => 'Rivendica la vittoria a tempo'; + + @override + String get chess_actionNudge => 'Chiedi aggiornamento'; + + @override + String get chess_actionNudgeTooltip => + 'Chiedi ai giocatori di rinviare l\'ultima mossa'; + + @override + String get chess_resignConfirmTitle => 'Abbandonare questa partita?'; + + @override + String get chess_resignConfirmBody => 'Il tuo avversario vince.'; + + @override + String get chess_movesTitle => 'Mosse'; + + @override + String get chess_noMovesYet => 'Ancora nessuna mossa'; + + @override + String get chess_movesMissed => '(persa)'; + + @override + String get chess_promoteTitle => 'Promuovi a'; + + @override + String get chess_pieceQueen => 'Donna'; + + @override + String get chess_pieceRook => 'Torre'; + + @override + String get chess_pieceBishop => 'Alfiere'; + + @override + String get chess_pieceKnight => 'Cavallo'; + + @override + String get chess_resultDraw => 'Patta'; + + @override + String chess_resultWon(String name) { + return '$name ha vinto'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => 'Scacco matto'; + + @override + String get chess_endResignation => 'Abbandono'; + + @override + String get chess_endTimeout => 'A tempo'; + + @override + String get chess_endDrawAgreed => 'Patta concordata'; + + @override + String get chess_endStalemate => 'Stallo'; + + @override + String get chess_endInsufficient => 'Materiale insufficiente per dare matto'; + + @override + String get chess_endFiftyMoves => 'Regola delle 50 mosse'; + + @override + String get chess_endRepetition => 'Ripetizione'; + + @override + String get chess_endCancelled => 'Invito annullato'; + + @override + String get chess_endDeclined => 'Sfida rifiutata'; + + @override + String get chess_endExpired => 'Invito scaduto'; + + @override + String get chess_endTaken => 'Un altro ha accettato per primo'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes min'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours h $minutes min'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days g $hours h'; + } + + @override + String get chess_notificationSender => 'Scacchi'; + + @override + String chess_notifyChallenge(String name) { + return '$name ti ha sfidato a una partita'; + } + + @override + String chess_notifyAccepted(String name) { + return '$name ha accettato la tua partita'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return '$name ha accettato la tua partita. Giochi con il bianco, tocca a te.'; + } + + @override + String chess_notifyDeclined(String name) { + return '$name ha rifiutato la tua sfida'; + } + + @override + String get chess_notifyTaken => + 'Un altro ha accettato quella partita per primo'; + + @override + String get chess_notifyGameStartedYourMove => + 'La tua partita è iniziata. Giochi con il bianco, tocca a te.'; + + @override + String chess_notifyYourMove(String name, String move) { + return '$name ha giocato $move. Tocca a te.'; + } + + @override + String chess_notifyGameOver(String name) { + return 'La tua partita con $name è finita'; + } + + @override + String chess_notifyResigned(String name) { + return '$name ha abbandonato. Hai vinto.'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name offre la patta'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return '$name ha accettato la patta'; + } + + @override + String chess_notifyTimeout(String name) { + return '$name ha rivendicato la vittoria a tempo'; + } } diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart index 2e4fb87e..e19ae061 100644 --- a/lib/l10n/app_localizations_ja.dart +++ b/lib/l10n/app_localizations_ja.dart @@ -7437,4 +7437,377 @@ class AppLocalizationsJa extends AppLocalizations { @override String get coordinate_copied => 'Location copied'; + + @override + String get chess_menuGames => 'チェスの対局'; + + @override + String chess_menuGamesCount(int count) { + return 'チェスの対局 ($count)'; + } + + @override + String get chess_sheetTitle => 'チェス'; + + @override + String get chess_sectionNewGame => '新しい対局'; + + @override + String get chess_sectionYourGames => 'あなたの対局'; + + @override + String get chess_sectionInvites => '募集中の対局'; + + @override + String get chess_sectionLive => '進行中の対局'; + + @override + String get chess_sectionFinished => '終了した対局'; + + @override + String get chess_newChallenge => '誰かに挑戦する'; + + @override + String get chess_newChallengeSubtitle => 'このチャンネルで最近発言した人から選ぶ'; + + @override + String get chess_newOpenInvite => '対戦相手を募集する'; + + @override + String get chess_newOpenInviteSubtitle => 'このチャンネルの誰でも参加できます'; + + @override + String get chess_emptyTitle => '対局はまだありません'; + + @override + String get chess_emptySubtitle => '誰かに挑戦するか、対戦相手を募集しましょう。チャンネルの誰でも観戦できます。'; + + @override + String chess_vs(String white, String black) { + return '$white 対 $black'; + } + + @override + String get chess_unknownPlayer => '不明'; + + @override + String get chess_rowYourOpenInvite => 'あなたの募集'; + + @override + String chess_rowYourChallenge(String name) { + return '$name に挑戦しました'; + } + + @override + String chess_rowInviteFrom(String name) { + return '$name との対局'; + } + + @override + String get chess_rowStarting => '対局の開始を待っています'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return '$number 手目 · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name が対戦相手を探しています'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name から挑戦されました'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return '1手の持ち時間: $deadline'; + } + + @override + String get chess_accept => '承諾'; + + @override + String get chess_decline => '辞退'; + + @override + String get chess_remove => '削除'; + + @override + String get chess_cancelInvite => '募集を取り消す'; + + @override + String get chess_cancelInviteTitle => 'この募集を取り消しますか?'; + + @override + String get chess_sendFailed => '送信できませんでした。ラジオの接続を確認してください。'; + + @override + String chess_challengeSent(String name) { + return '$name に挑戦を送信しました'; + } + + @override + String get chess_inviteSent => '対戦相手の募集を投稿しました'; + + @override + String get chess_pickOpponent => '挑戦する相手'; + + @override + String get chess_noRecentSenders => 'このチャンネルで最近発言した人はいません。'; + + @override + String get chess_deadlineLabel => '1手の持ち時間'; + + @override + String get chess_deadlineNone => '無制限'; + + @override + String get chess_deadline15m => '15分'; + + @override + String get chess_deadline1h => '1時間'; + + @override + String get chess_deadline6h => '6時間'; + + @override + String get chess_deadline1d => '1日'; + + @override + String get chess_deadline3d => '3日'; + + @override + String get chess_colourLabel => 'あなたの色'; + + @override + String get chess_colourRandom => 'ランダム'; + + @override + String get chess_colourWhite => '白'; + + @override + String get chess_colourBlack => '黒'; + + @override + String get chess_sendChallenge => '挑戦を送る'; + + @override + String get chess_postInvite => '募集を投稿'; + + @override + String get chess_gameGone => 'この対局はもう利用できません。'; + + @override + String chess_playerYou(String name) { + return '$name (あなた)'; + } + + @override + String get chess_toMoveChip => '手番'; + + @override + String get chess_statusYourMove => 'あなたの手番です'; + + @override + String chess_statusWaiting(String name) { + return '$name を待っています'; + } + + @override + String chess_statusToMove(String name) { + return '$name の手番'; + } + + @override + String chess_statusTimeLeft(String time) { + return 'この手の残り時間 $time'; + } + + @override + String get chess_statusOverdue => 'この手の持ち時間が切れました'; + + @override + String chess_statusDrawOffered(String name) { + return '$name が引き分けを提案しています'; + } + + @override + String get chess_statusUnknownPosition => '盤面は次の手で表示されます。'; + + @override + String get chess_statusUnverified => '対局者がまだ確認されていません。更新を依頼して確認してください。'; + + @override + String get chess_actionResign => '投了'; + + @override + String get chess_actionOfferDraw => '引き分けを提案'; + + @override + String get chess_actionAcceptDraw => '引き分けを承諾'; + + @override + String get chess_actionClaimTimeout => '時間切れによる勝ちを申請'; + + @override + String get chess_actionNudge => '更新を依頼'; + + @override + String get chess_actionNudgeTooltip => '対局者に最新の手の再送を依頼します'; + + @override + String get chess_resignConfirmTitle => 'この対局を投了しますか?'; + + @override + String get chess_resignConfirmBody => '相手の勝ちになります。'; + + @override + String get chess_movesTitle => '棋譜'; + + @override + String get chess_noMovesYet => 'まだ手がありません'; + + @override + String get chess_movesMissed => '(未受信)'; + + @override + String get chess_promoteTitle => 'プロモーション'; + + @override + String get chess_pieceQueen => 'クイーン'; + + @override + String get chess_pieceRook => 'ルーク'; + + @override + String get chess_pieceBishop => 'ビショップ'; + + @override + String get chess_pieceKnight => 'ナイト'; + + @override + String get chess_resultDraw => '引き分け'; + + @override + String chess_resultWon(String name) { + return '$name の勝ち'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => 'チェックメイト'; + + @override + String get chess_endResignation => '投了'; + + @override + String get chess_endTimeout => '時間切れ'; + + @override + String get chess_endDrawAgreed => '合意による引き分け'; + + @override + String get chess_endStalemate => 'ステイルメイト'; + + @override + String get chess_endInsufficient => 'チェックメイトに必要な駒が不足'; + + @override + String get chess_endFiftyMoves => '50手ルール'; + + @override + String get chess_endRepetition => '同一局面の繰り返し'; + + @override + String get chess_endCancelled => '募集は取り消されました'; + + @override + String get chess_endDeclined => '挑戦は辞退されました'; + + @override + String get chess_endExpired => '募集の期限が切れました'; + + @override + String get chess_endTaken => '他の人が先に承諾しました'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes 分'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours 時間 $minutes 分'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days 日 $hours 時間'; + } + + @override + String get chess_notificationSender => 'チェス'; + + @override + String chess_notifyChallenge(String name) { + return '$name から対局を挑まれました'; + } + + @override + String chess_notifyAccepted(String name) { + return '$name が対局を承諾しました'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return '$name が対局を承諾しました。あなたが白で、先手です。'; + } + + @override + String chess_notifyDeclined(String name) { + return '$name が挑戦を辞退しました'; + } + + @override + String get chess_notifyTaken => '他の人が先にその対局を承諾しました'; + + @override + String get chess_notifyGameStartedYourMove => '対局が始まりました。あなたが白で、先手です。'; + + @override + String chess_notifyYourMove(String name, String move) { + return '$name が $move を指しました。あなたの手番です。'; + } + + @override + String chess_notifyGameOver(String name) { + return '$name との対局が終了しました'; + } + + @override + String chess_notifyResigned(String name) { + return '$name が投了しました。あなたの勝ちです。'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name が引き分けを提案しています'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return '$name が引き分けを承諾しました'; + } + + @override + String chess_notifyTimeout(String name) { + return '$name が時間切れによる勝ちを申請しました'; + } } diff --git a/lib/l10n/app_localizations_ko.dart b/lib/l10n/app_localizations_ko.dart index 0e8f68e0..0bc1f5a6 100644 --- a/lib/l10n/app_localizations_ko.dart +++ b/lib/l10n/app_localizations_ko.dart @@ -6846,7 +6846,7 @@ class AppLocalizationsKo extends AppLocalizations { } @override - String get repeater_radioDisconnected => '무전기 연결 끊김'; + String get repeater_radioDisconnected => '라디오 연결 끊김'; @override String get repeater_radioDisconnectedHint => @@ -7297,7 +7297,7 @@ class AppLocalizationsKo extends AppLocalizations { String get appBar_reconnecting => '다시 연결 중…'; @override - String get connectSheet_title => '무전기 연결'; + String get connectSheet_title => '라디오 연결'; @override String connectSheet_reconnect(String name) { @@ -7449,4 +7449,378 @@ class AppLocalizationsKo extends AppLocalizations { @override String get coordinate_copied => 'Location copied'; + + @override + String get chess_menuGames => '체스 게임'; + + @override + String chess_menuGamesCount(int count) { + return '체스 게임 ($count)'; + } + + @override + String get chess_sheetTitle => '체스'; + + @override + String get chess_sectionNewGame => '새 게임'; + + @override + String get chess_sectionYourGames => '내 게임'; + + @override + String get chess_sectionInvites => '열린 초대'; + + @override + String get chess_sectionLive => '진행 중인 게임'; + + @override + String get chess_sectionFinished => '종료된 게임'; + + @override + String get chess_newChallenge => '누군가에게 도전'; + + @override + String get chess_newChallengeSubtitle => '이 채널에서 최근 메시지를 보낸 사람 중에서 선택'; + + @override + String get chess_newOpenInvite => '공개 초대 올리기'; + + @override + String get chess_newOpenInviteSubtitle => '이 채널의 누구나 수락할 수 있습니다'; + + @override + String get chess_emptyTitle => '아직 게임이 없습니다'; + + @override + String get chess_emptySubtitle => + '누군가에게 도전하거나 공개 초대를 올려 보세요. 채널의 누구나 관전할 수 있습니다.'; + + @override + String chess_vs(String white, String black) { + return '$white 대 $black'; + } + + @override + String get chess_unknownPlayer => '알 수 없음'; + + @override + String get chess_rowYourOpenInvite => '내 공개 초대'; + + @override + String chess_rowYourChallenge(String name) { + return '$name님에게 도전했습니다'; + } + + @override + String chess_rowInviteFrom(String name) { + return '$name님과의 게임'; + } + + @override + String get chess_rowStarting => '게임 시작을 기다리는 중'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return '$number수 · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name님이 게임 상대를 찾고 있습니다'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name님이 도전했습니다'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return '수당 제한 시간: $deadline'; + } + + @override + String get chess_accept => '수락'; + + @override + String get chess_decline => '거절'; + + @override + String get chess_remove => '제거'; + + @override + String get chess_cancelInvite => '초대 취소'; + + @override + String get chess_cancelInviteTitle => '이 초대를 취소하시겠습니까?'; + + @override + String get chess_sendFailed => '전송하지 못했습니다. 라디오 연결을 확인하세요.'; + + @override + String chess_challengeSent(String name) { + return '$name님에게 도전을 보냈습니다'; + } + + @override + String get chess_inviteSent => '공개 초대를 올렸습니다'; + + @override + String get chess_pickOpponent => '도전할 상대'; + + @override + String get chess_noRecentSenders => '이 채널에 최근 메시지를 보낸 사람이 없습니다.'; + + @override + String get chess_deadlineLabel => '수당 제한 시간'; + + @override + String get chess_deadlineNone => '제한 없음'; + + @override + String get chess_deadline15m => '15분'; + + @override + String get chess_deadline1h => '1시간'; + + @override + String get chess_deadline6h => '6시간'; + + @override + String get chess_deadline1d => '1일'; + + @override + String get chess_deadline3d => '3일'; + + @override + String get chess_colourLabel => '내 색'; + + @override + String get chess_colourRandom => '무작위'; + + @override + String get chess_colourWhite => '백'; + + @override + String get chess_colourBlack => '흑'; + + @override + String get chess_sendChallenge => '도전 보내기'; + + @override + String get chess_postInvite => '초대 올리기'; + + @override + String get chess_gameGone => '이 게임은 더 이상 사용할 수 없습니다.'; + + @override + String chess_playerYou(String name) { + return '$name (나)'; + } + + @override + String get chess_toMoveChip => '차례'; + + @override + String get chess_statusYourMove => '내 차례'; + + @override + String chess_statusWaiting(String name) { + return '$name님을 기다리는 중'; + } + + @override + String chess_statusToMove(String name) { + return '$name님의 차례'; + } + + @override + String chess_statusTimeLeft(String time) { + return '이 수의 남은 시간 $time'; + } + + @override + String get chess_statusOverdue => '이 수의 제한 시간이 끝났습니다'; + + @override + String chess_statusDrawOffered(String name) { + return '$name님이 무승부를 제안했습니다'; + } + + @override + String get chess_statusUnknownPosition => '다음 수가 오면 판이 표시됩니다.'; + + @override + String get chess_statusUnverified => '플레이어가 아직 확인되지 않았습니다. 업데이트를 요청해 확인하세요.'; + + @override + String get chess_actionResign => '기권'; + + @override + String get chess_actionOfferDraw => '무승부 제안'; + + @override + String get chess_actionAcceptDraw => '무승부 수락'; + + @override + String get chess_actionClaimTimeout => '시간 초과 승리 요청'; + + @override + String get chess_actionNudge => '업데이트 요청'; + + @override + String get chess_actionNudgeTooltip => '플레이어에게 최신 수를 다시 보내 달라고 요청합니다'; + + @override + String get chess_resignConfirmTitle => '이 게임을 기권하시겠습니까?'; + + @override + String get chess_resignConfirmBody => '상대가 승리합니다.'; + + @override + String get chess_movesTitle => '기보'; + + @override + String get chess_noMovesYet => '아직 수가 없습니다'; + + @override + String get chess_movesMissed => '(누락)'; + + @override + String get chess_promoteTitle => '승급할 기물'; + + @override + String get chess_pieceQueen => '퀸'; + + @override + String get chess_pieceRook => '룩'; + + @override + String get chess_pieceBishop => '비숍'; + + @override + String get chess_pieceKnight => '나이트'; + + @override + String get chess_resultDraw => '무승부'; + + @override + String chess_resultWon(String name) { + return '$name님 승리'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => '체크메이트'; + + @override + String get chess_endResignation => '기권'; + + @override + String get chess_endTimeout => '시간 초과'; + + @override + String get chess_endDrawAgreed => '합의 무승부'; + + @override + String get chess_endStalemate => '스테일메이트'; + + @override + String get chess_endInsufficient => '체크메이트에 필요한 기물 부족'; + + @override + String get chess_endFiftyMoves => '50수 규칙'; + + @override + String get chess_endRepetition => '동일 국면 반복'; + + @override + String get chess_endCancelled => '초대가 취소되었습니다'; + + @override + String get chess_endDeclined => '도전이 거절되었습니다'; + + @override + String get chess_endExpired => '초대가 만료되었습니다'; + + @override + String get chess_endTaken => '다른 사람이 먼저 수락했습니다'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes분'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours시간 $minutes분'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days일 $hours시간'; + } + + @override + String get chess_notificationSender => '체스'; + + @override + String chess_notifyChallenge(String name) { + return '$name님이 게임을 도전했습니다'; + } + + @override + String chess_notifyAccepted(String name) { + return '$name님이 게임을 수락했습니다'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return '$name님이 게임을 수락했습니다. 백이며 내 차례입니다.'; + } + + @override + String chess_notifyDeclined(String name) { + return '$name님이 도전을 거절했습니다'; + } + + @override + String get chess_notifyTaken => '다른 사람이 그 게임을 먼저 수락했습니다'; + + @override + String get chess_notifyGameStartedYourMove => '게임이 시작되었습니다. 백이며 내 차례입니다.'; + + @override + String chess_notifyYourMove(String name, String move) { + return '$name님이 $move을(를) 두었습니다. 내 차례입니다.'; + } + + @override + String chess_notifyGameOver(String name) { + return '$name님과의 게임이 종료되었습니다'; + } + + @override + String chess_notifyResigned(String name) { + return '$name님이 기권했습니다. 승리했습니다.'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name님이 무승부를 제안했습니다'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return '$name님이 무승부를 수락했습니다'; + } + + @override + String chess_notifyTimeout(String name) { + return '$name님이 시간 초과 승리를 요청했습니다'; + } } diff --git a/lib/l10n/app_localizations_nl.dart b/lib/l10n/app_localizations_nl.dart index bab90146..9460660c 100644 --- a/lib/l10n/app_localizations_nl.dart +++ b/lib/l10n/app_localizations_nl.dart @@ -7751,4 +7751,387 @@ class AppLocalizationsNl extends AppLocalizations { @override String get coordinate_copied => 'Location copied'; + + @override + String get chess_menuGames => 'Schaakpartijen'; + + @override + String chess_menuGamesCount(int count) { + return 'Schaakpartijen ($count)'; + } + + @override + String get chess_sheetTitle => 'Schaken'; + + @override + String get chess_sectionNewGame => 'Nieuwe partij'; + + @override + String get chess_sectionYourGames => 'Je partijen'; + + @override + String get chess_sectionInvites => 'Open uitnodigingen'; + + @override + String get chess_sectionLive => 'Lopende partijen'; + + @override + String get chess_sectionFinished => 'Beëindigd'; + + @override + String get chess_newChallenge => 'Iemand uitdagen'; + + @override + String get chess_newChallengeSubtitle => + 'Kies iemand die recent op dit kanaal te horen was'; + + @override + String get chess_newOpenInvite => 'Open uitnodiging plaatsen'; + + @override + String get chess_newOpenInviteSubtitle => + 'Iedereen op dit kanaal kan accepteren'; + + @override + String get chess_emptyTitle => 'Nog geen partijen'; + + @override + String get chess_emptySubtitle => + 'Daag iemand uit of plaats een open uitnodiging. Iedereen op het kanaal kan meekijken.'; + + @override + String chess_vs(String white, String black) { + return '$white tegen $black'; + } + + @override + String get chess_unknownPlayer => 'Onbekend'; + + @override + String get chess_rowYourOpenInvite => 'Je open uitnodiging'; + + @override + String chess_rowYourChallenge(String name) { + return 'Je hebt $name uitgedaagd'; + } + + @override + String chess_rowInviteFrom(String name) { + return 'Partij met $name'; + } + + @override + String get chess_rowStarting => 'Wachten tot de partij begint'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return 'Zet $number · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name zoekt een tegenstander'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name heeft je uitgedaagd'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return 'Tijd per zet: $deadline'; + } + + @override + String get chess_accept => 'Accepteren'; + + @override + String get chess_decline => 'Weigeren'; + + @override + String get chess_remove => 'Verwijderen'; + + @override + String get chess_cancelInvite => 'Uitnodiging intrekken'; + + @override + String get chess_cancelInviteTitle => 'Deze uitnodiging intrekken?'; + + @override + String get chess_sendFailed => + 'Verzenden mislukt. Controleer de radioverbinding.'; + + @override + String chess_challengeSent(String name) { + return 'Uitdaging verstuurd naar $name'; + } + + @override + String get chess_inviteSent => 'Open uitnodiging geplaatst'; + + @override + String get chess_pickOpponent => 'Wie uitdagen'; + + @override + String get chess_noRecentSenders => + 'Er heeft recent niemand op dit kanaal gepost.'; + + @override + String get chess_deadlineLabel => 'Tijd per zet'; + + @override + String get chess_deadlineNone => 'Geen limiet'; + + @override + String get chess_deadline15m => '15 minuten'; + + @override + String get chess_deadline1h => '1 uur'; + + @override + String get chess_deadline6h => '6 uur'; + + @override + String get chess_deadline1d => '1 dag'; + + @override + String get chess_deadline3d => '3 dagen'; + + @override + String get chess_colourLabel => 'Je kleur'; + + @override + String get chess_colourRandom => 'Willekeurig'; + + @override + String get chess_colourWhite => 'Wit'; + + @override + String get chess_colourBlack => 'Zwart'; + + @override + String get chess_sendChallenge => 'Uitdaging versturen'; + + @override + String get chess_postInvite => 'Uitnodiging plaatsen'; + + @override + String get chess_gameGone => 'Deze partij is niet meer beschikbaar.'; + + @override + String chess_playerYou(String name) { + return '$name (jij)'; + } + + @override + String get chess_toMoveChip => 'Aan zet'; + + @override + String get chess_statusYourMove => 'Jij bent aan zet'; + + @override + String chess_statusWaiting(String name) { + return 'Wachten op $name'; + } + + @override + String chess_statusToMove(String name) { + return '$name is aan zet'; + } + + @override + String chess_statusTimeLeft(String time) { + return 'Nog $time voor deze zet'; + } + + @override + String get chess_statusOverdue => 'De tijd voor deze zet is om'; + + @override + String chess_statusDrawOffered(String name) { + return '$name biedt remise aan'; + } + + @override + String get chess_statusUnknownPosition => + 'Het bord verschijnt bij de volgende zet.'; + + @override + String get chess_statusUnverified => + 'Spelers nog niet bevestigd. Vraag om een update om ze te controleren.'; + + @override + String get chess_actionResign => 'Opgeven'; + + @override + String get chess_actionOfferDraw => 'Remise aanbieden'; + + @override + String get chess_actionAcceptDraw => 'Remise accepteren'; + + @override + String get chess_actionClaimTimeout => 'Winst op tijd claimen'; + + @override + String get chess_actionNudge => 'Om update vragen'; + + @override + String get chess_actionNudgeTooltip => + 'Vraag de spelers de laatste zet opnieuw te sturen'; + + @override + String get chess_resignConfirmTitle => 'Deze partij opgeven?'; + + @override + String get chess_resignConfirmBody => 'Je tegenstander wint.'; + + @override + String get chess_movesTitle => 'Zetten'; + + @override + String get chess_noMovesYet => 'Nog geen zetten'; + + @override + String get chess_movesMissed => '(gemist)'; + + @override + String get chess_promoteTitle => 'Promoveren tot'; + + @override + String get chess_pieceQueen => 'Dame'; + + @override + String get chess_pieceRook => 'Toren'; + + @override + String get chess_pieceBishop => 'Loper'; + + @override + String get chess_pieceKnight => 'Paard'; + + @override + String get chess_resultDraw => 'Remise'; + + @override + String chess_resultWon(String name) { + return '$name heeft gewonnen'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => 'Schaakmat'; + + @override + String get chess_endResignation => 'Opgave'; + + @override + String get chess_endTimeout => 'Op tijd'; + + @override + String get chess_endDrawAgreed => 'Remise overeengekomen'; + + @override + String get chess_endStalemate => 'Pat'; + + @override + String get chess_endInsufficient => 'Te weinig stukken voor mat'; + + @override + String get chess_endFiftyMoves => '50-zettenregel'; + + @override + String get chess_endRepetition => 'Herhaling'; + + @override + String get chess_endCancelled => 'Uitnodiging ingetrokken'; + + @override + String get chess_endDeclined => 'Uitdaging geweigerd'; + + @override + String get chess_endExpired => 'Uitnodiging verlopen'; + + @override + String get chess_endTaken => 'Iemand anders was eerder'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes min'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours u $minutes min'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days d $hours u'; + } + + @override + String get chess_notificationSender => 'Schaken'; + + @override + String chess_notifyChallenge(String name) { + return '$name heeft je uitgedaagd voor een partij'; + } + + @override + String chess_notifyAccepted(String name) { + return '$name heeft je partij geaccepteerd'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return '$name heeft je partij geaccepteerd. Je speelt wit en bent aan zet.'; + } + + @override + String chess_notifyDeclined(String name) { + return '$name heeft je uitdaging geweigerd'; + } + + @override + String get chess_notifyTaken => + 'Iemand anders heeft die partij eerder geaccepteerd'; + + @override + String get chess_notifyGameStartedYourMove => + 'Je partij is begonnen. Je speelt wit en bent aan zet.'; + + @override + String chess_notifyYourMove(String name, String move) { + return '$name speelde $move. Je bent aan zet.'; + } + + @override + String chess_notifyGameOver(String name) { + return 'Je partij met $name is afgelopen'; + } + + @override + String chess_notifyResigned(String name) { + return '$name heeft opgegeven. Jij wint.'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name biedt remise aan'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return '$name heeft de remise geaccepteerd'; + } + + @override + String chess_notifyTimeout(String name) { + return '$name heeft winst op tijd geclaimd'; + } } diff --git a/lib/l10n/app_localizations_pl.dart b/lib/l10n/app_localizations_pl.dart index 8ff2a74f..22fdead7 100644 --- a/lib/l10n/app_localizations_pl.dart +++ b/lib/l10n/app_localizations_pl.dart @@ -7829,4 +7829,384 @@ class AppLocalizationsPl extends AppLocalizations { @override String get coordinate_copied => 'Location copied'; + + @override + String get chess_menuGames => 'Gry w szachy'; + + @override + String chess_menuGamesCount(int count) { + return 'Gry w szachy ($count)'; + } + + @override + String get chess_sheetTitle => 'Szachy'; + + @override + String get chess_sectionNewGame => 'Nowa gra'; + + @override + String get chess_sectionYourGames => 'Twoje gry'; + + @override + String get chess_sectionInvites => 'Otwarte zaproszenia'; + + @override + String get chess_sectionLive => 'Gry w toku'; + + @override + String get chess_sectionFinished => 'Zakończone'; + + @override + String get chess_newChallenge => 'Rzuć komuś wyzwanie'; + + @override + String get chess_newChallengeSubtitle => + 'Wybierz kogoś ostatnio słyszanego na tym kanale'; + + @override + String get chess_newOpenInvite => 'Opublikuj otwarte zaproszenie'; + + @override + String get chess_newOpenInviteSubtitle => 'Każdy na tym kanale może przyjąć'; + + @override + String get chess_emptyTitle => 'Brak gier'; + + @override + String get chess_emptySubtitle => + 'Rzuć komuś wyzwanie lub opublikuj otwarte zaproszenie. Każdy na kanale może oglądać.'; + + @override + String chess_vs(String white, String black) { + return '$white vs $black'; + } + + @override + String get chess_unknownPlayer => 'Nieznany'; + + @override + String get chess_rowYourOpenInvite => 'Twoje otwarte zaproszenie'; + + @override + String chess_rowYourChallenge(String name) { + return 'Rzucono wyzwanie: $name'; + } + + @override + String chess_rowInviteFrom(String name) { + return 'Gra z $name'; + } + + @override + String get chess_rowStarting => 'Oczekiwanie na początek gry'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return 'Ruch $number · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name szuka partii'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name rzuca Ci wyzwanie'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return 'Czas na ruch: $deadline'; + } + + @override + String get chess_accept => 'Przyjmij'; + + @override + String get chess_decline => 'Odrzuć'; + + @override + String get chess_remove => 'Usuń'; + + @override + String get chess_cancelInvite => 'Anuluj zaproszenie'; + + @override + String get chess_cancelInviteTitle => 'Anulować to zaproszenie?'; + + @override + String get chess_sendFailed => + 'Nie udało się wysłać. Sprawdź połączenie z radiem.'; + + @override + String chess_challengeSent(String name) { + return 'Wyzwanie wysłane do: $name'; + } + + @override + String get chess_inviteSent => 'Otwarte zaproszenie opublikowane'; + + @override + String get chess_pickOpponent => 'Kogo wyzwać'; + + @override + String get chess_noRecentSenders => 'Nikt ostatnio nie pisał na tym kanale.'; + + @override + String get chess_deadlineLabel => 'Czas na ruch'; + + @override + String get chess_deadlineNone => 'Bez limitu'; + + @override + String get chess_deadline15m => '15 minut'; + + @override + String get chess_deadline1h => '1 godzina'; + + @override + String get chess_deadline6h => '6 godzin'; + + @override + String get chess_deadline1d => '1 dzień'; + + @override + String get chess_deadline3d => '3 dni'; + + @override + String get chess_colourLabel => 'Twój kolor'; + + @override + String get chess_colourRandom => 'Losowy'; + + @override + String get chess_colourWhite => 'Białe'; + + @override + String get chess_colourBlack => 'Czarne'; + + @override + String get chess_sendChallenge => 'Wyślij wyzwanie'; + + @override + String get chess_postInvite => 'Opublikuj zaproszenie'; + + @override + String get chess_gameGone => 'Ta gra jest już niedostępna.'; + + @override + String chess_playerYou(String name) { + return '$name (Ty)'; + } + + @override + String get chess_toMoveChip => 'Na ruchu'; + + @override + String get chess_statusYourMove => 'Twój ruch'; + + @override + String chess_statusWaiting(String name) { + return 'Oczekiwanie na: $name'; + } + + @override + String chess_statusToMove(String name) { + return 'Ruch: $name'; + } + + @override + String chess_statusTimeLeft(String time) { + return 'Pozostało $time na ten ruch'; + } + + @override + String get chess_statusOverdue => 'Czas na ten ruch minął'; + + @override + String chess_statusDrawOffered(String name) { + return '$name proponuje remis'; + } + + @override + String get chess_statusUnknownPosition => + 'Szachownica pojawi się wraz z następnym ruchem.'; + + @override + String get chess_statusUnverified => + 'Gracze nie zostali jeszcze potwierdzeni. Poproś o aktualizację, aby ich sprawdzić.'; + + @override + String get chess_actionResign => 'Poddaj się'; + + @override + String get chess_actionOfferDraw => 'Zaproponuj remis'; + + @override + String get chess_actionAcceptDraw => 'Przyjmij remis'; + + @override + String get chess_actionClaimTimeout => 'Zgłoś wygraną na czas'; + + @override + String get chess_actionNudge => 'Poproś o aktualizację'; + + @override + String get chess_actionNudgeTooltip => + 'Poproś graczy o ponowne wysłanie ostatniego ruchu'; + + @override + String get chess_resignConfirmTitle => 'Poddać tę grę?'; + + @override + String get chess_resignConfirmBody => 'Przeciwnik wygrywa.'; + + @override + String get chess_movesTitle => 'Ruchy'; + + @override + String get chess_noMovesYet => 'Brak ruchów'; + + @override + String get chess_movesMissed => '(pominięty)'; + + @override + String get chess_promoteTitle => 'Promuj na'; + + @override + String get chess_pieceQueen => 'Hetman'; + + @override + String get chess_pieceRook => 'Wieża'; + + @override + String get chess_pieceBishop => 'Goniec'; + + @override + String get chess_pieceKnight => 'Skoczek'; + + @override + String get chess_resultDraw => 'Remis'; + + @override + String chess_resultWon(String name) { + return 'Wygrywa $name'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => 'Szach mat'; + + @override + String get chess_endResignation => 'Poddanie'; + + @override + String get chess_endTimeout => 'Na czas'; + + @override + String get chess_endDrawAgreed => 'Remis za zgodą'; + + @override + String get chess_endStalemate => 'Pat'; + + @override + String get chess_endInsufficient => 'Zbyt mało figur do mata'; + + @override + String get chess_endFiftyMoves => 'Reguła 50 posunięć'; + + @override + String get chess_endRepetition => 'Powtórzenie pozycji'; + + @override + String get chess_endCancelled => 'Zaproszenie anulowane'; + + @override + String get chess_endDeclined => 'Wyzwanie odrzucone'; + + @override + String get chess_endExpired => 'Zaproszenie wygasło'; + + @override + String get chess_endTaken => 'Ktoś inny przyjął pierwszy'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes min'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours godz. $minutes min'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days d $hours godz.'; + } + + @override + String get chess_notificationSender => 'Szachy'; + + @override + String chess_notifyChallenge(String name) { + return '$name rzuca Ci wyzwanie w szachy'; + } + + @override + String chess_notifyAccepted(String name) { + return '$name przyjął(-ęła) Twoją grę'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return '$name przyjął(-ęła) Twoją grę. Grasz białymi, Twój ruch.'; + } + + @override + String chess_notifyDeclined(String name) { + return '$name odrzucił(a) Twoje wyzwanie'; + } + + @override + String get chess_notifyTaken => 'Ktoś inny przyjął tę grę pierwszy'; + + @override + String get chess_notifyGameStartedYourMove => + 'Twoja gra się rozpoczęła. Grasz białymi, Twój ruch.'; + + @override + String chess_notifyYourMove(String name, String move) { + return '$name zagrał(a) $move. Twój ruch.'; + } + + @override + String chess_notifyGameOver(String name) { + return 'Twoja gra z $name dobiegła końca'; + } + + @override + String chess_notifyResigned(String name) { + return '$name poddał(a) się. Wygrywasz.'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name proponuje remis'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return '$name przyjął(-ęła) remis'; + } + + @override + String chess_notifyTimeout(String name) { + return '$name zgłosił(a) wygraną na czas'; + } } diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart index df59f378..b23fc1d1 100644 --- a/lib/l10n/app_localizations_pt.dart +++ b/lib/l10n/app_localizations_pt.dart @@ -7773,6 +7773,388 @@ class AppLocalizationsPt extends AppLocalizations { @override String get coordinate_copied => 'Location copied'; + + @override + String get chess_menuGames => 'Jogos de xadrez'; + + @override + String chess_menuGamesCount(int count) { + return 'Jogos de xadrez ($count)'; + } + + @override + String get chess_sheetTitle => 'Xadrez'; + + @override + String get chess_sectionNewGame => 'Novo jogo'; + + @override + String get chess_sectionYourGames => 'Seus jogos'; + + @override + String get chess_sectionInvites => 'Convites abertos'; + + @override + String get chess_sectionLive => 'Jogos em andamento'; + + @override + String get chess_sectionFinished => 'Encerrados'; + + @override + String get chess_newChallenge => 'Desafiar alguém'; + + @override + String get chess_newChallengeSubtitle => + 'Escolha alguém ouvido recentemente neste canal'; + + @override + String get chess_newOpenInvite => 'Publicar um convite aberto'; + + @override + String get chess_newOpenInviteSubtitle => + 'Qualquer pessoa neste canal pode aceitar'; + + @override + String get chess_emptyTitle => 'Nenhum jogo ainda'; + + @override + String get chess_emptySubtitle => + 'Desafie alguém ou publique um convite aberto. Qualquer pessoa no canal pode assistir.'; + + @override + String chess_vs(String white, String black) { + return '$white vs $black'; + } + + @override + String get chess_unknownPlayer => 'Desconhecido'; + + @override + String get chess_rowYourOpenInvite => 'Seu convite aberto'; + + @override + String chess_rowYourChallenge(String name) { + return 'Você desafiou $name'; + } + + @override + String chess_rowInviteFrom(String name) { + return 'Jogo com $name'; + } + + @override + String get chess_rowStarting => 'Aguardando o início do jogo'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return 'Lance $number · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name está procurando um jogo'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name desafiou você'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return 'Tempo por lance: $deadline'; + } + + @override + String get chess_accept => 'Aceitar'; + + @override + String get chess_decline => 'Recusar'; + + @override + String get chess_remove => 'Remover'; + + @override + String get chess_cancelInvite => 'Cancelar convite'; + + @override + String get chess_cancelInviteTitle => 'Cancelar este convite?'; + + @override + String get chess_sendFailed => + 'Não foi possível enviar. Verifique a conexão com o rádio.'; + + @override + String chess_challengeSent(String name) { + return 'Desafio enviado para $name'; + } + + @override + String get chess_inviteSent => 'Convite aberto publicado'; + + @override + String get chess_pickOpponent => 'Quem desafiar'; + + @override + String get chess_noRecentSenders => + 'Ninguém publicou neste canal recentemente.'; + + @override + String get chess_deadlineLabel => 'Tempo por lance'; + + @override + String get chess_deadlineNone => 'Sem limite'; + + @override + String get chess_deadline15m => '15 minutos'; + + @override + String get chess_deadline1h => '1 hora'; + + @override + String get chess_deadline6h => '6 horas'; + + @override + String get chess_deadline1d => '1 dia'; + + @override + String get chess_deadline3d => '3 dias'; + + @override + String get chess_colourLabel => 'Sua cor'; + + @override + String get chess_colourRandom => 'Aleatória'; + + @override + String get chess_colourWhite => 'Brancas'; + + @override + String get chess_colourBlack => 'Pretas'; + + @override + String get chess_sendChallenge => 'Enviar desafio'; + + @override + String get chess_postInvite => 'Publicar convite'; + + @override + String get chess_gameGone => 'Este jogo não está mais disponível.'; + + @override + String chess_playerYou(String name) { + return '$name (você)'; + } + + @override + String get chess_toMoveChip => 'Na vez'; + + @override + String get chess_statusYourMove => 'Sua vez'; + + @override + String chess_statusWaiting(String name) { + return 'Aguardando $name'; + } + + @override + String chess_statusToMove(String name) { + return 'Vez de $name'; + } + + @override + String chess_statusTimeLeft(String time) { + return '$time restantes para este lance'; + } + + @override + String get chess_statusOverdue => 'O tempo para este lance acabou'; + + @override + String chess_statusDrawOffered(String name) { + return '$name oferece empate'; + } + + @override + String get chess_statusUnknownPosition => + 'O tabuleiro aparecerá com o próximo lance.'; + + @override + String get chess_statusUnverified => + 'Jogadores ainda não confirmados. Peça uma atualização para verificá-los.'; + + @override + String get chess_actionResign => 'Desistir'; + + @override + String get chess_actionOfferDraw => 'Oferecer empate'; + + @override + String get chess_actionAcceptDraw => 'Aceitar empate'; + + @override + String get chess_actionClaimTimeout => 'Reivindicar vitória por tempo'; + + @override + String get chess_actionNudge => 'Pedir atualização'; + + @override + String get chess_actionNudgeTooltip => + 'Pedir aos jogadores que reenviem o último lance'; + + @override + String get chess_resignConfirmTitle => 'Desistir deste jogo?'; + + @override + String get chess_resignConfirmBody => 'Seu oponente vence.'; + + @override + String get chess_movesTitle => 'Lances'; + + @override + String get chess_noMovesYet => 'Nenhum lance ainda'; + + @override + String get chess_movesMissed => '(perdido)'; + + @override + String get chess_promoteTitle => 'Promover a'; + + @override + String get chess_pieceQueen => 'Dama'; + + @override + String get chess_pieceRook => 'Torre'; + + @override + String get chess_pieceBishop => 'Bispo'; + + @override + String get chess_pieceKnight => 'Cavalo'; + + @override + String get chess_resultDraw => 'Empate'; + + @override + String chess_resultWon(String name) { + return '$name venceu'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => 'Xeque-mate'; + + @override + String get chess_endResignation => 'Desistência'; + + @override + String get chess_endTimeout => 'Por tempo'; + + @override + String get chess_endDrawAgreed => 'Empate por acordo'; + + @override + String get chess_endStalemate => 'Afogamento'; + + @override + String get chess_endInsufficient => 'Material insuficiente para o mate'; + + @override + String get chess_endFiftyMoves => 'Regra dos 50 lances'; + + @override + String get chess_endRepetition => 'Repetição'; + + @override + String get chess_endCancelled => 'Convite cancelado'; + + @override + String get chess_endDeclined => 'Desafio recusado'; + + @override + String get chess_endExpired => 'Convite expirado'; + + @override + String get chess_endTaken => 'Outra pessoa aceitou primeiro'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes min'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours h $minutes min'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days d $hours h'; + } + + @override + String get chess_notificationSender => 'Xadrez'; + + @override + String chess_notifyChallenge(String name) { + return '$name desafiou você para um jogo'; + } + + @override + String chess_notifyAccepted(String name) { + return '$name aceitou seu jogo'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return '$name aceitou seu jogo. Você joga com as brancas, é a sua vez.'; + } + + @override + String chess_notifyDeclined(String name) { + return '$name recusou seu desafio'; + } + + @override + String get chess_notifyTaken => 'Outra pessoa aceitou esse jogo primeiro'; + + @override + String get chess_notifyGameStartedYourMove => + 'Seu jogo começou. Você joga com as brancas, é a sua vez.'; + + @override + String chess_notifyYourMove(String name, String move) { + return '$name jogou $move. Sua vez.'; + } + + @override + String chess_notifyGameOver(String name) { + return 'Seu jogo com $name terminou'; + } + + @override + String chess_notifyResigned(String name) { + return '$name desistiu. Você venceu.'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name oferece empate'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return '$name aceitou o empate'; + } + + @override + String chess_notifyTimeout(String name) { + return '$name reivindicou vitória por tempo'; + } } /// The translations for Portuguese, as used in Portugal (`pt_PT`). @@ -15310,4 +15692,386 @@ class AppLocalizationsPtPt extends AppLocalizationsPt { String modelDownload_progress(String current, String total, String percent) { return '$current / $total MB ($percent%)'; } + + @override + String get chess_menuGames => 'Jogos de xadrez'; + + @override + String chess_menuGamesCount(int count) { + return 'Jogos de xadrez ($count)'; + } + + @override + String get chess_sheetTitle => 'Xadrez'; + + @override + String get chess_sectionNewGame => 'Novo jogo'; + + @override + String get chess_sectionYourGames => 'Os seus jogos'; + + @override + String get chess_sectionInvites => 'Convites abertos'; + + @override + String get chess_sectionLive => 'Jogos a decorrer'; + + @override + String get chess_sectionFinished => 'Terminados'; + + @override + String get chess_newChallenge => 'Desafiar alguém'; + + @override + String get chess_newChallengeSubtitle => + 'Escolha alguém ouvido recentemente neste canal'; + + @override + String get chess_newOpenInvite => 'Publicar um convite aberto'; + + @override + String get chess_newOpenInviteSubtitle => + 'Qualquer pessoa neste canal pode aceitar'; + + @override + String get chess_emptyTitle => 'Ainda sem jogos'; + + @override + String get chess_emptySubtitle => + 'Desafie alguém ou publique um convite aberto. Qualquer pessoa no canal pode assistir.'; + + @override + String chess_vs(String white, String black) { + return '$white vs $black'; + } + + @override + String get chess_unknownPlayer => 'Desconhecido'; + + @override + String get chess_rowYourOpenInvite => 'O seu convite aberto'; + + @override + String chess_rowYourChallenge(String name) { + return 'Desafiou $name'; + } + + @override + String chess_rowInviteFrom(String name) { + return 'Jogo com $name'; + } + + @override + String get chess_rowStarting => 'A aguardar o início do jogo'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return 'Lance $number · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name procura um jogo'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name desafiou-o'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return 'Tempo por lance: $deadline'; + } + + @override + String get chess_accept => 'Aceitar'; + + @override + String get chess_decline => 'Recusar'; + + @override + String get chess_remove => 'Remover'; + + @override + String get chess_cancelInvite => 'Cancelar convite'; + + @override + String get chess_cancelInviteTitle => 'Cancelar este convite?'; + + @override + String get chess_sendFailed => + 'Não foi possível enviar. Verifique a ligação ao rádio.'; + + @override + String chess_challengeSent(String name) { + return 'Desafio enviado a $name'; + } + + @override + String get chess_inviteSent => 'Convite aberto publicado'; + + @override + String get chess_pickOpponent => 'Quem desafiar'; + + @override + String get chess_noRecentSenders => + 'Ninguém publicou neste canal recentemente.'; + + @override + String get chess_deadlineLabel => 'Tempo por lance'; + + @override + String get chess_deadlineNone => 'Sem limite'; + + @override + String get chess_deadline15m => '15 minutos'; + + @override + String get chess_deadline1h => '1 hora'; + + @override + String get chess_deadline6h => '6 horas'; + + @override + String get chess_deadline1d => '1 dia'; + + @override + String get chess_deadline3d => '3 dias'; + + @override + String get chess_colourLabel => 'A sua cor'; + + @override + String get chess_colourRandom => 'Aleatória'; + + @override + String get chess_colourWhite => 'Brancas'; + + @override + String get chess_colourBlack => 'Pretas'; + + @override + String get chess_sendChallenge => 'Enviar desafio'; + + @override + String get chess_postInvite => 'Publicar convite'; + + @override + String get chess_gameGone => 'Este jogo já não está disponível.'; + + @override + String chess_playerYou(String name) { + return '$name (você)'; + } + + @override + String get chess_toMoveChip => 'Por jogar'; + + @override + String get chess_statusYourMove => 'É a sua vez'; + + @override + String chess_statusWaiting(String name) { + return 'A aguardar $name'; + } + + @override + String chess_statusToMove(String name) { + return 'Vez de $name'; + } + + @override + String chess_statusTimeLeft(String time) { + return 'Restam $time para este lance'; + } + + @override + String get chess_statusOverdue => 'O tempo para este lance esgotou-se'; + + @override + String chess_statusDrawOffered(String name) { + return '$name oferece empate'; + } + + @override + String get chess_statusUnknownPosition => + 'O tabuleiro aparece com o próximo lance.'; + + @override + String get chess_statusUnverified => + 'Jogadores ainda não confirmados. Peça uma atualização para os verificar.'; + + @override + String get chess_actionResign => 'Desistir'; + + @override + String get chess_actionOfferDraw => 'Oferecer empate'; + + @override + String get chess_actionAcceptDraw => 'Aceitar empate'; + + @override + String get chess_actionClaimTimeout => 'Reclamar vitória por tempo'; + + @override + String get chess_actionNudge => 'Pedir atualização'; + + @override + String get chess_actionNudgeTooltip => + 'Pedir aos jogadores que reenviem o último lance'; + + @override + String get chess_resignConfirmTitle => 'Desistir deste jogo?'; + + @override + String get chess_resignConfirmBody => 'O seu adversário vence.'; + + @override + String get chess_movesTitle => 'Lances'; + + @override + String get chess_noMovesYet => 'Ainda sem lances'; + + @override + String get chess_movesMissed => '(perdido)'; + + @override + String get chess_promoteTitle => 'Promover a'; + + @override + String get chess_pieceQueen => 'Dama'; + + @override + String get chess_pieceRook => 'Torre'; + + @override + String get chess_pieceBishop => 'Bispo'; + + @override + String get chess_pieceKnight => 'Cavalo'; + + @override + String get chess_resultDraw => 'Empate'; + + @override + String chess_resultWon(String name) { + return '$name venceu'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => 'Xeque-mate'; + + @override + String get chess_endResignation => 'Desistência'; + + @override + String get chess_endTimeout => 'Por tempo'; + + @override + String get chess_endDrawAgreed => 'Empate por acordo'; + + @override + String get chess_endStalemate => 'Rei afogado'; + + @override + String get chess_endInsufficient => 'Material insuficiente para dar mate'; + + @override + String get chess_endFiftyMoves => 'Regra dos 50 lances'; + + @override + String get chess_endRepetition => 'Repetição'; + + @override + String get chess_endCancelled => 'Convite cancelado'; + + @override + String get chess_endDeclined => 'Desafio recusado'; + + @override + String get chess_endExpired => 'Convite expirado'; + + @override + String get chess_endTaken => 'Outra pessoa aceitou primeiro'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes min'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours h $minutes min'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days d $hours h'; + } + + @override + String get chess_notificationSender => 'Xadrez'; + + @override + String chess_notifyChallenge(String name) { + return '$name desafiou-o para um jogo'; + } + + @override + String chess_notifyAccepted(String name) { + return '$name aceitou o seu jogo'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return '$name aceitou o seu jogo. Joga com as brancas, é a sua vez.'; + } + + @override + String chess_notifyDeclined(String name) { + return '$name recusou o seu desafio'; + } + + @override + String get chess_notifyTaken => 'Outra pessoa aceitou esse jogo primeiro'; + + @override + String get chess_notifyGameStartedYourMove => + 'O seu jogo começou. Joga com as brancas, é a sua vez.'; + + @override + String chess_notifyYourMove(String name, String move) { + return '$name jogou $move. É a sua vez.'; + } + + @override + String chess_notifyGameOver(String name) { + return 'O seu jogo com $name terminou'; + } + + @override + String chess_notifyResigned(String name) { + return '$name desistiu. Venceu.'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name oferece empate'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return '$name aceitou o empate'; + } + + @override + String chess_notifyTimeout(String name) { + return '$name reclamou vitória por tempo'; + } } diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart index 87c33317..f266343d 100644 --- a/lib/l10n/app_localizations_ru.dart +++ b/lib/l10n/app_localizations_ru.dart @@ -7809,4 +7809,385 @@ class AppLocalizationsRu extends AppLocalizations { @override String get coordinate_copied => 'Location copied'; + + @override + String get chess_menuGames => 'Шахматные партии'; + + @override + String chess_menuGamesCount(int count) { + return 'Шахматные партии ($count)'; + } + + @override + String get chess_sheetTitle => 'Шахматы'; + + @override + String get chess_sectionNewGame => 'Новая партия'; + + @override + String get chess_sectionYourGames => 'Ваши партии'; + + @override + String get chess_sectionInvites => 'Открытые приглашения'; + + @override + String get chess_sectionLive => 'Идут сейчас'; + + @override + String get chess_sectionFinished => 'Завершённые'; + + @override + String get chess_newChallenge => 'Бросить вызов'; + + @override + String get chess_newChallengeSubtitle => + 'Выберите того, кого недавно слышно в этом канале'; + + @override + String get chess_newOpenInvite => 'Опубликовать открытое приглашение'; + + @override + String get chess_newOpenInviteSubtitle => + 'Принять вызов может любой в этом канале'; + + @override + String get chess_emptyTitle => 'Партий пока нет'; + + @override + String get chess_emptySubtitle => + 'Бросьте кому-нибудь вызов или опубликуйте открытое приглашение. Наблюдать может любой в канале.'; + + @override + String chess_vs(String white, String black) { + return '$white против $black'; + } + + @override + String get chess_unknownPlayer => 'Неизвестный'; + + @override + String get chess_rowYourOpenInvite => 'Ваше открытое приглашение'; + + @override + String chess_rowYourChallenge(String name) { + return 'Вы бросили вызов: $name'; + } + + @override + String chess_rowInviteFrom(String name) { + return 'Партия с $name'; + } + + @override + String get chess_rowStarting => 'Ожидание начала партии'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return 'Ход $number · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name ищет партнёра для игры'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name бросает вам вызов'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return 'Время на ход: $deadline'; + } + + @override + String get chess_accept => 'Принять'; + + @override + String get chess_decline => 'Отклонить'; + + @override + String get chess_remove => 'Удалить'; + + @override + String get chess_cancelInvite => 'Отменить приглашение'; + + @override + String get chess_cancelInviteTitle => 'Отменить это приглашение?'; + + @override + String get chess_sendFailed => + 'Не удалось отправить. Проверьте подключение к радио.'; + + @override + String chess_challengeSent(String name) { + return 'Вызов отправлен: $name'; + } + + @override + String get chess_inviteSent => 'Открытое приглашение опубликовано'; + + @override + String get chess_pickOpponent => 'Недавно в этом канале никто не писал.'; + + @override + String get chess_noRecentSenders => 'Кому бросить вызов'; + + @override + String get chess_deadlineLabel => 'Время на ход'; + + @override + String get chess_deadlineNone => 'Без ограничения'; + + @override + String get chess_deadline15m => '15 минут'; + + @override + String get chess_deadline1h => '1 час'; + + @override + String get chess_deadline6h => '6 часов'; + + @override + String get chess_deadline1d => '1 день'; + + @override + String get chess_deadline3d => '3 дня'; + + @override + String get chess_colourLabel => 'Ваш цвет'; + + @override + String get chess_colourRandom => 'Случайно'; + + @override + String get chess_colourWhite => 'Белые'; + + @override + String get chess_colourBlack => 'Чёрные'; + + @override + String get chess_sendChallenge => 'Отправить вызов'; + + @override + String get chess_postInvite => 'Опубликовать'; + + @override + String get chess_gameGone => 'Эта партия больше недоступна.'; + + @override + String chess_playerYou(String name) { + return '$name (вы)'; + } + + @override + String get chess_toMoveChip => 'Ход'; + + @override + String get chess_statusYourMove => 'Ваш ход'; + + @override + String chess_statusWaiting(String name) { + return 'Ожидание: $name'; + } + + @override + String chess_statusToMove(String name) { + return 'Ход: $name'; + } + + @override + String chess_statusTimeLeft(String time) { + return 'Осталось на этот ход: $time'; + } + + @override + String get chess_statusOverdue => 'Время на этот ход истекло'; + + @override + String chess_statusDrawOffered(String name) { + return '$name предлагает ничью'; + } + + @override + String get chess_statusUnknownPosition => + 'Доска появится после следующего хода.'; + + @override + String get chess_statusUnverified => + 'Участники ещё не подтверждены. Запросите обновление, чтобы проверить их.'; + + @override + String get chess_actionResign => 'Сдаться'; + + @override + String get chess_actionOfferDraw => 'Предложить ничью'; + + @override + String get chess_actionAcceptDraw => 'Принять ничью'; + + @override + String get chess_actionClaimTimeout => 'Требовать победу по времени'; + + @override + String get chess_actionNudge => 'Запросить обновление'; + + @override + String get chess_actionNudgeTooltip => + 'Попросить игроков повторно отправить последний ход'; + + @override + String get chess_resignConfirmTitle => 'Сдаться в этой партии?'; + + @override + String get chess_resignConfirmBody => 'Победит ваш соперник.'; + + @override + String get chess_movesTitle => 'Ходы'; + + @override + String get chess_noMovesYet => 'Ходов пока нет'; + + @override + String get chess_movesMissed => '(пропущен)'; + + @override + String get chess_promoteTitle => 'Превращение в'; + + @override + String get chess_pieceQueen => 'Ферзь'; + + @override + String get chess_pieceRook => 'Ладья'; + + @override + String get chess_pieceBishop => 'Слон'; + + @override + String get chess_pieceKnight => 'Конь'; + + @override + String get chess_resultDraw => 'Ничья'; + + @override + String chess_resultWon(String name) { + return 'Победа: $name'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => 'Мат'; + + @override + String get chess_endResignation => 'Сдача'; + + @override + String get chess_endTimeout => 'По времени'; + + @override + String get chess_endDrawAgreed => 'Ничья по соглашению'; + + @override + String get chess_endStalemate => 'Пат'; + + @override + String get chess_endInsufficient => 'Недостаточно материала для мата'; + + @override + String get chess_endFiftyMoves => 'Правило 50 ходов'; + + @override + String get chess_endRepetition => 'Повторение позиции'; + + @override + String get chess_endCancelled => 'Приглашение отменено'; + + @override + String get chess_endDeclined => 'Вызов отклонён'; + + @override + String get chess_endExpired => 'Приглашение истекло'; + + @override + String get chess_endTaken => 'Другой игрок принял раньше'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes мин'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours ч $minutes мин'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days д $hours ч'; + } + + @override + String get chess_notificationSender => 'Шахматы'; + + @override + String chess_notifyChallenge(String name) { + return '$name бросает вам вызов'; + } + + @override + String chess_notifyAccepted(String name) { + return 'Ваша партия принята: $name'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return 'Ваша партия принята: $name. Вы играете белыми, ваш ход.'; + } + + @override + String chess_notifyDeclined(String name) { + return '$name отклоняет ваш вызов'; + } + + @override + String get chess_notifyTaken => 'Другой игрок принял эту партию раньше'; + + @override + String get chess_notifyGameStartedYourMove => + 'Ваша партия началась. Вы играете белыми, ваш ход.'; + + @override + String chess_notifyYourMove(String name, String move) { + return '$name: $move. Ваш ход.'; + } + + @override + String chess_notifyGameOver(String name) { + return 'Ваша партия с $name завершена'; + } + + @override + String chess_notifyResigned(String name) { + return '$name сдался. Вы победили.'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name предлагает ничью'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return '$name принимает ничью'; + } + + @override + String chess_notifyTimeout(String name) { + return '$name требует победу по времени'; + } } diff --git a/lib/l10n/app_localizations_sk.dart b/lib/l10n/app_localizations_sk.dart index d2ad2c00..d5ab910d 100644 --- a/lib/l10n/app_localizations_sk.dart +++ b/lib/l10n/app_localizations_sk.dart @@ -7776,4 +7776,385 @@ class AppLocalizationsSk extends AppLocalizations { @override String get coordinate_copied => 'Location copied'; + + @override + String get chess_menuGames => 'Šachové hry'; + + @override + String chess_menuGamesCount(int count) { + return 'Šachové hry ($count)'; + } + + @override + String get chess_sheetTitle => 'Šach'; + + @override + String get chess_sectionNewGame => 'Nová hra'; + + @override + String get chess_sectionYourGames => 'Vaše hry'; + + @override + String get chess_sectionInvites => 'Otvorené výzvy'; + + @override + String get chess_sectionLive => 'Prebiehajúce hry'; + + @override + String get chess_sectionFinished => 'Dohraté'; + + @override + String get chess_newChallenge => 'Vyzvať niekoho'; + + @override + String get chess_newChallengeSubtitle => + 'Vyberte niekoho, koho ste nedávno počuli na tomto kanáli'; + + @override + String get chess_newOpenInvite => 'Zverejniť otvorenú výzvu'; + + @override + String get chess_newOpenInviteSubtitle => + 'Prijať ju môže ktokoľvek na tomto kanáli'; + + @override + String get chess_emptyTitle => 'Zatiaľ žiadne hry'; + + @override + String get chess_emptySubtitle => + 'Vyzvite niekoho alebo zverejnite otvorenú výzvu. Ktokoľvek na kanáli sa môže pozerať.'; + + @override + String chess_vs(String white, String black) { + return '$white vs $black'; + } + + @override + String get chess_unknownPlayer => 'Neznámy'; + + @override + String get chess_rowYourOpenInvite => 'Vaša otvorená výzva'; + + @override + String chess_rowYourChallenge(String name) { + return 'Vyzvali ste hráča $name'; + } + + @override + String chess_rowInviteFrom(String name) { + return 'Hra s hráčom $name'; + } + + @override + String get chess_rowStarting => 'Čaká sa na začiatok hry'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return 'Ťah $number · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name hľadá súpera'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name vás vyzýva'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return 'Čas na ťah: $deadline'; + } + + @override + String get chess_accept => 'Prijať'; + + @override + String get chess_decline => 'Odmietnuť'; + + @override + String get chess_remove => 'Odstrániť'; + + @override + String get chess_cancelInvite => 'Zrušiť výzvu'; + + @override + String get chess_cancelInviteTitle => 'Zrušiť túto výzvu?'; + + @override + String get chess_sendFailed => + 'Odoslanie zlyhalo. Skontrolujte spojenie s rádiom.'; + + @override + String chess_challengeSent(String name) { + return 'Výzva odoslaná hráčovi $name'; + } + + @override + String get chess_inviteSent => 'Otvorená výzva zverejnená'; + + @override + String get chess_pickOpponent => 'Koho vyzvať'; + + @override + String get chess_noRecentSenders => 'Na tomto kanáli nedávno nikto nepísal.'; + + @override + String get chess_deadlineLabel => 'Čas na ťah'; + + @override + String get chess_deadlineNone => 'Bez limitu'; + + @override + String get chess_deadline15m => '15 minút'; + + @override + String get chess_deadline1h => '1 hodina'; + + @override + String get chess_deadline6h => '6 hodín'; + + @override + String get chess_deadline1d => '1 deň'; + + @override + String get chess_deadline3d => '3 dni'; + + @override + String get chess_colourLabel => 'Vaša farba'; + + @override + String get chess_colourRandom => 'Náhodná'; + + @override + String get chess_colourWhite => 'Biela'; + + @override + String get chess_colourBlack => 'Čierna'; + + @override + String get chess_sendChallenge => 'Odoslať výzvu'; + + @override + String get chess_postInvite => 'Zverejniť výzvu'; + + @override + String get chess_gameGone => 'Táto hra už nie je k dispozícii.'; + + @override + String chess_playerYou(String name) { + return '$name (vy)'; + } + + @override + String get chess_toMoveChip => 'Na ťahu'; + + @override + String get chess_statusYourMove => 'Váš ťah'; + + @override + String chess_statusWaiting(String name) { + return 'Čaká sa na hráča $name'; + } + + @override + String chess_statusToMove(String name) { + return 'Na ťahu: $name'; + } + + @override + String chess_statusTimeLeft(String time) { + return 'Na tento ťah zostáva $time'; + } + + @override + String get chess_statusOverdue => 'Čas na tento ťah vypršal'; + + @override + String chess_statusDrawOffered(String name) { + return '$name ponúka remízu'; + } + + @override + String get chess_statusUnknownPosition => + 'Šachovnica sa zobrazí s ďalším ťahom.'; + + @override + String get chess_statusUnverified => + 'Hráči zatiaľ nie sú potvrdení. Vyžiadajte si aktualizáciu a overte ich.'; + + @override + String get chess_actionResign => 'Vzdať sa'; + + @override + String get chess_actionOfferDraw => 'Ponúknuť remízu'; + + @override + String get chess_actionAcceptDraw => 'Prijať remízu'; + + @override + String get chess_actionClaimTimeout => 'Uplatniť výhru na čas'; + + @override + String get chess_actionNudge => 'Vyžiadať aktualizáciu'; + + @override + String get chess_actionNudgeTooltip => + 'Požiadať hráčov o opätovné odoslanie posledného ťahu'; + + @override + String get chess_resignConfirmTitle => 'Vzdať sa tejto hry?'; + + @override + String get chess_resignConfirmBody => 'Súper vyhráva.'; + + @override + String get chess_movesTitle => 'Ťahy'; + + @override + String get chess_noMovesYet => 'Zatiaľ žiadne ťahy'; + + @override + String get chess_movesMissed => '(zmeškané)'; + + @override + String get chess_promoteTitle => 'Premeniť na'; + + @override + String get chess_pieceQueen => 'Dáma'; + + @override + String get chess_pieceRook => 'Veža'; + + @override + String get chess_pieceBishop => 'Strelec'; + + @override + String get chess_pieceKnight => 'Jazdec'; + + @override + String get chess_resultDraw => 'Remíza'; + + @override + String chess_resultWon(String name) { + return 'Víťazí $name'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => 'Mat'; + + @override + String get chess_endResignation => 'Vzdanie sa'; + + @override + String get chess_endTimeout => 'Na čas'; + + @override + String get chess_endDrawAgreed => 'Remíza dohodou'; + + @override + String get chess_endStalemate => 'Pat'; + + @override + String get chess_endInsufficient => 'Nedostatok materiálu na mat'; + + @override + String get chess_endFiftyMoves => 'Pravidlo 50 ťahov'; + + @override + String get chess_endRepetition => 'Opakovanie pozície'; + + @override + String get chess_endCancelled => 'Výzva zrušená'; + + @override + String get chess_endDeclined => 'Výzva odmietnutá'; + + @override + String get chess_endExpired => 'Výzva vypršala'; + + @override + String get chess_endTaken => 'Prijal ju niekto iný'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes min'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours h $minutes min'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days d $hours h'; + } + + @override + String get chess_notificationSender => 'Šach'; + + @override + String chess_notifyChallenge(String name) { + return '$name vás vyzýva na hru'; + } + + @override + String chess_notifyAccepted(String name) { + return 'Hráč $name prijal vašu hru'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return 'Hráč $name prijal vašu hru. Hráte bielymi, ste na ťahu.'; + } + + @override + String chess_notifyDeclined(String name) { + return 'Hráč $name odmietol vašu výzvu'; + } + + @override + String get chess_notifyTaken => 'Túto hru prijal skôr niekto iný'; + + @override + String get chess_notifyGameStartedYourMove => + 'Vaša hra sa začala. Hráte bielymi, ste na ťahu.'; + + @override + String chess_notifyYourMove(String name, String move) { + return 'Hráč $name potiahol $move. Ste na ťahu.'; + } + + @override + String chess_notifyGameOver(String name) { + return 'Vaša hra s hráčom $name skončila'; + } + + @override + String chess_notifyResigned(String name) { + return 'Hráč $name sa vzdal. Vyhrávate.'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name ponúka remízu'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return 'Hráč $name prijal remízu'; + } + + @override + String chess_notifyTimeout(String name) { + return 'Hráč $name uplatnil výhru na čas'; + } } diff --git a/lib/l10n/app_localizations_sl.dart b/lib/l10n/app_localizations_sl.dart index 2c807d71..d862e175 100644 --- a/lib/l10n/app_localizations_sl.dart +++ b/lib/l10n/app_localizations_sl.dart @@ -7768,4 +7768,385 @@ class AppLocalizationsSl extends AppLocalizations { @override String get coordinate_copied => 'Location copied'; + + @override + String get chess_menuGames => 'Šahovske igre'; + + @override + String chess_menuGamesCount(int count) { + return 'Šahovske igre ($count)'; + } + + @override + String get chess_sheetTitle => 'Šah'; + + @override + String get chess_sectionNewGame => 'Nova igra'; + + @override + String get chess_sectionYourGames => 'Vaše igre'; + + @override + String get chess_sectionInvites => 'Odprta povabila'; + + @override + String get chess_sectionLive => 'Igre v teku'; + + @override + String get chess_sectionFinished => 'Končane'; + + @override + String get chess_newChallenge => 'Izzovi nekoga'; + + @override + String get chess_newChallengeSubtitle => + 'Izberite nekoga, ki se je nedavno oglasil na tem kanalu'; + + @override + String get chess_newOpenInvite => 'Objavi odprto povabilo'; + + @override + String get chess_newOpenInviteSubtitle => + 'Sprejme ga lahko kdorkoli na tem kanalu'; + + @override + String get chess_emptyTitle => 'Še ni iger'; + + @override + String get chess_emptySubtitle => + 'Izzovite nekoga ali objavite odprto povabilo. Na kanalu lahko igro spremlja kdorkoli.'; + + @override + String chess_vs(String white, String black) { + return '$white proti $black'; + } + + @override + String get chess_unknownPlayer => 'Neznan'; + + @override + String get chess_rowYourOpenInvite => 'Vaše odprto povabilo'; + + @override + String chess_rowYourChallenge(String name) { + return 'Izzvali ste igralca $name'; + } + + @override + String chess_rowInviteFrom(String name) { + return 'Igra z igralcem $name'; + } + + @override + String get chess_rowStarting => 'Čakanje na začetek igre'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return 'Poteza $number · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name išče nasprotnika'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name vas izziva'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return 'Čas za potezo: $deadline'; + } + + @override + String get chess_accept => 'Sprejmi'; + + @override + String get chess_decline => 'Zavrni'; + + @override + String get chess_remove => 'Odstrani'; + + @override + String get chess_cancelInvite => 'Prekliči povabilo'; + + @override + String get chess_cancelInviteTitle => 'Preklicati to povabilo?'; + + @override + String get chess_sendFailed => + 'Pošiljanje ni uspelo. Preverite povezavo z radiem.'; + + @override + String chess_challengeSent(String name) { + return 'Izziv poslan igralcu $name'; + } + + @override + String get chess_inviteSent => 'Odprto povabilo objavljeno'; + + @override + String get chess_pickOpponent => 'Koga izzvati'; + + @override + String get chess_noRecentSenders => 'Na tem kanalu nedavno ni nihče objavil.'; + + @override + String get chess_deadlineLabel => 'Čas za potezo'; + + @override + String get chess_deadlineNone => 'Brez omejitve'; + + @override + String get chess_deadline15m => '15 minut'; + + @override + String get chess_deadline1h => '1 ura'; + + @override + String get chess_deadline6h => '6 ur'; + + @override + String get chess_deadline1d => '1 dan'; + + @override + String get chess_deadline3d => '3 dni'; + + @override + String get chess_colourLabel => 'Vaša barva'; + + @override + String get chess_colourRandom => 'Naključna'; + + @override + String get chess_colourWhite => 'Bela'; + + @override + String get chess_colourBlack => 'Črna'; + + @override + String get chess_sendChallenge => 'Pošlji izziv'; + + @override + String get chess_postInvite => 'Objavi povabilo'; + + @override + String get chess_gameGone => 'Ta igra ni več na voljo.'; + + @override + String chess_playerYou(String name) { + return '$name (vi)'; + } + + @override + String get chess_toMoveChip => 'Na potezi'; + + @override + String get chess_statusYourMove => 'Vaša poteza'; + + @override + String chess_statusWaiting(String name) { + return 'Čakanje na igralca $name'; + } + + @override + String chess_statusToMove(String name) { + return 'Na potezi: $name'; + } + + @override + String chess_statusTimeLeft(String time) { + return 'Za to potezo je ostalo $time'; + } + + @override + String get chess_statusOverdue => 'Čas za to potezo je potekel'; + + @override + String chess_statusDrawOffered(String name) { + return '$name ponuja remi'; + } + + @override + String get chess_statusUnknownPosition => + 'Šahovnica se prikaže ob naslednji potezi.'; + + @override + String get chess_statusUnverified => + 'Igralci še niso potrjeni. Zahtevajte posodobitev, da jih preverite.'; + + @override + String get chess_actionResign => 'Vdaj se'; + + @override + String get chess_actionOfferDraw => 'Ponudi remi'; + + @override + String get chess_actionAcceptDraw => 'Sprejmi remi'; + + @override + String get chess_actionClaimTimeout => 'Zahtevaj zmago na čas'; + + @override + String get chess_actionNudge => 'Zahtevaj posodobitev'; + + @override + String get chess_actionNudgeTooltip => + 'Prosi igralca, naj ponovno pošljeta zadnjo potezo'; + + @override + String get chess_resignConfirmTitle => 'Se vdati v tej igri?'; + + @override + String get chess_resignConfirmBody => 'Nasprotnik zmaga.'; + + @override + String get chess_movesTitle => 'Poteze'; + + @override + String get chess_noMovesYet => 'Še ni potez'; + + @override + String get chess_movesMissed => '(zamujeno)'; + + @override + String get chess_promoteTitle => 'Promocija v'; + + @override + String get chess_pieceQueen => 'Dama'; + + @override + String get chess_pieceRook => 'Trdnjava'; + + @override + String get chess_pieceBishop => 'Tekač'; + + @override + String get chess_pieceKnight => 'Konj'; + + @override + String get chess_resultDraw => 'Remi'; + + @override + String chess_resultWon(String name) { + return 'Zmagal je $name'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => 'Mat'; + + @override + String get chess_endResignation => 'Vdaja'; + + @override + String get chess_endTimeout => 'Na čas'; + + @override + String get chess_endDrawAgreed => 'Dogovorjen remi'; + + @override + String get chess_endStalemate => 'Pat'; + + @override + String get chess_endInsufficient => 'Premalo figur za mat'; + + @override + String get chess_endFiftyMoves => 'Pravilo 50 potez'; + + @override + String get chess_endRepetition => 'Ponovitev'; + + @override + String get chess_endCancelled => 'Povabilo preklicano'; + + @override + String get chess_endDeclined => 'Izziv zavrnjen'; + + @override + String get chess_endExpired => 'Povabilo je poteklo'; + + @override + String get chess_endTaken => 'Prej je sprejel nekdo drug'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes min'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours h $minutes min'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days d $hours h'; + } + + @override + String get chess_notificationSender => 'Šah'; + + @override + String chess_notifyChallenge(String name) { + return '$name vas izziva v igro'; + } + + @override + String chess_notifyAccepted(String name) { + return 'Igralec $name je sprejel vašo igro'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return 'Igralec $name je sprejel vašo igro. Igrate z belimi, ste na potezi.'; + } + + @override + String chess_notifyDeclined(String name) { + return 'Igralec $name je zavrnil vaš izziv'; + } + + @override + String get chess_notifyTaken => 'To igro je prej sprejel nekdo drug'; + + @override + String get chess_notifyGameStartedYourMove => + 'Vaša igra se je začela. Igrate z belimi, ste na potezi.'; + + @override + String chess_notifyYourMove(String name, String move) { + return 'Igralec $name je odigral $move. Ste na potezi.'; + } + + @override + String chess_notifyGameOver(String name) { + return 'Vaša igra z igralcem $name se je končala'; + } + + @override + String chess_notifyResigned(String name) { + return 'Igralec $name se je vdal. Zmagali ste.'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name ponuja remi'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return 'Igralec $name je sprejel remi'; + } + + @override + String chess_notifyTimeout(String name) { + return 'Igralec $name je zahteval zmago na čas'; + } } diff --git a/lib/l10n/app_localizations_sv.dart b/lib/l10n/app_localizations_sv.dart index 64008f62..eb534124 100644 --- a/lib/l10n/app_localizations_sv.dart +++ b/lib/l10n/app_localizations_sv.dart @@ -7728,4 +7728,385 @@ class AppLocalizationsSv extends AppLocalizations { @override String get coordinate_copied => 'Location copied'; + + @override + String get chess_menuGames => 'Schackpartier'; + + @override + String chess_menuGamesCount(int count) { + return 'Schackpartier ($count)'; + } + + @override + String get chess_sheetTitle => 'Schack'; + + @override + String get chess_sectionNewGame => 'Nytt parti'; + + @override + String get chess_sectionYourGames => 'Dina partier'; + + @override + String get chess_sectionInvites => 'Öppna inbjudningar'; + + @override + String get chess_sectionLive => 'Pågående partier'; + + @override + String get chess_sectionFinished => 'Avslutade'; + + @override + String get chess_newChallenge => 'Utmana någon'; + + @override + String get chess_newChallengeSubtitle => + 'Välj någon som nyligen hörts på den här kanalen'; + + @override + String get chess_newOpenInvite => 'Skicka en öppen inbjudan'; + + @override + String get chess_newOpenInviteSubtitle => + 'Vem som helst på den här kanalen kan acceptera'; + + @override + String get chess_emptyTitle => 'Inga partier ännu'; + + @override + String get chess_emptySubtitle => + 'Utmana någon eller skicka en öppen inbjudan. Alla på kanalen kan titta på.'; + + @override + String chess_vs(String white, String black) { + return '$white mot $black'; + } + + @override + String get chess_unknownPlayer => 'Okänd'; + + @override + String get chess_rowYourOpenInvite => 'Din öppna inbjudan'; + + @override + String chess_rowYourChallenge(String name) { + return 'Du utmanade $name'; + } + + @override + String chess_rowInviteFrom(String name) { + return 'Parti med $name'; + } + + @override + String get chess_rowStarting => 'Väntar på att partiet ska starta'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return 'Drag $number · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name söker ett parti'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name utmanade dig'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return 'Tid per drag: $deadline'; + } + + @override + String get chess_accept => 'Acceptera'; + + @override + String get chess_decline => 'Avböj'; + + @override + String get chess_remove => 'Ta bort'; + + @override + String get chess_cancelInvite => 'Dra tillbaka inbjudan'; + + @override + String get chess_cancelInviteTitle => 'Dra tillbaka den här inbjudan?'; + + @override + String get chess_sendFailed => + 'Det gick inte att skicka. Kontrollera radioanslutningen.'; + + @override + String chess_challengeSent(String name) { + return 'Utmaning skickad till $name'; + } + + @override + String get chess_inviteSent => 'Öppen inbjudan skickad'; + + @override + String get chess_pickOpponent => 'Vem vill du utmana?'; + + @override + String get chess_noRecentSenders => + 'Ingen har skrivit på den här kanalen nyligen.'; + + @override + String get chess_deadlineLabel => 'Tid per drag'; + + @override + String get chess_deadlineNone => 'Ingen gräns'; + + @override + String get chess_deadline15m => '15 minuter'; + + @override + String get chess_deadline1h => '1 timme'; + + @override + String get chess_deadline6h => '6 timmar'; + + @override + String get chess_deadline1d => '1 dag'; + + @override + String get chess_deadline3d => '3 dagar'; + + @override + String get chess_colourLabel => 'Din färg'; + + @override + String get chess_colourRandom => 'Slumpmässig'; + + @override + String get chess_colourWhite => 'Vit'; + + @override + String get chess_colourBlack => 'Svart'; + + @override + String get chess_sendChallenge => 'Skicka utmaning'; + + @override + String get chess_postInvite => 'Skicka inbjudan'; + + @override + String get chess_gameGone => 'Det här partiet finns inte längre.'; + + @override + String chess_playerYou(String name) { + return '$name (du)'; + } + + @override + String get chess_toMoveChip => 'Vid draget'; + + @override + String get chess_statusYourMove => 'Din tur'; + + @override + String chess_statusWaiting(String name) { + return 'Väntar på $name'; + } + + @override + String chess_statusToMove(String name) { + return '$name är vid draget'; + } + + @override + String chess_statusTimeLeft(String time) { + return '$time kvar för det här draget'; + } + + @override + String get chess_statusOverdue => 'Tiden för det här draget har gått ut'; + + @override + String chess_statusDrawOffered(String name) { + return '$name erbjuder remi'; + } + + @override + String get chess_statusUnknownPosition => 'Brädet visas vid nästa drag.'; + + @override + String get chess_statusUnverified => + 'Spelarna är inte bekräftade ännu. Be om en uppdatering för att kontrollera dem.'; + + @override + String get chess_actionResign => 'Ge upp'; + + @override + String get chess_actionOfferDraw => 'Erbjud remi'; + + @override + String get chess_actionAcceptDraw => 'Acceptera remi'; + + @override + String get chess_actionClaimTimeout => 'Kräv vinst på tid'; + + @override + String get chess_actionNudge => 'Be om uppdatering'; + + @override + String get chess_actionNudgeTooltip => + 'Be spelarna skicka det senaste draget igen'; + + @override + String get chess_resignConfirmTitle => 'Ge upp partiet?'; + + @override + String get chess_resignConfirmBody => 'Din motståndare vinner.'; + + @override + String get chess_movesTitle => 'Drag'; + + @override + String get chess_noMovesYet => 'Inga drag ännu'; + + @override + String get chess_movesMissed => '(missat)'; + + @override + String get chess_promoteTitle => 'Förvandla till'; + + @override + String get chess_pieceQueen => 'Dam'; + + @override + String get chess_pieceRook => 'Torn'; + + @override + String get chess_pieceBishop => 'Löpare'; + + @override + String get chess_pieceKnight => 'Springare'; + + @override + String get chess_resultDraw => 'Remi'; + + @override + String chess_resultWon(String name) { + return '$name vann'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => 'Schackmatt'; + + @override + String get chess_endResignation => 'Uppgivning'; + + @override + String get chess_endTimeout => 'På tid'; + + @override + String get chess_endDrawAgreed => 'Remi överenskommen'; + + @override + String get chess_endStalemate => 'Patt'; + + @override + String get chess_endInsufficient => 'För få pjäser för matt'; + + @override + String get chess_endFiftyMoves => '50-dragsregeln'; + + @override + String get chess_endRepetition => 'Upprepning'; + + @override + String get chess_endCancelled => 'Inbjudan tillbakadragen'; + + @override + String get chess_endDeclined => 'Utmaning avböjd'; + + @override + String get chess_endExpired => 'Inbjudan har gått ut'; + + @override + String get chess_endTaken => 'Någon annan accepterade först'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes min'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours h $minutes min'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days d $hours h'; + } + + @override + String get chess_notificationSender => 'Schack'; + + @override + String chess_notifyChallenge(String name) { + return '$name utmanade dig på ett parti'; + } + + @override + String chess_notifyAccepted(String name) { + return '$name accepterade ditt parti'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return '$name accepterade ditt parti. Du spelar vit, och det är ditt drag.'; + } + + @override + String chess_notifyDeclined(String name) { + return '$name avböjde din utmaning'; + } + + @override + String get chess_notifyTaken => 'Någon annan accepterade partiet först'; + + @override + String get chess_notifyGameStartedYourMove => + 'Ditt parti har startat. Du spelar vit, och det är ditt drag.'; + + @override + String chess_notifyYourMove(String name, String move) { + return '$name spelade $move. Din tur.'; + } + + @override + String chess_notifyGameOver(String name) { + return 'Ditt parti med $name är slut'; + } + + @override + String chess_notifyResigned(String name) { + return '$name gav upp. Du vinner.'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name erbjuder remi'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return '$name accepterade remin'; + } + + @override + String chess_notifyTimeout(String name) { + return '$name krävde vinst på tid'; + } } diff --git a/lib/l10n/app_localizations_uk.dart b/lib/l10n/app_localizations_uk.dart index 552aeaae..e103e09e 100644 --- a/lib/l10n/app_localizations_uk.dart +++ b/lib/l10n/app_localizations_uk.dart @@ -7821,4 +7821,385 @@ class AppLocalizationsUk extends AppLocalizations { @override String get coordinate_copied => 'Location copied'; + + @override + String get chess_menuGames => 'Шахові партії'; + + @override + String chess_menuGamesCount(int count) { + return 'Шахові партії ($count)'; + } + + @override + String get chess_sheetTitle => 'Шахи'; + + @override + String get chess_sectionNewGame => 'Нова партія'; + + @override + String get chess_sectionYourGames => 'Ваші партії'; + + @override + String get chess_sectionInvites => 'Відкриті запрошення'; + + @override + String get chess_sectionLive => 'Тривають зараз'; + + @override + String get chess_sectionFinished => 'Завершені'; + + @override + String get chess_newChallenge => 'Кинути виклик'; + + @override + String get chess_newChallengeSubtitle => + 'Оберіть того, кого нещодавно чутно в цьому каналі'; + + @override + String get chess_newOpenInvite => 'Опублікувати відкрите запрошення'; + + @override + String get chess_newOpenInviteSubtitle => + 'Прийняти виклик може будь-хто в цьому каналі'; + + @override + String get chess_emptyTitle => 'Партій поки немає'; + + @override + String get chess_emptySubtitle => + 'Киньте комусь виклик або опублікуйте відкрите запрошення. Спостерігати може будь-хто в каналі.'; + + @override + String chess_vs(String white, String black) { + return '$white проти $black'; + } + + @override + String get chess_unknownPlayer => 'Невідомий'; + + @override + String get chess_rowYourOpenInvite => 'Ваше відкрите запрошення'; + + @override + String chess_rowYourChallenge(String name) { + return 'Ви кинули виклик: $name'; + } + + @override + String chess_rowInviteFrom(String name) { + return 'Партія з $name'; + } + + @override + String get chess_rowStarting => 'Очікування початку партії'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return 'Хід $number · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name шукає партнера для гри'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name кидає вам виклик'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return 'Час на хід: $deadline'; + } + + @override + String get chess_accept => 'Прийняти'; + + @override + String get chess_decline => 'Відхилити'; + + @override + String get chess_remove => 'Видалити'; + + @override + String get chess_cancelInvite => 'Скасувати запрошення'; + + @override + String get chess_cancelInviteTitle => 'Скасувати це запрошення?'; + + @override + String get chess_sendFailed => + 'Не вдалося надіслати. Перевірте підключення до радіо.'; + + @override + String chess_challengeSent(String name) { + return 'Виклик надіслано: $name'; + } + + @override + String get chess_inviteSent => 'Відкрите запрошення опубліковано'; + + @override + String get chess_pickOpponent => 'Недавно в цьому каналі ніхто не писав.'; + + @override + String get chess_noRecentSenders => 'Кому кинути виклик'; + + @override + String get chess_deadlineLabel => 'Час на хід'; + + @override + String get chess_deadlineNone => 'Без обмеження'; + + @override + String get chess_deadline15m => '15 хвилин'; + + @override + String get chess_deadline1h => '1 година'; + + @override + String get chess_deadline6h => '6 годин'; + + @override + String get chess_deadline1d => '1 день'; + + @override + String get chess_deadline3d => '3 дні'; + + @override + String get chess_colourLabel => 'Ваш колір'; + + @override + String get chess_colourRandom => 'Випадково'; + + @override + String get chess_colourWhite => 'Білі'; + + @override + String get chess_colourBlack => 'Чорні'; + + @override + String get chess_sendChallenge => 'Надіслати виклик'; + + @override + String get chess_postInvite => 'Опублікувати'; + + @override + String get chess_gameGone => 'Ця партія більше недоступна.'; + + @override + String chess_playerYou(String name) { + return '$name (ви)'; + } + + @override + String get chess_toMoveChip => 'Хід'; + + @override + String get chess_statusYourMove => 'Ваш хід'; + + @override + String chess_statusWaiting(String name) { + return 'Очікування: $name'; + } + + @override + String chess_statusToMove(String name) { + return 'Хід: $name'; + } + + @override + String chess_statusTimeLeft(String time) { + return 'Залишилось на цей хід: $time'; + } + + @override + String get chess_statusOverdue => 'Час на цей хід вичерпано'; + + @override + String chess_statusDrawOffered(String name) { + return '$name пропонує нічию'; + } + + @override + String get chess_statusUnknownPosition => + 'Дошка з’явиться після наступного ходу.'; + + @override + String get chess_statusUnverified => + 'Учасників ще не підтверджено. Запросіть оновлення, щоб перевірити їх.'; + + @override + String get chess_actionResign => 'Здатися'; + + @override + String get chess_actionOfferDraw => 'Запропонувати нічию'; + + @override + String get chess_actionAcceptDraw => 'Прийняти нічию'; + + @override + String get chess_actionClaimTimeout => 'Вимагати перемогу за часом'; + + @override + String get chess_actionNudge => 'Запросити оновлення'; + + @override + String get chess_actionNudgeTooltip => + 'Попросити гравців повторно надіслати останній хід'; + + @override + String get chess_resignConfirmTitle => 'Здатися в цій партії?'; + + @override + String get chess_resignConfirmBody => 'Переможе ваш суперник.'; + + @override + String get chess_movesTitle => 'Ходи'; + + @override + String get chess_noMovesYet => 'Ходів поки немає'; + + @override + String get chess_movesMissed => '(пропущено)'; + + @override + String get chess_promoteTitle => 'Перетворення на'; + + @override + String get chess_pieceQueen => 'Ферзь'; + + @override + String get chess_pieceRook => 'Тура'; + + @override + String get chess_pieceBishop => 'Слон'; + + @override + String get chess_pieceKnight => 'Кінь'; + + @override + String get chess_resultDraw => 'Нічия'; + + @override + String chess_resultWon(String name) { + return 'Перемога: $name'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => 'Мат'; + + @override + String get chess_endResignation => 'Здача'; + + @override + String get chess_endTimeout => 'За часом'; + + @override + String get chess_endDrawAgreed => 'Нічия за згодою'; + + @override + String get chess_endStalemate => 'Пат'; + + @override + String get chess_endInsufficient => 'Недостатньо матеріалу для мату'; + + @override + String get chess_endFiftyMoves => 'Правило 50 ходів'; + + @override + String get chess_endRepetition => 'Повторення позиції'; + + @override + String get chess_endCancelled => 'Запрошення скасовано'; + + @override + String get chess_endDeclined => 'Виклик відхилено'; + + @override + String get chess_endExpired => 'Запрошення закінчилося'; + + @override + String get chess_endTaken => 'Інший гравець прийняв раніше'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes хв'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours год $minutes хв'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days д $hours год'; + } + + @override + String get chess_notificationSender => 'Шахи'; + + @override + String chess_notifyChallenge(String name) { + return '$name кидає вам виклик'; + } + + @override + String chess_notifyAccepted(String name) { + return 'Вашу партію прийнято: $name'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return 'Вашу партію прийнято: $name. Ви граєте білими, ваш хід.'; + } + + @override + String chess_notifyDeclined(String name) { + return '$name відхиляє ваш виклик'; + } + + @override + String get chess_notifyTaken => 'Інший гравець прийняв цю партію раніше'; + + @override + String get chess_notifyGameStartedYourMove => + 'Ваша партія почалася. Ви граєте білими, ваш хід.'; + + @override + String chess_notifyYourMove(String name, String move) { + return '$name: $move. Ваш хід.'; + } + + @override + String chess_notifyGameOver(String name) { + return 'Ваша партія з $name завершена'; + } + + @override + String chess_notifyResigned(String name) { + return '$name здався. Ви перемогли.'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name пропонує нічию'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return '$name приймає нічию'; + } + + @override + String chess_notifyTimeout(String name) { + return '$name вимагає перемогу за часом'; + } } diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart index 50dd22f5..a83b8f41 100644 --- a/lib/l10n/app_localizations_zh.dart +++ b/lib/l10n/app_localizations_zh.dart @@ -7279,4 +7279,377 @@ class AppLocalizationsZh extends AppLocalizations { @override String get coordinate_copied => 'Location copied'; + + @override + String get chess_menuGames => '国际象棋对局'; + + @override + String chess_menuGamesCount(int count) { + return '国际象棋对局 ($count)'; + } + + @override + String get chess_sheetTitle => '国际象棋'; + + @override + String get chess_sectionNewGame => '新对局'; + + @override + String get chess_sectionYourGames => '我的对局'; + + @override + String get chess_sectionInvites => '公开邀请'; + + @override + String get chess_sectionLive => '进行中的对局'; + + @override + String get chess_sectionFinished => '已结束'; + + @override + String get chess_newChallenge => '挑战某人'; + + @override + String get chess_newChallengeSubtitle => '从此频道最近发言的人中选择'; + + @override + String get chess_newOpenInvite => '发布公开邀请'; + + @override + String get chess_newOpenInviteSubtitle => '此频道中的任何人都可以接受'; + + @override + String get chess_emptyTitle => '还没有对局'; + + @override + String get chess_emptySubtitle => '挑战某人或发布公开邀请。频道中的任何人都可以观战。'; + + @override + String chess_vs(String white, String black) { + return '$white 对 $black'; + } + + @override + String get chess_unknownPlayer => '未知'; + + @override + String get chess_rowYourOpenInvite => '你的公开邀请'; + + @override + String chess_rowYourChallenge(String name) { + return '你向 $name 发起了挑战'; + } + + @override + String chess_rowInviteFrom(String name) { + return '与 $name 的对局'; + } + + @override + String get chess_rowStarting => '等待对局开始'; + + @override + String chess_rowMoveTurn(int number, String turn) { + return '第 $number 步 · $turn'; + } + + @override + String chess_rowOpenInvite(String name) { + return '$name 正在寻找对手'; + } + + @override + String chess_rowChallengedYou(String name) { + return '$name 向你发起了挑战'; + } + + @override + String chess_rowInviteDetails(String deadline) { + return '每步用时: $deadline'; + } + + @override + String get chess_accept => '接受'; + + @override + String get chess_decline => '拒绝'; + + @override + String get chess_remove => '移除'; + + @override + String get chess_cancelInvite => '取消邀请'; + + @override + String get chess_cancelInviteTitle => '取消此邀请?'; + + @override + String get chess_sendFailed => '无法发送。请检查无线电连接。'; + + @override + String chess_challengeSent(String name) { + return '已向 $name 发送挑战'; + } + + @override + String get chess_inviteSent => '公开邀请已发布'; + + @override + String get chess_pickOpponent => '选择挑战对象'; + + @override + String get chess_noRecentSenders => '此频道最近没有人发言。'; + + @override + String get chess_deadlineLabel => '每步用时'; + + @override + String get chess_deadlineNone => '不限时'; + + @override + String get chess_deadline15m => '15 分钟'; + + @override + String get chess_deadline1h => '1 小时'; + + @override + String get chess_deadline6h => '6 小时'; + + @override + String get chess_deadline1d => '1 天'; + + @override + String get chess_deadline3d => '3 天'; + + @override + String get chess_colourLabel => '你的颜色'; + + @override + String get chess_colourRandom => '随机'; + + @override + String get chess_colourWhite => '白方'; + + @override + String get chess_colourBlack => '黑方'; + + @override + String get chess_sendChallenge => '发送挑战'; + + @override + String get chess_postInvite => '发布邀请'; + + @override + String get chess_gameGone => '此对局已不可用。'; + + @override + String chess_playerYou(String name) { + return '$name (你)'; + } + + @override + String get chess_toMoveChip => '该走棋'; + + @override + String get chess_statusYourMove => '轮到你了'; + + @override + String chess_statusWaiting(String name) { + return '等待 $name'; + } + + @override + String chess_statusToMove(String name) { + return '轮到 $name'; + } + + @override + String chess_statusTimeLeft(String time) { + return '本步剩余 $time'; + } + + @override + String get chess_statusOverdue => '本步用时已到'; + + @override + String chess_statusDrawOffered(String name) { + return '$name 提议和棋'; + } + + @override + String get chess_statusUnknownPosition => '下一步走棋后将显示棋盘。'; + + @override + String get chess_statusUnverified => '尚未确认对局双方。请求更新以进行确认。'; + + @override + String get chess_actionResign => '认输'; + + @override + String get chess_actionOfferDraw => '提议和棋'; + + @override + String get chess_actionAcceptDraw => '接受和棋'; + + @override + String get chess_actionClaimTimeout => '超时判胜'; + + @override + String get chess_actionNudge => '请求更新'; + + @override + String get chess_actionNudgeTooltip => '请对局双方重新发送最新一步'; + + @override + String get chess_resignConfirmTitle => '认输并结束此对局?'; + + @override + String get chess_resignConfirmBody => '对手将获胜。'; + + @override + String get chess_movesTitle => '棋谱'; + + @override + String get chess_noMovesYet => '还没有走棋'; + + @override + String get chess_movesMissed => '(缺失)'; + + @override + String get chess_promoteTitle => '升变为'; + + @override + String get chess_pieceQueen => '后'; + + @override + String get chess_pieceRook => '车'; + + @override + String get chess_pieceBishop => '象'; + + @override + String get chess_pieceKnight => '马'; + + @override + String get chess_resultDraw => '和棋'; + + @override + String chess_resultWon(String name) { + return '$name 获胜'; + } + + @override + String chess_resultWithReason(String result, String reason) { + return '$result · $reason'; + } + + @override + String get chess_endCheckmate => '将死'; + + @override + String get chess_endResignation => '认输'; + + @override + String get chess_endTimeout => '超时'; + + @override + String get chess_endDrawAgreed => '协议和棋'; + + @override + String get chess_endStalemate => '逼和'; + + @override + String get chess_endInsufficient => '子力不足无法将死'; + + @override + String get chess_endFiftyMoves => '五十步规则'; + + @override + String get chess_endRepetition => '重复局面'; + + @override + String get chess_endCancelled => '邀请已取消'; + + @override + String get chess_endDeclined => '挑战已被拒绝'; + + @override + String get chess_endExpired => '邀请已过期'; + + @override + String get chess_endTaken => '已被其他人抢先接受'; + + @override + String chess_timeMinutes(int minutes) { + return '$minutes 分钟'; + } + + @override + String chess_timeHours(int hours, int minutes) { + return '$hours 小时 $minutes 分钟'; + } + + @override + String chess_timeDays(int days, int hours) { + return '$days 天 $hours 小时'; + } + + @override + String get chess_notificationSender => '国际象棋'; + + @override + String chess_notifyChallenge(String name) { + return '$name 向你发起了对局挑战'; + } + + @override + String chess_notifyAccepted(String name) { + return '$name 接受了你的对局'; + } + + @override + String chess_notifyAcceptedYourMove(String name) { + return '$name 接受了你的对局。你执白,轮到你走棋。'; + } + + @override + String chess_notifyDeclined(String name) { + return '$name 拒绝了你的挑战'; + } + + @override + String get chess_notifyTaken => '其他人已抢先接受该对局'; + + @override + String get chess_notifyGameStartedYourMove => '对局已开始。你执白,轮到你走棋。'; + + @override + String chess_notifyYourMove(String name, String move) { + return '$name 走了 $move。轮到你了。'; + } + + @override + String chess_notifyGameOver(String name) { + return '你与 $name 的对局已结束'; + } + + @override + String chess_notifyResigned(String name) { + return '$name 认输了。你获胜。'; + } + + @override + String chess_notifyDrawOffered(String name) { + return '$name 提议和棋'; + } + + @override + String chess_notifyDrawAccepted(String name) { + return '$name 接受了和棋'; + } + + @override + String chess_notifyTimeout(String name) { + return '$name 申请超时判胜'; + } } diff --git a/lib/l10n/app_nl.arb b/lib/l10n/app_nl.arb index d9dce235..a8536949 100644 --- a/lib/l10n/app_nl.arb +++ b/lib/l10n/app_nl.arb @@ -3703,5 +3703,110 @@ "modelDownload_verifying": "Download controleren", "modelDownload_useModel": "Dit model gebruiken", "modelDownload_removeFailed": "Het model kon niet worden verwijderd: {error}", - "modelDownload_progress": "{current} / {total} MB ({percent}%)" + "modelDownload_progress": "{current} / {total} MB ({percent}%)", + "chess_menuGames": "Schaakpartijen", + "chess_menuGamesCount": "Schaakpartijen ({count})", + "chess_sheetTitle": "Schaken", + "chess_sectionNewGame": "Nieuwe partij", + "chess_sectionYourGames": "Je partijen", + "chess_sectionInvites": "Open uitnodigingen", + "chess_sectionLive": "Lopende partijen", + "chess_sectionFinished": "Beëindigd", + "chess_newChallenge": "Iemand uitdagen", + "chess_newChallengeSubtitle": "Kies iemand die recent op dit kanaal te horen was", + "chess_newOpenInvite": "Open uitnodiging plaatsen", + "chess_newOpenInviteSubtitle": "Iedereen op dit kanaal kan accepteren", + "chess_emptyTitle": "Nog geen partijen", + "chess_emptySubtitle": "Daag iemand uit of plaats een open uitnodiging. Iedereen op het kanaal kan meekijken.", + "chess_vs": "{white} tegen {black}", + "chess_unknownPlayer": "Onbekend", + "chess_rowYourOpenInvite": "Je open uitnodiging", + "chess_rowYourChallenge": "Je hebt {name} uitgedaagd", + "chess_rowInviteFrom": "Partij met {name}", + "chess_rowStarting": "Wachten tot de partij begint", + "chess_rowMoveTurn": "Zet {number} · {turn}", + "chess_rowOpenInvite": "{name} zoekt een tegenstander", + "chess_rowChallengedYou": "{name} heeft je uitgedaagd", + "chess_rowInviteDetails": "Tijd per zet: {deadline}", + "chess_accept": "Accepteren", + "chess_decline": "Weigeren", + "chess_remove": "Verwijderen", + "chess_cancelInvite": "Uitnodiging intrekken", + "chess_cancelInviteTitle": "Deze uitnodiging intrekken?", + "chess_sendFailed": "Verzenden mislukt. Controleer de radioverbinding.", + "chess_challengeSent": "Uitdaging verstuurd naar {name}", + "chess_inviteSent": "Open uitnodiging geplaatst", + "chess_pickOpponent": "Wie uitdagen", + "chess_noRecentSenders": "Er heeft recent niemand op dit kanaal gepost.", + "chess_deadlineLabel": "Tijd per zet", + "chess_deadlineNone": "Geen limiet", + "chess_deadline15m": "15 minuten", + "chess_deadline1h": "1 uur", + "chess_deadline6h": "6 uur", + "chess_deadline1d": "1 dag", + "chess_deadline3d": "3 dagen", + "chess_colourLabel": "Je kleur", + "chess_colourRandom": "Willekeurig", + "chess_colourWhite": "Wit", + "chess_colourBlack": "Zwart", + "chess_sendChallenge": "Uitdaging versturen", + "chess_postInvite": "Uitnodiging plaatsen", + "chess_gameGone": "Deze partij is niet meer beschikbaar.", + "chess_playerYou": "{name} (jij)", + "chess_toMoveChip": "Aan zet", + "chess_statusYourMove": "Jij bent aan zet", + "chess_statusWaiting": "Wachten op {name}", + "chess_statusToMove": "{name} is aan zet", + "chess_statusTimeLeft": "Nog {time} voor deze zet", + "chess_statusOverdue": "De tijd voor deze zet is om", + "chess_statusDrawOffered": "{name} biedt remise aan", + "chess_statusUnknownPosition": "Het bord verschijnt bij de volgende zet.", + "chess_statusUnverified": "Spelers nog niet bevestigd. Vraag om een update om ze te controleren.", + "chess_actionResign": "Opgeven", + "chess_actionOfferDraw": "Remise aanbieden", + "chess_actionAcceptDraw": "Remise accepteren", + "chess_actionClaimTimeout": "Winst op tijd claimen", + "chess_actionNudge": "Om update vragen", + "chess_actionNudgeTooltip": "Vraag de spelers de laatste zet opnieuw te sturen", + "chess_resignConfirmTitle": "Deze partij opgeven?", + "chess_resignConfirmBody": "Je tegenstander wint.", + "chess_movesTitle": "Zetten", + "chess_noMovesYet": "Nog geen zetten", + "chess_movesMissed": "(gemist)", + "chess_promoteTitle": "Promoveren tot", + "chess_pieceQueen": "Dame", + "chess_pieceRook": "Toren", + "chess_pieceBishop": "Loper", + "chess_pieceKnight": "Paard", + "chess_resultDraw": "Remise", + "chess_resultWon": "{name} heeft gewonnen", + "chess_resultWithReason": "{result} · {reason}", + "chess_endCheckmate": "Schaakmat", + "chess_endResignation": "Opgave", + "chess_endTimeout": "Op tijd", + "chess_endDrawAgreed": "Remise overeengekomen", + "chess_endStalemate": "Pat", + "chess_endInsufficient": "Te weinig stukken voor mat", + "chess_endFiftyMoves": "50-zettenregel", + "chess_endRepetition": "Herhaling", + "chess_endCancelled": "Uitnodiging ingetrokken", + "chess_endDeclined": "Uitdaging geweigerd", + "chess_endExpired": "Uitnodiging verlopen", + "chess_endTaken": "Iemand anders was eerder", + "chess_timeMinutes": "{minutes} min", + "chess_timeHours": "{hours} u {minutes} min", + "chess_timeDays": "{days} d {hours} u", + "chess_notificationSender": "Schaken", + "chess_notifyChallenge": "{name} heeft je uitgedaagd voor een partij", + "chess_notifyAccepted": "{name} heeft je partij geaccepteerd", + "chess_notifyAcceptedYourMove": "{name} heeft je partij geaccepteerd. Je speelt wit en bent aan zet.", + "chess_notifyDeclined": "{name} heeft je uitdaging geweigerd", + "chess_notifyTaken": "Iemand anders heeft die partij eerder geaccepteerd", + "chess_notifyGameStartedYourMove": "Je partij is begonnen. Je speelt wit en bent aan zet.", + "chess_notifyYourMove": "{name} speelde {move}. Je bent aan zet.", + "chess_notifyGameOver": "Je partij met {name} is afgelopen", + "chess_notifyResigned": "{name} heeft opgegeven. Jij wint.", + "chess_notifyDrawOffered": "{name} biedt remise aan", + "chess_notifyDrawAccepted": "{name} heeft de remise geaccepteerd", + "chess_notifyTimeout": "{name} heeft winst op tijd geclaimd" } diff --git a/lib/l10n/app_pl.arb b/lib/l10n/app_pl.arb index 05df7924..4b434ba0 100644 --- a/lib/l10n/app_pl.arb +++ b/lib/l10n/app_pl.arb @@ -4041,5 +4041,110 @@ "modelDownload_verifying": "Sprawdzanie pobierania", "modelDownload_useModel": "Użyj tego modelu", "modelDownload_removeFailed": "Nie udało się usunąć modelu: {error}", - "modelDownload_progress": "{current} / {total} MB ({percent}%)" + "modelDownload_progress": "{current} / {total} MB ({percent}%)", + "chess_menuGames": "Gry w szachy", + "chess_menuGamesCount": "Gry w szachy ({count})", + "chess_sheetTitle": "Szachy", + "chess_sectionNewGame": "Nowa gra", + "chess_sectionYourGames": "Twoje gry", + "chess_sectionInvites": "Otwarte zaproszenia", + "chess_sectionLive": "Gry w toku", + "chess_sectionFinished": "Zakończone", + "chess_newChallenge": "Rzuć komuś wyzwanie", + "chess_newChallengeSubtitle": "Wybierz kogoś ostatnio słyszanego na tym kanale", + "chess_newOpenInvite": "Opublikuj otwarte zaproszenie", + "chess_newOpenInviteSubtitle": "Każdy na tym kanale może przyjąć", + "chess_emptyTitle": "Brak gier", + "chess_emptySubtitle": "Rzuć komuś wyzwanie lub opublikuj otwarte zaproszenie. Każdy na kanale może oglądać.", + "chess_vs": "{white} vs {black}", + "chess_unknownPlayer": "Nieznany", + "chess_rowYourOpenInvite": "Twoje otwarte zaproszenie", + "chess_rowYourChallenge": "Rzucono wyzwanie: {name}", + "chess_rowInviteFrom": "Gra z {name}", + "chess_rowStarting": "Oczekiwanie na początek gry", + "chess_rowMoveTurn": "Ruch {number} · {turn}", + "chess_rowOpenInvite": "{name} szuka partii", + "chess_rowChallengedYou": "{name} rzuca Ci wyzwanie", + "chess_rowInviteDetails": "Czas na ruch: {deadline}", + "chess_accept": "Przyjmij", + "chess_decline": "Odrzuć", + "chess_remove": "Usuń", + "chess_cancelInvite": "Anuluj zaproszenie", + "chess_cancelInviteTitle": "Anulować to zaproszenie?", + "chess_sendFailed": "Nie udało się wysłać. Sprawdź połączenie z radiem.", + "chess_challengeSent": "Wyzwanie wysłane do: {name}", + "chess_inviteSent": "Otwarte zaproszenie opublikowane", + "chess_pickOpponent": "Kogo wyzwać", + "chess_noRecentSenders": "Nikt ostatnio nie pisał na tym kanale.", + "chess_deadlineLabel": "Czas na ruch", + "chess_deadlineNone": "Bez limitu", + "chess_deadline15m": "15 minut", + "chess_deadline1h": "1 godzina", + "chess_deadline6h": "6 godzin", + "chess_deadline1d": "1 dzień", + "chess_deadline3d": "3 dni", + "chess_colourLabel": "Twój kolor", + "chess_colourRandom": "Losowy", + "chess_colourWhite": "Białe", + "chess_colourBlack": "Czarne", + "chess_sendChallenge": "Wyślij wyzwanie", + "chess_postInvite": "Opublikuj zaproszenie", + "chess_gameGone": "Ta gra jest już niedostępna.", + "chess_playerYou": "{name} (Ty)", + "chess_toMoveChip": "Na ruchu", + "chess_statusYourMove": "Twój ruch", + "chess_statusWaiting": "Oczekiwanie na: {name}", + "chess_statusToMove": "Ruch: {name}", + "chess_statusTimeLeft": "Pozostało {time} na ten ruch", + "chess_statusOverdue": "Czas na ten ruch minął", + "chess_statusDrawOffered": "{name} proponuje remis", + "chess_statusUnknownPosition": "Szachownica pojawi się wraz z następnym ruchem.", + "chess_statusUnverified": "Gracze nie zostali jeszcze potwierdzeni. Poproś o aktualizację, aby ich sprawdzić.", + "chess_actionResign": "Poddaj się", + "chess_actionOfferDraw": "Zaproponuj remis", + "chess_actionAcceptDraw": "Przyjmij remis", + "chess_actionClaimTimeout": "Zgłoś wygraną na czas", + "chess_actionNudge": "Poproś o aktualizację", + "chess_actionNudgeTooltip": "Poproś graczy o ponowne wysłanie ostatniego ruchu", + "chess_resignConfirmTitle": "Poddać tę grę?", + "chess_resignConfirmBody": "Przeciwnik wygrywa.", + "chess_movesTitle": "Ruchy", + "chess_noMovesYet": "Brak ruchów", + "chess_movesMissed": "(pominięty)", + "chess_promoteTitle": "Promuj na", + "chess_pieceQueen": "Hetman", + "chess_pieceRook": "Wieża", + "chess_pieceBishop": "Goniec", + "chess_pieceKnight": "Skoczek", + "chess_resultDraw": "Remis", + "chess_resultWon": "Wygrywa {name}", + "chess_resultWithReason": "{result} · {reason}", + "chess_endCheckmate": "Szach mat", + "chess_endResignation": "Poddanie", + "chess_endTimeout": "Na czas", + "chess_endDrawAgreed": "Remis za zgodą", + "chess_endStalemate": "Pat", + "chess_endInsufficient": "Zbyt mało figur do mata", + "chess_endFiftyMoves": "Reguła 50 posunięć", + "chess_endRepetition": "Powtórzenie pozycji", + "chess_endCancelled": "Zaproszenie anulowane", + "chess_endDeclined": "Wyzwanie odrzucone", + "chess_endExpired": "Zaproszenie wygasło", + "chess_endTaken": "Ktoś inny przyjął pierwszy", + "chess_timeMinutes": "{minutes} min", + "chess_timeHours": "{hours} godz. {minutes} min", + "chess_timeDays": "{days} d {hours} godz.", + "chess_notificationSender": "Szachy", + "chess_notifyChallenge": "{name} rzuca Ci wyzwanie w szachy", + "chess_notifyAccepted": "{name} przyjął(-ęła) Twoją grę", + "chess_notifyAcceptedYourMove": "{name} przyjął(-ęła) Twoją grę. Grasz białymi, Twój ruch.", + "chess_notifyDeclined": "{name} odrzucił(a) Twoje wyzwanie", + "chess_notifyTaken": "Ktoś inny przyjął tę grę pierwszy", + "chess_notifyGameStartedYourMove": "Twoja gra się rozpoczęła. Grasz białymi, Twój ruch.", + "chess_notifyYourMove": "{name} zagrał(a) {move}. Twój ruch.", + "chess_notifyGameOver": "Twoja gra z {name} dobiegła końca", + "chess_notifyResigned": "{name} poddał(a) się. Wygrywasz.", + "chess_notifyDrawOffered": "{name} proponuje remis", + "chess_notifyDrawAccepted": "{name} przyjął(-ęła) remis", + "chess_notifyTimeout": "{name} zgłosił(a) wygraną na czas" } diff --git a/lib/l10n/app_pt.arb b/lib/l10n/app_pt.arb index c2f564b0..aa723eab 100644 --- a/lib/l10n/app_pt.arb +++ b/lib/l10n/app_pt.arb @@ -3854,5 +3854,110 @@ "modelDownload_verifying": "Verificando o download", "modelDownload_useModel": "Usar este modelo", "modelDownload_removeFailed": "Não foi possível remover o modelo: {error}", - "modelDownload_progress": "{current} / {total} MB ({percent}%)" + "modelDownload_progress": "{current} / {total} MB ({percent}%)", + "chess_menuGames": "Jogos de xadrez", + "chess_menuGamesCount": "Jogos de xadrez ({count})", + "chess_sheetTitle": "Xadrez", + "chess_sectionNewGame": "Novo jogo", + "chess_sectionYourGames": "Seus jogos", + "chess_sectionInvites": "Convites abertos", + "chess_sectionLive": "Jogos em andamento", + "chess_sectionFinished": "Encerrados", + "chess_newChallenge": "Desafiar alguém", + "chess_newChallengeSubtitle": "Escolha alguém ouvido recentemente neste canal", + "chess_newOpenInvite": "Publicar um convite aberto", + "chess_newOpenInviteSubtitle": "Qualquer pessoa neste canal pode aceitar", + "chess_emptyTitle": "Nenhum jogo ainda", + "chess_emptySubtitle": "Desafie alguém ou publique um convite aberto. Qualquer pessoa no canal pode assistir.", + "chess_vs": "{white} vs {black}", + "chess_unknownPlayer": "Desconhecido", + "chess_rowYourOpenInvite": "Seu convite aberto", + "chess_rowYourChallenge": "Você desafiou {name}", + "chess_rowInviteFrom": "Jogo com {name}", + "chess_rowStarting": "Aguardando o início do jogo", + "chess_rowMoveTurn": "Lance {number} · {turn}", + "chess_rowOpenInvite": "{name} está procurando um jogo", + "chess_rowChallengedYou": "{name} desafiou você", + "chess_rowInviteDetails": "Tempo por lance: {deadline}", + "chess_accept": "Aceitar", + "chess_decline": "Recusar", + "chess_remove": "Remover", + "chess_cancelInvite": "Cancelar convite", + "chess_cancelInviteTitle": "Cancelar este convite?", + "chess_sendFailed": "Não foi possível enviar. Verifique a conexão com o rádio.", + "chess_challengeSent": "Desafio enviado para {name}", + "chess_inviteSent": "Convite aberto publicado", + "chess_pickOpponent": "Quem desafiar", + "chess_noRecentSenders": "Ninguém publicou neste canal recentemente.", + "chess_deadlineLabel": "Tempo por lance", + "chess_deadlineNone": "Sem limite", + "chess_deadline15m": "15 minutos", + "chess_deadline1h": "1 hora", + "chess_deadline6h": "6 horas", + "chess_deadline1d": "1 dia", + "chess_deadline3d": "3 dias", + "chess_colourLabel": "Sua cor", + "chess_colourRandom": "Aleatória", + "chess_colourWhite": "Brancas", + "chess_colourBlack": "Pretas", + "chess_sendChallenge": "Enviar desafio", + "chess_postInvite": "Publicar convite", + "chess_gameGone": "Este jogo não está mais disponível.", + "chess_playerYou": "{name} (você)", + "chess_toMoveChip": "Na vez", + "chess_statusYourMove": "Sua vez", + "chess_statusWaiting": "Aguardando {name}", + "chess_statusToMove": "Vez de {name}", + "chess_statusTimeLeft": "{time} restantes para este lance", + "chess_statusOverdue": "O tempo para este lance acabou", + "chess_statusDrawOffered": "{name} oferece empate", + "chess_statusUnknownPosition": "O tabuleiro aparecerá com o próximo lance.", + "chess_statusUnverified": "Jogadores ainda não confirmados. Peça uma atualização para verificá-los.", + "chess_actionResign": "Desistir", + "chess_actionOfferDraw": "Oferecer empate", + "chess_actionAcceptDraw": "Aceitar empate", + "chess_actionClaimTimeout": "Reivindicar vitória por tempo", + "chess_actionNudge": "Pedir atualização", + "chess_actionNudgeTooltip": "Pedir aos jogadores que reenviem o último lance", + "chess_resignConfirmTitle": "Desistir deste jogo?", + "chess_resignConfirmBody": "Seu oponente vence.", + "chess_movesTitle": "Lances", + "chess_noMovesYet": "Nenhum lance ainda", + "chess_movesMissed": "(perdido)", + "chess_promoteTitle": "Promover a", + "chess_pieceQueen": "Dama", + "chess_pieceRook": "Torre", + "chess_pieceBishop": "Bispo", + "chess_pieceKnight": "Cavalo", + "chess_resultDraw": "Empate", + "chess_resultWon": "{name} venceu", + "chess_resultWithReason": "{result} · {reason}", + "chess_endCheckmate": "Xeque-mate", + "chess_endResignation": "Desistência", + "chess_endTimeout": "Por tempo", + "chess_endDrawAgreed": "Empate por acordo", + "chess_endStalemate": "Afogamento", + "chess_endInsufficient": "Material insuficiente para o mate", + "chess_endFiftyMoves": "Regra dos 50 lances", + "chess_endRepetition": "Repetição", + "chess_endCancelled": "Convite cancelado", + "chess_endDeclined": "Desafio recusado", + "chess_endExpired": "Convite expirado", + "chess_endTaken": "Outra pessoa aceitou primeiro", + "chess_timeMinutes": "{minutes} min", + "chess_timeHours": "{hours} h {minutes} min", + "chess_timeDays": "{days} d {hours} h", + "chess_notificationSender": "Xadrez", + "chess_notifyChallenge": "{name} desafiou você para um jogo", + "chess_notifyAccepted": "{name} aceitou seu jogo", + "chess_notifyAcceptedYourMove": "{name} aceitou seu jogo. Você joga com as brancas, é a sua vez.", + "chess_notifyDeclined": "{name} recusou seu desafio", + "chess_notifyTaken": "Outra pessoa aceitou esse jogo primeiro", + "chess_notifyGameStartedYourMove": "Seu jogo começou. Você joga com as brancas, é a sua vez.", + "chess_notifyYourMove": "{name} jogou {move}. Sua vez.", + "chess_notifyGameOver": "Seu jogo com {name} terminou", + "chess_notifyResigned": "{name} desistiu. Você venceu.", + "chess_notifyDrawOffered": "{name} oferece empate", + "chess_notifyDrawAccepted": "{name} aceitou o empate", + "chess_notifyTimeout": "{name} reivindicou vitória por tempo" } diff --git a/lib/l10n/app_pt_PT.arb b/lib/l10n/app_pt_PT.arb index 87d7ef76..846d550a 100644 --- a/lib/l10n/app_pt_PT.arb +++ b/lib/l10n/app_pt_PT.arb @@ -2081,5 +2081,110 @@ "modelDownload_verifying": "A verificar a transferência", "modelDownload_useModel": "Utilizar este modelo", "modelDownload_removeFailed": "Não foi possível remover o modelo: {error}", - "modelDownload_progress": "{current} / {total} MB ({percent}%)" + "modelDownload_progress": "{current} / {total} MB ({percent}%)", + "chess_menuGames": "Jogos de xadrez", + "chess_menuGamesCount": "Jogos de xadrez ({count})", + "chess_sheetTitle": "Xadrez", + "chess_sectionNewGame": "Novo jogo", + "chess_sectionYourGames": "Os seus jogos", + "chess_sectionInvites": "Convites abertos", + "chess_sectionLive": "Jogos a decorrer", + "chess_sectionFinished": "Terminados", + "chess_newChallenge": "Desafiar alguém", + "chess_newChallengeSubtitle": "Escolha alguém ouvido recentemente neste canal", + "chess_newOpenInvite": "Publicar um convite aberto", + "chess_newOpenInviteSubtitle": "Qualquer pessoa neste canal pode aceitar", + "chess_emptyTitle": "Ainda sem jogos", + "chess_emptySubtitle": "Desafie alguém ou publique um convite aberto. Qualquer pessoa no canal pode assistir.", + "chess_vs": "{white} vs {black}", + "chess_unknownPlayer": "Desconhecido", + "chess_rowYourOpenInvite": "O seu convite aberto", + "chess_rowYourChallenge": "Desafiou {name}", + "chess_rowInviteFrom": "Jogo com {name}", + "chess_rowStarting": "A aguardar o início do jogo", + "chess_rowMoveTurn": "Lance {number} · {turn}", + "chess_rowOpenInvite": "{name} procura um jogo", + "chess_rowChallengedYou": "{name} desafiou-o", + "chess_rowInviteDetails": "Tempo por lance: {deadline}", + "chess_accept": "Aceitar", + "chess_decline": "Recusar", + "chess_remove": "Remover", + "chess_cancelInvite": "Cancelar convite", + "chess_cancelInviteTitle": "Cancelar este convite?", + "chess_sendFailed": "Não foi possível enviar. Verifique a ligação ao rádio.", + "chess_challengeSent": "Desafio enviado a {name}", + "chess_inviteSent": "Convite aberto publicado", + "chess_pickOpponent": "Quem desafiar", + "chess_noRecentSenders": "Ninguém publicou neste canal recentemente.", + "chess_deadlineLabel": "Tempo por lance", + "chess_deadlineNone": "Sem limite", + "chess_deadline15m": "15 minutos", + "chess_deadline1h": "1 hora", + "chess_deadline6h": "6 horas", + "chess_deadline1d": "1 dia", + "chess_deadline3d": "3 dias", + "chess_colourLabel": "A sua cor", + "chess_colourRandom": "Aleatória", + "chess_colourWhite": "Brancas", + "chess_colourBlack": "Pretas", + "chess_sendChallenge": "Enviar desafio", + "chess_postInvite": "Publicar convite", + "chess_gameGone": "Este jogo já não está disponível.", + "chess_playerYou": "{name} (você)", + "chess_toMoveChip": "Por jogar", + "chess_statusYourMove": "É a sua vez", + "chess_statusWaiting": "A aguardar {name}", + "chess_statusToMove": "Vez de {name}", + "chess_statusTimeLeft": "Restam {time} para este lance", + "chess_statusOverdue": "O tempo para este lance esgotou-se", + "chess_statusDrawOffered": "{name} oferece empate", + "chess_statusUnknownPosition": "O tabuleiro aparece com o próximo lance.", + "chess_statusUnverified": "Jogadores ainda não confirmados. Peça uma atualização para os verificar.", + "chess_actionResign": "Desistir", + "chess_actionOfferDraw": "Oferecer empate", + "chess_actionAcceptDraw": "Aceitar empate", + "chess_actionClaimTimeout": "Reclamar vitória por tempo", + "chess_actionNudge": "Pedir atualização", + "chess_actionNudgeTooltip": "Pedir aos jogadores que reenviem o último lance", + "chess_resignConfirmTitle": "Desistir deste jogo?", + "chess_resignConfirmBody": "O seu adversário vence.", + "chess_movesTitle": "Lances", + "chess_noMovesYet": "Ainda sem lances", + "chess_movesMissed": "(perdido)", + "chess_promoteTitle": "Promover a", + "chess_pieceQueen": "Dama", + "chess_pieceRook": "Torre", + "chess_pieceBishop": "Bispo", + "chess_pieceKnight": "Cavalo", + "chess_resultDraw": "Empate", + "chess_resultWon": "{name} venceu", + "chess_resultWithReason": "{result} · {reason}", + "chess_endCheckmate": "Xeque-mate", + "chess_endResignation": "Desistência", + "chess_endTimeout": "Por tempo", + "chess_endDrawAgreed": "Empate por acordo", + "chess_endStalemate": "Rei afogado", + "chess_endInsufficient": "Material insuficiente para dar mate", + "chess_endFiftyMoves": "Regra dos 50 lances", + "chess_endRepetition": "Repetição", + "chess_endCancelled": "Convite cancelado", + "chess_endDeclined": "Desafio recusado", + "chess_endExpired": "Convite expirado", + "chess_endTaken": "Outra pessoa aceitou primeiro", + "chess_timeMinutes": "{minutes} min", + "chess_timeHours": "{hours} h {minutes} min", + "chess_timeDays": "{days} d {hours} h", + "chess_notificationSender": "Xadrez", + "chess_notifyChallenge": "{name} desafiou-o para um jogo", + "chess_notifyAccepted": "{name} aceitou o seu jogo", + "chess_notifyAcceptedYourMove": "{name} aceitou o seu jogo. Joga com as brancas, é a sua vez.", + "chess_notifyDeclined": "{name} recusou o seu desafio", + "chess_notifyTaken": "Outra pessoa aceitou esse jogo primeiro", + "chess_notifyGameStartedYourMove": "O seu jogo começou. Joga com as brancas, é a sua vez.", + "chess_notifyYourMove": "{name} jogou {move}. É a sua vez.", + "chess_notifyGameOver": "O seu jogo com {name} terminou", + "chess_notifyResigned": "{name} desistiu. Venceu.", + "chess_notifyDrawOffered": "{name} oferece empate", + "chess_notifyDrawAccepted": "{name} aceitou o empate", + "chess_notifyTimeout": "{name} reclamou vitória por tempo" } diff --git a/lib/l10n/app_ru.arb b/lib/l10n/app_ru.arb index 854dc5bf..c37cd351 100644 --- a/lib/l10n/app_ru.arb +++ b/lib/l10n/app_ru.arb @@ -3099,5 +3099,110 @@ "modelDownload_verifying": "Проверка загрузки", "modelDownload_useModel": "Использовать эту модель", "modelDownload_removeFailed": "Не удалось удалить модель: {error}", - "modelDownload_progress": "{current} / {total} MB ({percent}%)" + "modelDownload_progress": "{current} / {total} MB ({percent}%)", + "chess_menuGames": "Шахматные партии", + "chess_menuGamesCount": "Шахматные партии ({count})", + "chess_sheetTitle": "Шахматы", + "chess_sectionNewGame": "Новая партия", + "chess_sectionYourGames": "Ваши партии", + "chess_sectionInvites": "Открытые приглашения", + "chess_sectionLive": "Идут сейчас", + "chess_sectionFinished": "Завершённые", + "chess_newChallenge": "Бросить вызов", + "chess_newChallengeSubtitle": "Выберите того, кого недавно слышно в этом канале", + "chess_newOpenInvite": "Опубликовать открытое приглашение", + "chess_newOpenInviteSubtitle": "Принять вызов может любой в этом канале", + "chess_emptyTitle": "Партий пока нет", + "chess_emptySubtitle": "Бросьте кому-нибудь вызов или опубликуйте открытое приглашение. Наблюдать может любой в канале.", + "chess_vs": "{white} против {black}", + "chess_unknownPlayer": "Неизвестный", + "chess_rowYourOpenInvite": "Ваше открытое приглашение", + "chess_rowYourChallenge": "Вы бросили вызов: {name}", + "chess_rowInviteFrom": "Партия с {name}", + "chess_rowStarting": "Ожидание начала партии", + "chess_rowMoveTurn": "Ход {number} · {turn}", + "chess_rowOpenInvite": "{name} ищет партнёра для игры", + "chess_rowChallengedYou": "{name} бросает вам вызов", + "chess_rowInviteDetails": "Время на ход: {deadline}", + "chess_accept": "Принять", + "chess_decline": "Отклонить", + "chess_remove": "Удалить", + "chess_cancelInvite": "Отменить приглашение", + "chess_cancelInviteTitle": "Отменить это приглашение?", + "chess_sendFailed": "Не удалось отправить. Проверьте подключение к радио.", + "chess_challengeSent": "Вызов отправлен: {name}", + "chess_inviteSent": "Открытое приглашение опубликовано", + "chess_pickOpponent": "Недавно в этом канале никто не писал.", + "chess_noRecentSenders": "Кому бросить вызов", + "chess_deadlineLabel": "Время на ход", + "chess_deadlineNone": "Без ограничения", + "chess_deadline15m": "15 минут", + "chess_deadline1h": "1 час", + "chess_deadline6h": "6 часов", + "chess_deadline1d": "1 день", + "chess_deadline3d": "3 дня", + "chess_colourLabel": "Ваш цвет", + "chess_colourRandom": "Случайно", + "chess_colourWhite": "Белые", + "chess_colourBlack": "Чёрные", + "chess_sendChallenge": "Отправить вызов", + "chess_postInvite": "Опубликовать", + "chess_gameGone": "Эта партия больше недоступна.", + "chess_playerYou": "{name} (вы)", + "chess_toMoveChip": "Ход", + "chess_statusYourMove": "Ваш ход", + "chess_statusWaiting": "Ожидание: {name}", + "chess_statusToMove": "Ход: {name}", + "chess_statusTimeLeft": "Осталось на этот ход: {time}", + "chess_statusOverdue": "Время на этот ход истекло", + "chess_statusDrawOffered": "{name} предлагает ничью", + "chess_statusUnknownPosition": "Доска появится после следующего хода.", + "chess_statusUnverified": "Участники ещё не подтверждены. Запросите обновление, чтобы проверить их.", + "chess_actionResign": "Сдаться", + "chess_actionOfferDraw": "Предложить ничью", + "chess_actionAcceptDraw": "Принять ничью", + "chess_actionClaimTimeout": "Требовать победу по времени", + "chess_actionNudge": "Запросить обновление", + "chess_actionNudgeTooltip": "Попросить игроков повторно отправить последний ход", + "chess_resignConfirmTitle": "Сдаться в этой партии?", + "chess_resignConfirmBody": "Победит ваш соперник.", + "chess_movesTitle": "Ходы", + "chess_noMovesYet": "Ходов пока нет", + "chess_movesMissed": "(пропущен)", + "chess_promoteTitle": "Превращение в", + "chess_pieceQueen": "Ферзь", + "chess_pieceRook": "Ладья", + "chess_pieceBishop": "Слон", + "chess_pieceKnight": "Конь", + "chess_resultDraw": "Ничья", + "chess_resultWon": "Победа: {name}", + "chess_resultWithReason": "{result} · {reason}", + "chess_endCheckmate": "Мат", + "chess_endResignation": "Сдача", + "chess_endTimeout": "По времени", + "chess_endDrawAgreed": "Ничья по соглашению", + "chess_endStalemate": "Пат", + "chess_endInsufficient": "Недостаточно материала для мата", + "chess_endFiftyMoves": "Правило 50 ходов", + "chess_endRepetition": "Повторение позиции", + "chess_endCancelled": "Приглашение отменено", + "chess_endDeclined": "Вызов отклонён", + "chess_endExpired": "Приглашение истекло", + "chess_endTaken": "Другой игрок принял раньше", + "chess_timeMinutes": "{minutes} мин", + "chess_timeHours": "{hours} ч {minutes} мин", + "chess_timeDays": "{days} д {hours} ч", + "chess_notificationSender": "Шахматы", + "chess_notifyChallenge": "{name} бросает вам вызов", + "chess_notifyAccepted": "Ваша партия принята: {name}", + "chess_notifyAcceptedYourMove": "Ваша партия принята: {name}. Вы играете белыми, ваш ход.", + "chess_notifyDeclined": "{name} отклоняет ваш вызов", + "chess_notifyTaken": "Другой игрок принял эту партию раньше", + "chess_notifyGameStartedYourMove": "Ваша партия началась. Вы играете белыми, ваш ход.", + "chess_notifyYourMove": "{name}: {move}. Ваш ход.", + "chess_notifyGameOver": "Ваша партия с {name} завершена", + "chess_notifyResigned": "{name} сдался. Вы победили.", + "chess_notifyDrawOffered": "{name} предлагает ничью", + "chess_notifyDrawAccepted": "{name} принимает ничью", + "chess_notifyTimeout": "{name} требует победу по времени" } diff --git a/lib/l10n/app_sk.arb b/lib/l10n/app_sk.arb index 9a826105..7697d940 100644 --- a/lib/l10n/app_sk.arb +++ b/lib/l10n/app_sk.arb @@ -3892,5 +3892,110 @@ "chatCompression_profile": "Profil Cyr2Lat", "chatCompression_noStorageId": "Kompresiu nemožno zmeniť, kým sa tento kanál nesynchronizuje z rádia.", "chatCompression_saveFailed": "Nastavenie kompresie sa nepodarilo uložiť. Zobrazuje sa naposledy uložené nastavenie.", - "messageMeta_smazCompressed": "Komprimované metódou SMAZ" + "messageMeta_smazCompressed": "Komprimované metódou SMAZ", + "chess_menuGames": "Šachové hry", + "chess_menuGamesCount": "Šachové hry ({count})", + "chess_sheetTitle": "Šach", + "chess_sectionNewGame": "Nová hra", + "chess_sectionYourGames": "Vaše hry", + "chess_sectionInvites": "Otvorené výzvy", + "chess_sectionLive": "Prebiehajúce hry", + "chess_sectionFinished": "Dohraté", + "chess_newChallenge": "Vyzvať niekoho", + "chess_newChallengeSubtitle": "Vyberte niekoho, koho ste nedávno počuli na tomto kanáli", + "chess_newOpenInvite": "Zverejniť otvorenú výzvu", + "chess_newOpenInviteSubtitle": "Prijať ju môže ktokoľvek na tomto kanáli", + "chess_emptyTitle": "Zatiaľ žiadne hry", + "chess_emptySubtitle": "Vyzvite niekoho alebo zverejnite otvorenú výzvu. Ktokoľvek na kanáli sa môže pozerať.", + "chess_vs": "{white} vs {black}", + "chess_unknownPlayer": "Neznámy", + "chess_rowYourOpenInvite": "Vaša otvorená výzva", + "chess_rowYourChallenge": "Vyzvali ste hráča {name}", + "chess_rowInviteFrom": "Hra s hráčom {name}", + "chess_rowStarting": "Čaká sa na začiatok hry", + "chess_rowMoveTurn": "Ťah {number} · {turn}", + "chess_rowOpenInvite": "{name} hľadá súpera", + "chess_rowChallengedYou": "{name} vás vyzýva", + "chess_rowInviteDetails": "Čas na ťah: {deadline}", + "chess_accept": "Prijať", + "chess_decline": "Odmietnuť", + "chess_remove": "Odstrániť", + "chess_cancelInvite": "Zrušiť výzvu", + "chess_cancelInviteTitle": "Zrušiť túto výzvu?", + "chess_sendFailed": "Odoslanie zlyhalo. Skontrolujte spojenie s rádiom.", + "chess_challengeSent": "Výzva odoslaná hráčovi {name}", + "chess_inviteSent": "Otvorená výzva zverejnená", + "chess_pickOpponent": "Koho vyzvať", + "chess_noRecentSenders": "Na tomto kanáli nedávno nikto nepísal.", + "chess_deadlineLabel": "Čas na ťah", + "chess_deadlineNone": "Bez limitu", + "chess_deadline15m": "15 minút", + "chess_deadline1h": "1 hodina", + "chess_deadline6h": "6 hodín", + "chess_deadline1d": "1 deň", + "chess_deadline3d": "3 dni", + "chess_colourLabel": "Vaša farba", + "chess_colourRandom": "Náhodná", + "chess_colourWhite": "Biela", + "chess_colourBlack": "Čierna", + "chess_sendChallenge": "Odoslať výzvu", + "chess_postInvite": "Zverejniť výzvu", + "chess_gameGone": "Táto hra už nie je k dispozícii.", + "chess_playerYou": "{name} (vy)", + "chess_toMoveChip": "Na ťahu", + "chess_statusYourMove": "Váš ťah", + "chess_statusWaiting": "Čaká sa na hráča {name}", + "chess_statusToMove": "Na ťahu: {name}", + "chess_statusTimeLeft": "Na tento ťah zostáva {time}", + "chess_statusOverdue": "Čas na tento ťah vypršal", + "chess_statusDrawOffered": "{name} ponúka remízu", + "chess_statusUnknownPosition": "Šachovnica sa zobrazí s ďalším ťahom.", + "chess_statusUnverified": "Hráči zatiaľ nie sú potvrdení. Vyžiadajte si aktualizáciu a overte ich.", + "chess_actionResign": "Vzdať sa", + "chess_actionOfferDraw": "Ponúknuť remízu", + "chess_actionAcceptDraw": "Prijať remízu", + "chess_actionClaimTimeout": "Uplatniť výhru na čas", + "chess_actionNudge": "Vyžiadať aktualizáciu", + "chess_actionNudgeTooltip": "Požiadať hráčov o opätovné odoslanie posledného ťahu", + "chess_resignConfirmTitle": "Vzdať sa tejto hry?", + "chess_resignConfirmBody": "Súper vyhráva.", + "chess_movesTitle": "Ťahy", + "chess_noMovesYet": "Zatiaľ žiadne ťahy", + "chess_movesMissed": "(zmeškané)", + "chess_promoteTitle": "Premeniť na", + "chess_pieceQueen": "Dáma", + "chess_pieceRook": "Veža", + "chess_pieceBishop": "Strelec", + "chess_pieceKnight": "Jazdec", + "chess_resultDraw": "Remíza", + "chess_resultWon": "Víťazí {name}", + "chess_resultWithReason": "{result} · {reason}", + "chess_endCheckmate": "Mat", + "chess_endResignation": "Vzdanie sa", + "chess_endTimeout": "Na čas", + "chess_endDrawAgreed": "Remíza dohodou", + "chess_endStalemate": "Pat", + "chess_endInsufficient": "Nedostatok materiálu na mat", + "chess_endFiftyMoves": "Pravidlo 50 ťahov", + "chess_endRepetition": "Opakovanie pozície", + "chess_endCancelled": "Výzva zrušená", + "chess_endDeclined": "Výzva odmietnutá", + "chess_endExpired": "Výzva vypršala", + "chess_endTaken": "Prijal ju niekto iný", + "chess_timeMinutes": "{minutes} min", + "chess_timeHours": "{hours} h {minutes} min", + "chess_timeDays": "{days} d {hours} h", + "chess_notificationSender": "Šach", + "chess_notifyChallenge": "{name} vás vyzýva na hru", + "chess_notifyAccepted": "Hráč {name} prijal vašu hru", + "chess_notifyAcceptedYourMove": "Hráč {name} prijal vašu hru. Hráte bielymi, ste na ťahu.", + "chess_notifyDeclined": "Hráč {name} odmietol vašu výzvu", + "chess_notifyTaken": "Túto hru prijal skôr niekto iný", + "chess_notifyGameStartedYourMove": "Vaša hra sa začala. Hráte bielymi, ste na ťahu.", + "chess_notifyYourMove": "Hráč {name} potiahol {move}. Ste na ťahu.", + "chess_notifyGameOver": "Vaša hra s hráčom {name} skončila", + "chess_notifyResigned": "Hráč {name} sa vzdal. Vyhrávate.", + "chess_notifyDrawOffered": "{name} ponúka remízu", + "chess_notifyDrawAccepted": "Hráč {name} prijal remízu", + "chess_notifyTimeout": "Hráč {name} uplatnil výhru na čas" } diff --git a/lib/l10n/app_sl.arb b/lib/l10n/app_sl.arb index 6d7c76be..cdd27f71 100644 --- a/lib/l10n/app_sl.arb +++ b/lib/l10n/app_sl.arb @@ -4009,5 +4009,110 @@ "modelDownload_verifying": "Preverjanje prenosa", "modelDownload_useModel": "Uporabi ta model", "modelDownload_removeFailed": "Modela ni bilo mogoče odstraniti: {error}", - "modelDownload_progress": "{current} / {total} MB ({percent}%)" + "modelDownload_progress": "{current} / {total} MB ({percent}%)", + "chess_menuGames": "Šahovske igre", + "chess_menuGamesCount": "Šahovske igre ({count})", + "chess_sheetTitle": "Šah", + "chess_sectionNewGame": "Nova igra", + "chess_sectionYourGames": "Vaše igre", + "chess_sectionInvites": "Odprta povabila", + "chess_sectionLive": "Igre v teku", + "chess_sectionFinished": "Končane", + "chess_newChallenge": "Izzovi nekoga", + "chess_newChallengeSubtitle": "Izberite nekoga, ki se je nedavno oglasil na tem kanalu", + "chess_newOpenInvite": "Objavi odprto povabilo", + "chess_newOpenInviteSubtitle": "Sprejme ga lahko kdorkoli na tem kanalu", + "chess_emptyTitle": "Še ni iger", + "chess_emptySubtitle": "Izzovite nekoga ali objavite odprto povabilo. Na kanalu lahko igro spremlja kdorkoli.", + "chess_vs": "{white} proti {black}", + "chess_unknownPlayer": "Neznan", + "chess_rowYourOpenInvite": "Vaše odprto povabilo", + "chess_rowYourChallenge": "Izzvali ste igralca {name}", + "chess_rowInviteFrom": "Igra z igralcem {name}", + "chess_rowStarting": "Čakanje na začetek igre", + "chess_rowMoveTurn": "Poteza {number} · {turn}", + "chess_rowOpenInvite": "{name} išče nasprotnika", + "chess_rowChallengedYou": "{name} vas izziva", + "chess_rowInviteDetails": "Čas za potezo: {deadline}", + "chess_accept": "Sprejmi", + "chess_decline": "Zavrni", + "chess_remove": "Odstrani", + "chess_cancelInvite": "Prekliči povabilo", + "chess_cancelInviteTitle": "Preklicati to povabilo?", + "chess_sendFailed": "Pošiljanje ni uspelo. Preverite povezavo z radiem.", + "chess_challengeSent": "Izziv poslan igralcu {name}", + "chess_inviteSent": "Odprto povabilo objavljeno", + "chess_pickOpponent": "Koga izzvati", + "chess_noRecentSenders": "Na tem kanalu nedavno ni nihče objavil.", + "chess_deadlineLabel": "Čas za potezo", + "chess_deadlineNone": "Brez omejitve", + "chess_deadline15m": "15 minut", + "chess_deadline1h": "1 ura", + "chess_deadline6h": "6 ur", + "chess_deadline1d": "1 dan", + "chess_deadline3d": "3 dni", + "chess_colourLabel": "Vaša barva", + "chess_colourRandom": "Naključna", + "chess_colourWhite": "Bela", + "chess_colourBlack": "Črna", + "chess_sendChallenge": "Pošlji izziv", + "chess_postInvite": "Objavi povabilo", + "chess_gameGone": "Ta igra ni več na voljo.", + "chess_playerYou": "{name} (vi)", + "chess_toMoveChip": "Na potezi", + "chess_statusYourMove": "Vaša poteza", + "chess_statusWaiting": "Čakanje na igralca {name}", + "chess_statusToMove": "Na potezi: {name}", + "chess_statusTimeLeft": "Za to potezo je ostalo {time}", + "chess_statusOverdue": "Čas za to potezo je potekel", + "chess_statusDrawOffered": "{name} ponuja remi", + "chess_statusUnknownPosition": "Šahovnica se prikaže ob naslednji potezi.", + "chess_statusUnverified": "Igralci še niso potrjeni. Zahtevajte posodobitev, da jih preverite.", + "chess_actionResign": "Vdaj se", + "chess_actionOfferDraw": "Ponudi remi", + "chess_actionAcceptDraw": "Sprejmi remi", + "chess_actionClaimTimeout": "Zahtevaj zmago na čas", + "chess_actionNudge": "Zahtevaj posodobitev", + "chess_actionNudgeTooltip": "Prosi igralca, naj ponovno pošljeta zadnjo potezo", + "chess_resignConfirmTitle": "Se vdati v tej igri?", + "chess_resignConfirmBody": "Nasprotnik zmaga.", + "chess_movesTitle": "Poteze", + "chess_noMovesYet": "Še ni potez", + "chess_movesMissed": "(zamujeno)", + "chess_promoteTitle": "Promocija v", + "chess_pieceQueen": "Dama", + "chess_pieceRook": "Trdnjava", + "chess_pieceBishop": "Tekač", + "chess_pieceKnight": "Konj", + "chess_resultDraw": "Remi", + "chess_resultWon": "Zmagal je {name}", + "chess_resultWithReason": "{result} · {reason}", + "chess_endCheckmate": "Mat", + "chess_endResignation": "Vdaja", + "chess_endTimeout": "Na čas", + "chess_endDrawAgreed": "Dogovorjen remi", + "chess_endStalemate": "Pat", + "chess_endInsufficient": "Premalo figur za mat", + "chess_endFiftyMoves": "Pravilo 50 potez", + "chess_endRepetition": "Ponovitev", + "chess_endCancelled": "Povabilo preklicano", + "chess_endDeclined": "Izziv zavrnjen", + "chess_endExpired": "Povabilo je poteklo", + "chess_endTaken": "Prej je sprejel nekdo drug", + "chess_timeMinutes": "{minutes} min", + "chess_timeHours": "{hours} h {minutes} min", + "chess_timeDays": "{days} d {hours} h", + "chess_notificationSender": "Šah", + "chess_notifyChallenge": "{name} vas izziva v igro", + "chess_notifyAccepted": "Igralec {name} je sprejel vašo igro", + "chess_notifyAcceptedYourMove": "Igralec {name} je sprejel vašo igro. Igrate z belimi, ste na potezi.", + "chess_notifyDeclined": "Igralec {name} je zavrnil vaš izziv", + "chess_notifyTaken": "To igro je prej sprejel nekdo drug", + "chess_notifyGameStartedYourMove": "Vaša igra se je začela. Igrate z belimi, ste na potezi.", + "chess_notifyYourMove": "Igralec {name} je odigral {move}. Ste na potezi.", + "chess_notifyGameOver": "Vaša igra z igralcem {name} se je končala", + "chess_notifyResigned": "Igralec {name} se je vdal. Zmagali ste.", + "chess_notifyDrawOffered": "{name} ponuja remi", + "chess_notifyDrawAccepted": "Igralec {name} je sprejel remi", + "chess_notifyTimeout": "Igralec {name} je zahteval zmago na čas" } diff --git a/lib/l10n/app_sv.arb b/lib/l10n/app_sv.arb index 2cf40d59..1701c8c9 100644 --- a/lib/l10n/app_sv.arb +++ b/lib/l10n/app_sv.arb @@ -3849,5 +3849,110 @@ "modelDownload_verifying": "Verifierar nedladdningen", "modelDownload_useModel": "Använd den här modellen", "modelDownload_removeFailed": "Det gick inte att ta bort modellen: {error}", - "modelDownload_progress": "{current} / {total} MB ({percent}%)" + "modelDownload_progress": "{current} / {total} MB ({percent}%)", + "chess_menuGames": "Schackpartier", + "chess_menuGamesCount": "Schackpartier ({count})", + "chess_sheetTitle": "Schack", + "chess_sectionNewGame": "Nytt parti", + "chess_sectionYourGames": "Dina partier", + "chess_sectionInvites": "Öppna inbjudningar", + "chess_sectionLive": "Pågående partier", + "chess_sectionFinished": "Avslutade", + "chess_newChallenge": "Utmana någon", + "chess_newChallengeSubtitle": "Välj någon som nyligen hörts på den här kanalen", + "chess_newOpenInvite": "Skicka en öppen inbjudan", + "chess_newOpenInviteSubtitle": "Vem som helst på den här kanalen kan acceptera", + "chess_emptyTitle": "Inga partier ännu", + "chess_emptySubtitle": "Utmana någon eller skicka en öppen inbjudan. Alla på kanalen kan titta på.", + "chess_vs": "{white} mot {black}", + "chess_unknownPlayer": "Okänd", + "chess_rowYourOpenInvite": "Din öppna inbjudan", + "chess_rowYourChallenge": "Du utmanade {name}", + "chess_rowInviteFrom": "Parti med {name}", + "chess_rowStarting": "Väntar på att partiet ska starta", + "chess_rowMoveTurn": "Drag {number} · {turn}", + "chess_rowOpenInvite": "{name} söker ett parti", + "chess_rowChallengedYou": "{name} utmanade dig", + "chess_rowInviteDetails": "Tid per drag: {deadline}", + "chess_accept": "Acceptera", + "chess_decline": "Avböj", + "chess_remove": "Ta bort", + "chess_cancelInvite": "Dra tillbaka inbjudan", + "chess_cancelInviteTitle": "Dra tillbaka den här inbjudan?", + "chess_sendFailed": "Det gick inte att skicka. Kontrollera radioanslutningen.", + "chess_challengeSent": "Utmaning skickad till {name}", + "chess_inviteSent": "Öppen inbjudan skickad", + "chess_pickOpponent": "Vem vill du utmana?", + "chess_noRecentSenders": "Ingen har skrivit på den här kanalen nyligen.", + "chess_deadlineLabel": "Tid per drag", + "chess_deadlineNone": "Ingen gräns", + "chess_deadline15m": "15 minuter", + "chess_deadline1h": "1 timme", + "chess_deadline6h": "6 timmar", + "chess_deadline1d": "1 dag", + "chess_deadline3d": "3 dagar", + "chess_colourLabel": "Din färg", + "chess_colourRandom": "Slumpmässig", + "chess_colourWhite": "Vit", + "chess_colourBlack": "Svart", + "chess_sendChallenge": "Skicka utmaning", + "chess_postInvite": "Skicka inbjudan", + "chess_gameGone": "Det här partiet finns inte längre.", + "chess_playerYou": "{name} (du)", + "chess_toMoveChip": "Vid draget", + "chess_statusYourMove": "Din tur", + "chess_statusWaiting": "Väntar på {name}", + "chess_statusToMove": "{name} är vid draget", + "chess_statusTimeLeft": "{time} kvar för det här draget", + "chess_statusOverdue": "Tiden för det här draget har gått ut", + "chess_statusDrawOffered": "{name} erbjuder remi", + "chess_statusUnknownPosition": "Brädet visas vid nästa drag.", + "chess_statusUnverified": "Spelarna är inte bekräftade ännu. Be om en uppdatering för att kontrollera dem.", + "chess_actionResign": "Ge upp", + "chess_actionOfferDraw": "Erbjud remi", + "chess_actionAcceptDraw": "Acceptera remi", + "chess_actionClaimTimeout": "Kräv vinst på tid", + "chess_actionNudge": "Be om uppdatering", + "chess_actionNudgeTooltip": "Be spelarna skicka det senaste draget igen", + "chess_resignConfirmTitle": "Ge upp partiet?", + "chess_resignConfirmBody": "Din motståndare vinner.", + "chess_movesTitle": "Drag", + "chess_noMovesYet": "Inga drag ännu", + "chess_movesMissed": "(missat)", + "chess_promoteTitle": "Förvandla till", + "chess_pieceQueen": "Dam", + "chess_pieceRook": "Torn", + "chess_pieceBishop": "Löpare", + "chess_pieceKnight": "Springare", + "chess_resultDraw": "Remi", + "chess_resultWon": "{name} vann", + "chess_resultWithReason": "{result} · {reason}", + "chess_endCheckmate": "Schackmatt", + "chess_endResignation": "Uppgivning", + "chess_endTimeout": "På tid", + "chess_endDrawAgreed": "Remi överenskommen", + "chess_endStalemate": "Patt", + "chess_endInsufficient": "För få pjäser för matt", + "chess_endFiftyMoves": "50-dragsregeln", + "chess_endRepetition": "Upprepning", + "chess_endCancelled": "Inbjudan tillbakadragen", + "chess_endDeclined": "Utmaning avböjd", + "chess_endExpired": "Inbjudan har gått ut", + "chess_endTaken": "Någon annan accepterade först", + "chess_timeMinutes": "{minutes} min", + "chess_timeHours": "{hours} h {minutes} min", + "chess_timeDays": "{days} d {hours} h", + "chess_notificationSender": "Schack", + "chess_notifyChallenge": "{name} utmanade dig på ett parti", + "chess_notifyAccepted": "{name} accepterade ditt parti", + "chess_notifyAcceptedYourMove": "{name} accepterade ditt parti. Du spelar vit, och det är ditt drag.", + "chess_notifyDeclined": "{name} avböjde din utmaning", + "chess_notifyTaken": "Någon annan accepterade partiet först", + "chess_notifyGameStartedYourMove": "Ditt parti har startat. Du spelar vit, och det är ditt drag.", + "chess_notifyYourMove": "{name} spelade {move}. Din tur.", + "chess_notifyGameOver": "Ditt parti med {name} är slut", + "chess_notifyResigned": "{name} gav upp. Du vinner.", + "chess_notifyDrawOffered": "{name} erbjuder remi", + "chess_notifyDrawAccepted": "{name} accepterade remin", + "chess_notifyTimeout": "{name} krävde vinst på tid" } diff --git a/lib/l10n/app_uk.arb b/lib/l10n/app_uk.arb index 6499efbc..1cd4b6e7 100644 --- a/lib/l10n/app_uk.arb +++ b/lib/l10n/app_uk.arb @@ -3782,5 +3782,110 @@ "modelDownload_verifying": "Перевірка завантаження", "modelDownload_useModel": "Використовувати цю модель", "modelDownload_removeFailed": "Не вдалося видалити модель: {error}", - "modelDownload_progress": "{current} / {total} MB ({percent}%)" + "modelDownload_progress": "{current} / {total} MB ({percent}%)", + "chess_menuGames": "Шахові партії", + "chess_menuGamesCount": "Шахові партії ({count})", + "chess_sheetTitle": "Шахи", + "chess_sectionNewGame": "Нова партія", + "chess_sectionYourGames": "Ваші партії", + "chess_sectionInvites": "Відкриті запрошення", + "chess_sectionLive": "Тривають зараз", + "chess_sectionFinished": "Завершені", + "chess_newChallenge": "Кинути виклик", + "chess_newChallengeSubtitle": "Оберіть того, кого нещодавно чутно в цьому каналі", + "chess_newOpenInvite": "Опублікувати відкрите запрошення", + "chess_newOpenInviteSubtitle": "Прийняти виклик може будь-хто в цьому каналі", + "chess_emptyTitle": "Партій поки немає", + "chess_emptySubtitle": "Киньте комусь виклик або опублікуйте відкрите запрошення. Спостерігати може будь-хто в каналі.", + "chess_vs": "{white} проти {black}", + "chess_unknownPlayer": "Невідомий", + "chess_rowYourOpenInvite": "Ваше відкрите запрошення", + "chess_rowYourChallenge": "Ви кинули виклик: {name}", + "chess_rowInviteFrom": "Партія з {name}", + "chess_rowStarting": "Очікування початку партії", + "chess_rowMoveTurn": "Хід {number} · {turn}", + "chess_rowOpenInvite": "{name} шукає партнера для гри", + "chess_rowChallengedYou": "{name} кидає вам виклик", + "chess_rowInviteDetails": "Час на хід: {deadline}", + "chess_accept": "Прийняти", + "chess_decline": "Відхилити", + "chess_remove": "Видалити", + "chess_cancelInvite": "Скасувати запрошення", + "chess_cancelInviteTitle": "Скасувати це запрошення?", + "chess_sendFailed": "Не вдалося надіслати. Перевірте підключення до радіо.", + "chess_challengeSent": "Виклик надіслано: {name}", + "chess_inviteSent": "Відкрите запрошення опубліковано", + "chess_pickOpponent": "Недавно в цьому каналі ніхто не писав.", + "chess_noRecentSenders": "Кому кинути виклик", + "chess_deadlineLabel": "Час на хід", + "chess_deadlineNone": "Без обмеження", + "chess_deadline15m": "15 хвилин", + "chess_deadline1h": "1 година", + "chess_deadline6h": "6 годин", + "chess_deadline1d": "1 день", + "chess_deadline3d": "3 дні", + "chess_colourLabel": "Ваш колір", + "chess_colourRandom": "Випадково", + "chess_colourWhite": "Білі", + "chess_colourBlack": "Чорні", + "chess_sendChallenge": "Надіслати виклик", + "chess_postInvite": "Опублікувати", + "chess_gameGone": "Ця партія більше недоступна.", + "chess_playerYou": "{name} (ви)", + "chess_toMoveChip": "Хід", + "chess_statusYourMove": "Ваш хід", + "chess_statusWaiting": "Очікування: {name}", + "chess_statusToMove": "Хід: {name}", + "chess_statusTimeLeft": "Залишилось на цей хід: {time}", + "chess_statusOverdue": "Час на цей хід вичерпано", + "chess_statusDrawOffered": "{name} пропонує нічию", + "chess_statusUnknownPosition": "Дошка з’явиться після наступного ходу.", + "chess_statusUnverified": "Учасників ще не підтверджено. Запросіть оновлення, щоб перевірити їх.", + "chess_actionResign": "Здатися", + "chess_actionOfferDraw": "Запропонувати нічию", + "chess_actionAcceptDraw": "Прийняти нічию", + "chess_actionClaimTimeout": "Вимагати перемогу за часом", + "chess_actionNudge": "Запросити оновлення", + "chess_actionNudgeTooltip": "Попросити гравців повторно надіслати останній хід", + "chess_resignConfirmTitle": "Здатися в цій партії?", + "chess_resignConfirmBody": "Переможе ваш суперник.", + "chess_movesTitle": "Ходи", + "chess_noMovesYet": "Ходів поки немає", + "chess_movesMissed": "(пропущено)", + "chess_promoteTitle": "Перетворення на", + "chess_pieceQueen": "Ферзь", + "chess_pieceRook": "Тура", + "chess_pieceBishop": "Слон", + "chess_pieceKnight": "Кінь", + "chess_resultDraw": "Нічия", + "chess_resultWon": "Перемога: {name}", + "chess_resultWithReason": "{result} · {reason}", + "chess_endCheckmate": "Мат", + "chess_endResignation": "Здача", + "chess_endTimeout": "За часом", + "chess_endDrawAgreed": "Нічия за згодою", + "chess_endStalemate": "Пат", + "chess_endInsufficient": "Недостатньо матеріалу для мату", + "chess_endFiftyMoves": "Правило 50 ходів", + "chess_endRepetition": "Повторення позиції", + "chess_endCancelled": "Запрошення скасовано", + "chess_endDeclined": "Виклик відхилено", + "chess_endExpired": "Запрошення закінчилося", + "chess_endTaken": "Інший гравець прийняв раніше", + "chess_timeMinutes": "{minutes} хв", + "chess_timeHours": "{hours} год {minutes} хв", + "chess_timeDays": "{days} д {hours} год", + "chess_notificationSender": "Шахи", + "chess_notifyChallenge": "{name} кидає вам виклик", + "chess_notifyAccepted": "Вашу партію прийнято: {name}", + "chess_notifyAcceptedYourMove": "Вашу партію прийнято: {name}. Ви граєте білими, ваш хід.", + "chess_notifyDeclined": "{name} відхиляє ваш виклик", + "chess_notifyTaken": "Інший гравець прийняв цю партію раніше", + "chess_notifyGameStartedYourMove": "Ваша партія почалася. Ви граєте білими, ваш хід.", + "chess_notifyYourMove": "{name}: {move}. Ваш хід.", + "chess_notifyGameOver": "Ваша партія з {name} завершена", + "chess_notifyResigned": "{name} здався. Ви перемогли.", + "chess_notifyDrawOffered": "{name} пропонує нічию", + "chess_notifyDrawAccepted": "{name} приймає нічию", + "chess_notifyTimeout": "{name} вимагає перемогу за часом" } diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb index a742f1ee..bcc27662 100644 --- a/lib/l10n/app_zh.arb +++ b/lib/l10n/app_zh.arb @@ -3859,5 +3859,110 @@ "modelDownload_verifying": "正在校验下载", "modelDownload_useModel": "使用此模型", "modelDownload_removeFailed": "无法移除模型:{error}", - "modelDownload_progress": "{current} / {total} MB ({percent}%)" + "modelDownload_progress": "{current} / {total} MB ({percent}%)", + "chess_menuGames": "国际象棋对局", + "chess_menuGamesCount": "国际象棋对局 ({count})", + "chess_sheetTitle": "国际象棋", + "chess_sectionNewGame": "新对局", + "chess_sectionYourGames": "我的对局", + "chess_sectionInvites": "公开邀请", + "chess_sectionLive": "进行中的对局", + "chess_sectionFinished": "已结束", + "chess_newChallenge": "挑战某人", + "chess_newChallengeSubtitle": "从此频道最近发言的人中选择", + "chess_newOpenInvite": "发布公开邀请", + "chess_newOpenInviteSubtitle": "此频道中的任何人都可以接受", + "chess_emptyTitle": "还没有对局", + "chess_emptySubtitle": "挑战某人或发布公开邀请。频道中的任何人都可以观战。", + "chess_vs": "{white} 对 {black}", + "chess_unknownPlayer": "未知", + "chess_rowYourOpenInvite": "你的公开邀请", + "chess_rowYourChallenge": "你向 {name} 发起了挑战", + "chess_rowInviteFrom": "与 {name} 的对局", + "chess_rowStarting": "等待对局开始", + "chess_rowMoveTurn": "第 {number} 步 · {turn}", + "chess_rowOpenInvite": "{name} 正在寻找对手", + "chess_rowChallengedYou": "{name} 向你发起了挑战", + "chess_rowInviteDetails": "每步用时: {deadline}", + "chess_accept": "接受", + "chess_decline": "拒绝", + "chess_remove": "移除", + "chess_cancelInvite": "取消邀请", + "chess_cancelInviteTitle": "取消此邀请?", + "chess_sendFailed": "无法发送。请检查无线电连接。", + "chess_challengeSent": "已向 {name} 发送挑战", + "chess_inviteSent": "公开邀请已发布", + "chess_pickOpponent": "选择挑战对象", + "chess_noRecentSenders": "此频道最近没有人发言。", + "chess_deadlineLabel": "每步用时", + "chess_deadlineNone": "不限时", + "chess_deadline15m": "15 分钟", + "chess_deadline1h": "1 小时", + "chess_deadline6h": "6 小时", + "chess_deadline1d": "1 天", + "chess_deadline3d": "3 天", + "chess_colourLabel": "你的颜色", + "chess_colourRandom": "随机", + "chess_colourWhite": "白方", + "chess_colourBlack": "黑方", + "chess_sendChallenge": "发送挑战", + "chess_postInvite": "发布邀请", + "chess_gameGone": "此对局已不可用。", + "chess_playerYou": "{name} (你)", + "chess_toMoveChip": "该走棋", + "chess_statusYourMove": "轮到你了", + "chess_statusWaiting": "等待 {name}", + "chess_statusToMove": "轮到 {name}", + "chess_statusTimeLeft": "本步剩余 {time}", + "chess_statusOverdue": "本步用时已到", + "chess_statusDrawOffered": "{name} 提议和棋", + "chess_statusUnknownPosition": "下一步走棋后将显示棋盘。", + "chess_statusUnverified": "尚未确认对局双方。请求更新以进行确认。", + "chess_actionResign": "认输", + "chess_actionOfferDraw": "提议和棋", + "chess_actionAcceptDraw": "接受和棋", + "chess_actionClaimTimeout": "超时判胜", + "chess_actionNudge": "请求更新", + "chess_actionNudgeTooltip": "请对局双方重新发送最新一步", + "chess_resignConfirmTitle": "认输并结束此对局?", + "chess_resignConfirmBody": "对手将获胜。", + "chess_movesTitle": "棋谱", + "chess_noMovesYet": "还没有走棋", + "chess_movesMissed": "(缺失)", + "chess_promoteTitle": "升变为", + "chess_pieceQueen": "后", + "chess_pieceRook": "车", + "chess_pieceBishop": "象", + "chess_pieceKnight": "马", + "chess_resultDraw": "和棋", + "chess_resultWon": "{name} 获胜", + "chess_resultWithReason": "{result} · {reason}", + "chess_endCheckmate": "将死", + "chess_endResignation": "认输", + "chess_endTimeout": "超时", + "chess_endDrawAgreed": "协议和棋", + "chess_endStalemate": "逼和", + "chess_endInsufficient": "子力不足无法将死", + "chess_endFiftyMoves": "五十步规则", + "chess_endRepetition": "重复局面", + "chess_endCancelled": "邀请已取消", + "chess_endDeclined": "挑战已被拒绝", + "chess_endExpired": "邀请已过期", + "chess_endTaken": "已被其他人抢先接受", + "chess_timeMinutes": "{minutes} 分钟", + "chess_timeHours": "{hours} 小时 {minutes} 分钟", + "chess_timeDays": "{days} 天 {hours} 小时", + "chess_notificationSender": "国际象棋", + "chess_notifyChallenge": "{name} 向你发起了对局挑战", + "chess_notifyAccepted": "{name} 接受了你的对局", + "chess_notifyAcceptedYourMove": "{name} 接受了你的对局。你执白,轮到你走棋。", + "chess_notifyDeclined": "{name} 拒绝了你的挑战", + "chess_notifyTaken": "其他人已抢先接受该对局", + "chess_notifyGameStartedYourMove": "对局已开始。你执白,轮到你走棋。", + "chess_notifyYourMove": "{name} 走了 {move}。轮到你了。", + "chess_notifyGameOver": "你与 {name} 的对局已结束", + "chess_notifyResigned": "{name} 认输了。你获胜。", + "chess_notifyDrawOffered": "{name} 提议和棋", + "chess_notifyDrawAccepted": "{name} 接受了和棋", + "chess_notifyTimeout": "{name} 申请超时判胜" } diff --git a/lib/main.dart b/lib/main.dart index 8f1cef8d..eb83a4ff 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -14,6 +14,8 @@ import 'screens/channels_screen.dart'; import 'utils/platform_info.dart'; import 'connector/meshcore_connector.dart'; +import 'games/chess/chess_link.dart'; +import 'games/chess/chess_service.dart'; import 'helpers/message_url_image_helper.dart'; import 'models/image_codec_support.dart'; import 'screens/scanner_screen.dart'; @@ -206,6 +208,9 @@ void main() async { connector: connector, settings: appSettingsService, ); + final chessService = ChessService( + link: ConnectorChessLink(connector, settings: appSettingsService), + ); await connector.restoreLastRadio(); @@ -227,6 +232,7 @@ void main() async { receivedImageStore: receivedImageStore, imageReassembler: imageReassembler, networkMapUploadService: networkMapUploadService, + chessService: chessService, chatBackgroundService: chatBackgroundService, messageFilterService: messageFilterService, ), @@ -374,6 +380,7 @@ class MeshCoreApp extends StatefulWidget { final ReceivedImageStore receivedImageStore; final ImageStreamReassembler imageReassembler; final NetworkMapUploadService networkMapUploadService; + final ChessService chessService; final ChatBackgroundService chatBackgroundService; final MessageFilterService messageFilterService; @@ -395,6 +402,7 @@ class MeshCoreApp extends StatefulWidget { required this.receivedImageStore, required this.imageReassembler, required this.networkMapUploadService, + required this.chessService, required this.chatBackgroundService, required this.messageFilterService, }); @@ -506,6 +514,7 @@ class _MeshCoreAppState extends State with WidgetsBindingObserver { ChangeNotifierProvider.value(value: widget.imageCodecService), ChangeNotifierProvider.value(value: widget.receivedImageStore), ChangeNotifierProvider.value(value: widget.networkMapUploadService), + ChangeNotifierProvider.value(value: widget.chessService), ChangeNotifierProvider.value(value: widget.chatBackgroundService), ChangeNotifierProvider.value(value: widget.messageFilterService), ], diff --git a/lib/screens/channel_chat_screen.dart b/lib/screens/channel_chat_screen.dart index 82641df4..783238db 100644 --- a/lib/screens/channel_chat_screen.dart +++ b/lib/screens/channel_chat_screen.dart @@ -11,6 +11,7 @@ import 'package:image_picker/image_picker.dart'; import 'package:provider/provider.dart'; import '../connector/meshcore_connector.dart'; +import '../games/chess/ui/chess_games_sheet.dart'; import '../models/community.dart'; import '../storage/community_store.dart'; import '../utils/platform_info.dart'; @@ -594,6 +595,8 @@ class _ChannelChatScreenState extends State onSelected: (value) { final connector = context.read(); switch (value) { + case 'games': + showChessGamesSheet(context, widget.channel); case 'messageFilter': _toggleChannelFiltering(); case 'notifications': @@ -636,6 +639,13 @@ class _ChannelChatScreenState extends State .getChannelNotificationMode(muteKey); final readOnly = isRadioReadOnly(context.read()); return [ + PopupMenuItem( + value: 'games', + child: _menuRow( + Icons.sports_esports_outlined, + chessMenuLabel(context, widget.channel), + ), + ), if (_messageFilter case final filter? when filter.settings.enabled) PopupMenuItem( value: 'messageFilter', diff --git a/pubspec.yaml b/pubspec.yaml index 2f411b3f..ef7b9c42 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -93,6 +93,8 @@ dependencies: # ~56 MB for ORT instead of ~18 MB. flutter_onnxruntime: ^1.9.0 base32: ^2.2.0 + chess: ^0.8.1 + chess_vectors_flutter: ^1.1.0 hooks: user_defines: diff --git a/test/games/chess_link_test.dart b/test/games/chess_link_test.dart new file mode 100644 index 00000000..884e4db6 --- /dev/null +++ b/test/games/chess_link_test.dart @@ -0,0 +1,82 @@ +import 'dart:async'; +import 'dart:typed_data'; + +import 'package:flutter_test/flutter_test.dart'; +import 'package:meshcore_open/connector/meshcore_connector.dart'; +import 'package:meshcore_open/games/chess/chess_link.dart'; +import 'package:meshcore_open/games/chess/chess_packets.dart'; +import 'package:meshcore_open/games/game_packet.dart'; +import 'package:meshcore_open/services/image_chunk_transport.dart'; + +class _Connector extends MeshCoreConnector { + final frames = StreamController.broadcast(sync: true); + bool mapConfirmed = false; + + @override + Stream get receivedFrames => frames.stream; + + @override + bool get channelMapConfirmed => mapConfirmed; + + @override + String? channelIdForSlot(int slot) => slot == 2 ? 'chan-two' : null; + + void confirm() { + mapConfirmed = true; + notifyListeners(); + } +} + +/// A RESP_CODE_CHANNEL_DATA_RECV frame for [payload] on [slot]. +Uint8List _frame(int slot, int dataType, Uint8List payload) => + Uint8List.fromList([ + respCodeChannelDataRecv, + 8, // SNR + 0, + 0, + slot, + 0xFF, + dataType & 0xFF, + dataType >> 8, + payload.length, + ...payload, + ]); + +void main() { + final payload = ChessDeclinePacket(gameId: 5, declinerName: 'Bob').encode(); + + test('passes chess payloads through, keyed by channel id', () async { + final connector = _Connector()..mapConfirmed = true; + final link = ConnectorChessLink(connector); + final heard = []; + link.incoming.listen(heard.add); + + connector.frames.add(_frame(2, meshcoreOpenDataType, payload)); + connector.frames.add(_frame(2, 0xAE1C, payload)); // images + connector.frames.add(_frame(3, meshcoreOpenDataType, payload)); // unknown + connector.frames.add( + _frame(2, meshcoreOpenDataType, Uint8List.fromList([0x20, 0, 0, 0])), + ); // another app nibble + await Future.delayed(Duration.zero); + + expect(heard, hasLength(1)); + expect(heard.single.channelId, 'chan-two'); + expect(heard.single.payload, payload); + link.dispose(); + }); + + test('holds frames until the channel map is confirmed', () async { + final connector = _Connector(); + final link = ConnectorChessLink(connector); + final heard = []; + link.incoming.listen(heard.add); + + connector.frames.add(_frame(2, meshcoreOpenDataType, payload)); + expect(heard, isEmpty); + connector.confirm(); + // The connector batches change notifications. + await Future.delayed(const Duration(milliseconds: 300)); + expect(heard, hasLength(1)); + link.dispose(); + }); +} diff --git a/test/games/chess_protocol_test.dart b/test/games/chess_protocol_test.dart new file mode 100644 index 00000000..0e599522 --- /dev/null +++ b/test/games/chess_protocol_test.dart @@ -0,0 +1,208 @@ +import 'dart:math'; +import 'dart:typed_data'; + +import 'package:chess/chess.dart' as rules; +import 'package:flutter_test/flutter_test.dart'; +import 'package:meshcore_open/games/chess/chess_game.dart'; +import 'package:meshcore_open/games/chess/chess_packets.dart'; +import 'package:meshcore_open/games/chess/chess_position_codec.dart'; +import 'package:meshcore_open/games/game_packet.dart'; +import 'package:meshcore_open/games/hash_chain.dart'; + +Uint8List _bytes(int n, int seed) => + Uint8List.fromList(List.generate(n, (i) => (i * 31 + seed) & 0xFF)); + +/// FEN without the full-move number, which the codec does not carry. +String _withoutMoveNumber(String fen) => fen.split(' ').sublist(0, 5).join(' '); + +void main() { + group('position codec', () { + test('start position packs to 26 bytes and round-trips', () { + final packed = ChessPositionCodec.encodeFen(ChessGame.startFen); + expect(packed.length, 26); + expect( + ChessPositionCodec.decodeToFen(packed, fullMoveNumber: 1), + ChessGame.startFen, + ); + }); + + test('round-trips positions from random games', () { + final rng = Random(7); + var positions = 0; + for (var game = 0; game < 40; game++) { + final board = rules.Chess(); + for (var ply = 0; ply < 120 && !board.game_over; ply++) { + final moves = board.moves({'asObjects': true}).cast(); + board.move(moves[rng.nextInt(moves.length)]); + final fen = board.fen; + final packed = ChessPositionCodec.encodeFen(fen); + expect(packed.length, lessThanOrEqualTo(ChessPositionCodec.maxBytes)); + final decoded = ChessPositionCodec.decodeToFen( + packed, + fullMoveNumber: board.move_number, + ); + expect( + _withoutMoveNumber(decoded!), + _withoutMoveNumber(fen), + reason: fen, + ); + positions++; + } + } + expect(positions, greaterThan(1000)); + }); + + test('rejects a length that does not match the occupancy', () { + final packed = ChessPositionCodec.encodeFen(ChessGame.startFen); + expect( + ChessPositionCodec.decodeToFen( + Uint8List.fromList(packed.sublist(0, 20)), + fullMoveNumber: 1, + ), + isNull, + ); + }); + }); + + group('hash chain', () { + final chain = HashChain(_bytes(16, 3)); + + test('each value hashes to the previous one', () { + expect(hashChainStep(chain.valueAt(1)), chain.valueAt(0)); + expect(hashChainStep(chain.valueAt(10)), chain.valueAt(9)); + }); + + test('distance counts skipped values and flags duplicates', () { + expect(hashChainDistance(chain.valueAt(1), chain.commitment), 1); + expect(hashChainDistance(chain.valueAt(5), chain.valueAt(2)), 3); + expect(hashChainDistance(chain.valueAt(2), chain.valueAt(2)), 0); + }); + + test('rejects older values and other chains', () { + expect(hashChainDistance(chain.valueAt(2), chain.valueAt(5)), isNull); + final other = HashChain(_bytes(16, 9)); + expect(hashChainDistance(other.valueAt(1), chain.commitment), isNull); + }); + + test('player advances only on new values', () { + final player = ChessPlayer(name: 'A', commitment: chain.commitment); + expect(player.verifyAndAdvance(chain.valueAt(1)), isTrue); + expect(player.verifyAndAdvance(chain.valueAt(1)), isFalse); + expect(player.verifyAndAdvance(chain.valueAt(4)), isTrue); + expect(player.lastIndex, 4); + }); + }); + + group('packets', () { + final commitment = _bytes(16, 1); + final value = _bytes(16, 2); + final longName = 'N' * 40; + + test('move packet fits one 64-byte encrypted block run', () { + final packet = ChessMovePacket( + gameId: 0xBEEF, + ply: 37, + minutes: 1234, + moveIndex: 17, + chainValue: value, + position: ChessPositionCodec.encodeFen(ChessGame.startFen), + ); + final bytes = packet.encode(); + expect(bytes.length, 49); + expect(encryptedGamePayloadSize(bytes.length), 64); + final decoded = ChessPacket.decode(bytes) as ChessMovePacket; + expect(decoded.gameId, 0xBEEF); + expect(decoded.ply, 37); + expect(decoded.minutes, 1234); + expect(decoded.moveIndex, 17); + expect(decoded.chainValue, value); + expect(decoded.position, packet.position); + }); + + test('invite sizes and names are capped', () { + final open = ChessInvitePacket( + gameId: 1, + deadline: ChessDeadline.hour1, + colour: ChessColourPreference.black, + commitment: commitment, + inviterName: longName, + ).encode(); + expect(open.length, 54); + expect(encryptedGamePayloadSize(open.length), 64); + final direct = ChessInvitePacket( + gameId: 1, + deadline: ChessDeadline.days3, + colour: ChessColourPreference.random, + commitment: commitment, + inviterName: longName, + targetName: longName, + ); + final bytes = direct.encode(); + expect(bytes.length, 86); + final decoded = ChessPacket.decode(bytes) as ChessInvitePacket; + expect(decoded.inviterName, 'N' * maxGameNameBytes); + expect(decoded.targetName, 'N' * maxGameNameBytes); + expect(decoded.deadline, ChessDeadline.days3); + expect(decoded.isDirect, isTrue); + }); + + test('names are cut on a character boundary', () { + final name = '${'a' * 29}é'; // 29 + 2 bytes = 31: fits. + expect(truncateUtf8(name, 31).length, 31); + expect(truncateUtf8('${'a' * 30}é', 31).length, 30); + }); + + test('actions, info and requests round-trip', () { + final action = ChessActionPacket( + kind: ChessPacketKind.resign, + gameId: 9, + ply: 4, + minutes: 3, + chainValue: value, + ).encode(); + expect(action.length, 22); + expect(encryptedGamePayloadSize(action.length), 32); + expect( + (ChessPacket.decode(action) as ChessActionPacket).kind, + ChessPacketKind.resign, + ); + + final info = ChessInfoPacket( + gameId: 9, + ply: 4, + startedAtUnix: 1700000000, + deadline: ChessDeadline.hour1, + whiteCommitment: commitment, + blackCommitment: value, + whiteName: longName, + blackName: longName, + ).encode(); + expect(info.length, 106); + final decodedInfo = ChessPacket.decode(info) as ChessInfoPacket; + expect(decodedInfo.startedAtUnix, 1700000000); + expect(decodedInfo.blackCommitment, value); + + final request = ChessRequestPacket( + gameId: 9, + ply: 4, + wantsInfo: true, + wantsLatestMove: true, + ).encode(); + expect(request.length, 5); + final decodedRequest = ChessPacket.decode(request) as ChessRequestPacket; + expect(decodedRequest.wantsInfo, isTrue); + expect(decodedRequest.wantsLatestMove, isTrue); + }); + + test('rejects other apps and truncated packets', () { + final bytes = ChessAcceptPacket( + gameId: 2, + commitment: commitment, + accepterName: 'Bob', + ).encode(); + expect(ChessPacket.decode(bytes.sublist(0, 10)), isNull); + final otherApp = Uint8List.fromList(bytes)..[0] = 0x21; + expect(ChessPacket.decode(otherApp), isNull); + }); + }); +} diff --git a/test/games/chess_service_test.dart b/test/games/chess_service_test.dart new file mode 100644 index 00000000..94fe8c90 --- /dev/null +++ b/test/games/chess_service_test.dart @@ -0,0 +1,344 @@ +import 'dart:async'; +import 'dart:math'; +import 'dart:typed_data'; + +import 'package:flutter/widgets.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:meshcore_open/games/chess/chess_game.dart'; +import 'package:meshcore_open/games/chess/chess_link.dart'; +import 'package:meshcore_open/games/chess/chess_packets.dart'; +import 'package:meshcore_open/games/chess/chess_service.dart'; +import 'package:meshcore_open/games/chess/chess_store.dart'; +import 'package:meshcore_open/l10n/app_localizations.dart'; +import 'package:meshcore_open/storage/prefs_manager.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +const _channel = 'abcdef0123456789'; + +/// A shared channel: whatever one link sends, every other link hears. +class _Mesh { + final List<_FakeLink> links = []; + + /// Return false to drop a packet before it reaches [to]. + bool Function(_FakeLink from, _FakeLink to, Uint8List payload)? filter; + + void deliver(_FakeLink from, Uint8List payload) { + for (final to in links) { + if (identical(to, from)) continue; + if (filter != null && !filter!(from, to, payload)) continue; + to.controller.add(ChessIncoming(_channel, payload)); + } + } +} + +class _FakeLink extends ChangeNotifier implements ChessLink { + final _Mesh mesh; + @override + final String selfName; + @override + final String storageScope; + final StreamController controller = StreamController.broadcast( + sync: true, + ); + final List sent = []; + final List notifications = []; + bool connected = true; + + _FakeLink(this.mesh, this.selfName, this.storageScope) { + mesh.links.add(this); + } + + @override + Stream get incoming => controller.stream; + + @override + Future send(String channelId, Uint8List payload) async { + if (!connected) return false; + sent.add(payload); + mesh.deliver(this, payload); + return true; + } + + @override + bool get canSend => connected; + + @override + void notify(String channelId, String text) => notifications.add(text); + + @override + AppLocalizations get l10n => lookupAppLocalizations(const Locale('en')); +} + +class _Player { + final _FakeLink link; + final ChessService service; + + _Player(this.link, this.service); + + ChessGame? get game => service.gamesForChannel(_channel).firstOrNull; +} + +void main() { + late _Mesh mesh; + late DateTime now; + final created = <_Player>[]; + + setUp(() async { + SharedPreferences.setMockInitialValues({}); + PrefsManager.reset(); + await PrefsManager.initialize(); + mesh = _Mesh(); + now = DateTime(2026, 11, 21, 12); + }); + + tearDown(() { + for (final p in created) { + p.service.dispose(); + } + created.clear(); + }); + + var nextSeed = 100; + _Player player(String name, {int? seed}) { + final link = _FakeLink( + mesh, + name, + '${name.toLowerCase()}000000000'.substring(0, 10), + ); + final service = ChessService( + link: link, + store: ChessStore(), + clock: () => now, + random: Random(seed ?? nextSeed++), + answerDelayMin: Duration.zero, + answerDelayMax: Duration.zero, + startHousekeeping: false, + ); + final p = _Player(link, service); + created.add(p); + return p; + } + + /// Lets zero-delay answer timers fire. + Future settle() => Future.delayed(Duration.zero); + + Future<(_Player white, _Player black)> startGame( + _Player alice, + _Player bob, { + ChessColourPreference colour = ChessColourPreference.white, + }) async { + final invite = await alice.service.createInvite( + channelId: _channel, + colour: colour, + ); + expect(invite, isNotNull); + expect(await bob.service.accept(bob.game!), isTrue); + await settle(); // Alice's confirmation (game info). + expect(alice.game!.status, ChessGameStatus.active); + expect(bob.game!.status, ChessGameStatus.active); + final aliceWhite = alice.game!.mySide == ChessSide.white; + return aliceWhite ? (alice, bob) : (bob, alice); + } + + test( + 'open invite, accept, and Scholar\'s mate seen by a spectator', + () async { + final alice = player('Alice', seed: 1); + final bob = player('Bob', seed: 2); + final carol = player('Carol', seed: 3); + + final (white, black) = await startGame(alice, bob); + expect(white, same(alice)); + expect(carol.game!.status, ChessGameStatus.active); + expect(carol.game!.isPlayer, isFalse); + expect(carol.game!.hasPlayers, isTrue); + expect(bob.link.notifications, isEmpty); + + const moves = ['e2e4', 'e7e5', 'f1c4', 'b8c6', 'd1h5', 'g8f6', 'h5f7']; + for (var i = 0; i < moves.length; i++) { + final mover = i.isEven ? white : black; + expect( + await mover.service.makeMove(mover.game!, moves[i]), + isTrue, + reason: moves[i], + ); + } + for (final p in [alice, bob, carol]) { + final g = p.game!; + expect(g.status, ChessGameStatus.finished); + expect(g.endReason, ChessEndReason.checkmate); + expect(g.winner, ChessSide.white); + expect(g.sanMoves.last, 'Qxf7#'); + } + expect(bob.link.notifications.last, contains('Alice')); + }, + ); + + test('random colour gives both sides the same answer', () async { + final alice = player('Alice', seed: 4); + final bob = player('Bob', seed: 5); + await startGame(alice, bob, colour: ChessColourPreference.random); + expect(alice.game!.mySide, isNotNull); + expect(bob.game!.mySide, alice.game!.mySide!.other); + }); + + test('direct challenge notifies only the target, who can decline', () async { + final alice = player('Alice'); + final bob = player('Bob'); + final carol = player('Carol'); + await alice.service.createInvite(channelId: _channel, targetName: 'bob'); + expect(bob.link.notifications.single, contains('Alice')); + expect(carol.link.notifications, isEmpty); + expect(await bob.service.decline(bob.game!), isTrue); + expect(alice.game!.status, ChessGameStatus.finished); + expect(alice.game!.endReason, ChessEndReason.declined); + }); + + test('only the first confirmed accept gets the game', () async { + final alice = player('Alice'); + final bob = player('Bob'); + final carol = player('Carol'); + await alice.service.createInvite( + channelId: _channel, + colour: ChessColourPreference.white, + ); + // Carol does not hear Bob's accept, and accepts too. + mesh.filter = (from, to, _) => !(from == bob.link && to == carol.link); + await bob.service.accept(bob.game!); + mesh.filter = null; + await carol.service.accept(carol.game!); + await settle(); + expect(alice.game!.nameOf(ChessSide.black), 'Bob'); + expect(bob.game!.mySide, ChessSide.black); + expect(carol.game!.isPlayer, isFalse); + expect(carol.game!.status, ChessGameStatus.active); + }); + + test( + 'a spectator that missed moves takes the position from the next one', + () async { + final alice = player('Alice'); + final bob = player('Bob'); + final (white, black) = await startGame(alice, bob); + await white.service.makeMove(white.game!, 'd2d4'); + await black.service.makeMove(black.game!, 'd7d5'); + + final dave = player('Dave'); + await white.service.makeMove(white.game!, 'c2c4'); + final g = dave.game!; + expect(g.ply, 3); + expect(g.fen, white.game!.fen); + expect(g.sanMoves, [null, null, null]); + expect(g.hasPlayers, isFalse); + + // Asking for an update fetches the players. + await dave.service.requestUpdate(g); + await settle(); + expect(dave.game!.hasPlayers, isTrue); + await black.service.makeMove(black.game!, 'e7e6'); + expect(dave.game!.ply, 4); + expect(dave.game!.sanMoves.last, 'e6'); + }, + ); + + test('a player who missed a move gets it back by asking', () async { + final alice = player('Alice'); + final bob = player('Bob'); + final (white, black) = await startGame(alice, bob); + mesh.filter = (from, to, _) => !(from == white.link && to == black.link); + await white.service.makeMove(white.game!, 'e2e4'); + mesh.filter = null; + expect(black.game!.ply, 0); + expect(black.game!.isMyTurn, isFalse); + + await black.service.requestUpdate(black.game!); + await settle(); + expect(black.game!.ply, 1); + expect(black.game!.isMyTurn, isTrue); + }); + + test('forged moves and conflicting duplicates are rejected', () async { + final alice = player('Alice'); + final bob = player('Bob'); + final carol = player('Carol'); + final (white, black) = await startGame(alice, bob); + await white.service.makeMove(white.game!, 'e2e4'); + final real = ChessPacket.decode(white.link.sent.last) as ChessMovePacket; + + // Mallory replays White's chain value with a different move as Black's. + final forged = ChessMovePacket( + gameId: real.gameId, + ply: 2, + minutes: 0, + moveIndex: 0, + chainValue: real.chainValue, + position: real.position, + ); + carol.service.handleIncoming(ChessIncoming(_channel, forged.encode())); + expect(carol.game!.ply, 1); + // And a made-up chain value. + final random = ChessMovePacket( + gameId: real.gameId, + ply: 2, + minutes: 0, + moveIndex: 0, + chainValue: Uint8List(16), + position: real.position, + ); + carol.service.handleIncoming(ChessIncoming(_channel, random.encode())); + black.service.handleIncoming(ChessIncoming(_channel, random.encode())); + expect(carol.game!.ply, 1); + expect(black.game!.ply, 1); + }); + + test('resign, draw and timeout claims', () async { + final alice = player('Alice'); + final bob = player('Bob'); + var (white, black) = await startGame(alice, bob); + await white.service.offerDraw(white.game!); + expect(black.game!.drawOfferedBy, ChessSide.white); + await black.service.acceptDraw(black.game!); + expect(white.game!.endReason, ChessEndReason.drawAgreed); + + final carol = player('Carol', seed: 8); + final dan = player('Dan', seed: 9); + (white, black) = await startGame(carol, dan); + await black.service.resign(black.game!); + expect(white.game!.winner, ChessSide.white); + expect(white.game!.endReason, ChessEndReason.resignation); + + final erin = player('Erin', seed: 10); + final finn = player('Finn', seed: 11); + (white, black) = await startGame(erin, finn); + await white.service.makeMove(white.game!, 'e2e4'); + expect(white.service.canClaimTimeout(white.game!), isFalse); + now = now.add(const Duration(hours: 1, minutes: 11)); + expect(white.service.canClaimTimeout(white.game!), isTrue); + expect(await white.service.claimTimeout(white.game!), isTrue); + expect(black.game!.endReason, ChessEndReason.timeout); + expect(black.game!.winner, ChessSide.white); + }); + + test('games persist per radio scope', () async { + final alice = player('Alice'); + final bob = player('Bob'); + final (white, _) = await startGame(alice, bob); + await white.service.makeMove(white.game!, 'g1f3'); + await alice.service.store.flush(); + + final reloaded = ChessStore().load(alice.link.storageScope).single; + expect(reloaded.ply, 1); + expect(reloaded.mySide, alice.game!.mySide); + expect(reloaded.mySeedHex, isNotNull); + expect(ChessStore().load('other00000'), isEmpty); + }); + + test('invites expire after a day', () async { + final alice = player('Alice'); + final bob = player('Bob'); + await alice.service.createInvite(channelId: _channel); + now = now.add(const Duration(hours: 25)); + bob.service.housekeeping(); + expect(bob.game!.endReason, ChessEndReason.expired); + }); +} diff --git a/test/games/chess_ui_test.dart b/test/games/chess_ui_test.dart new file mode 100644 index 00000000..4b8abec6 --- /dev/null +++ b/test/games/chess_ui_test.dart @@ -0,0 +1,165 @@ +import 'dart:async'; +import 'dart:typed_data'; + +import 'package:flutter/material.dart'; +import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:meshcore_open/connector/meshcore_connector.dart'; +import 'package:meshcore_open/games/chess/chess_game.dart'; +import 'package:meshcore_open/games/chess/chess_link.dart'; +import 'package:meshcore_open/games/chess/chess_packets.dart'; +import 'package:meshcore_open/games/chess/chess_service.dart'; +import 'package:meshcore_open/games/chess/ui/chess_board.dart'; +import 'package:meshcore_open/games/chess/ui/chess_game_screen.dart'; +import 'package:meshcore_open/l10n/app_localizations.dart'; +import 'package:meshcore_open/models/channel.dart'; +import 'package:meshcore_open/storage/prefs_manager.dart'; +import 'package:meshcore_open/theme/mesh_theme.dart'; +import 'package:meshcore_open/games/chess/ui/chess_games_sheet.dart'; +import 'package:provider/provider.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +final _l10n = lookupAppLocalizations(const Locale('en')); + +class _ConnectedConnector extends MeshCoreConnector { + @override + bool get isConnected => true; +} + +class _Link extends ChangeNotifier implements ChessLink { + final controller = StreamController.broadcast(sync: true); + final sent = []; + + @override + Stream get incoming => controller.stream; + @override + Future send(String channelId, Uint8List payload) async { + sent.add(payload); + return true; + } + + @override + String get selfName => 'Me'; + @override + String get storageScope => 'ui00000000'; + @override + bool get canSend => true; + @override + void notify(String channelId, String text) {} + @override + AppLocalizations get l10n => _l10n; +} + +void main() { + late Channel channel; + late String channelId; + late _Link link; + late ChessService service; + late ChessGame myGame; + + setUp(() async { + SharedPreferences.setMockInitialValues({}); + PrefsManager.reset(); + await PrefsManager.initialize(); + channel = Channel(index: 0, name: 'Public', psk: Uint8List(16)..[0] = 9); + channelId = channel.storageId!; + link = _Link(); + service = ChessService(link: link, startHousekeeping: false); + // Our own invite, accepted by Bob, so we play white. + myGame = (await service.createInvite( + channelId: channelId, + colour: ChessColourPreference.white, + ))!; + link.controller.add( + ChessIncoming( + channelId, + ChessAcceptPacket( + gameId: myGame.gameId, + commitment: Uint8List(16)..[3] = 7, + accepterName: 'Bob', + ).encode(), + ), + ); + link.controller.add( + ChessIncoming( + channelId, + ChessInvitePacket( + gameId: 4242, + deadline: ChessDeadline.day1, + colour: ChessColourPreference.random, + commitment: Uint8List(16)..[1] = 1, + inviterName: 'Carol', + ).encode(), + ), + ); + }); + + tearDown(() => service.dispose()); + + Widget app(Widget home) => MultiProvider( + providers: [ + ChangeNotifierProvider.value( + value: _ConnectedConnector(), + ), + ChangeNotifierProvider.value(value: service), + ], + child: MaterialApp( + theme: MeshTheme.light(), + locale: const Locale('en'), + localizationsDelegates: const [ + AppLocalizations.delegate, + GlobalMaterialLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + ], + supportedLocales: AppLocalizations.supportedLocales, + home: home, + ), + ); + + testWidgets('sheet lists our game and the open invite', (tester) async { + tester.view.physicalSize = const Size(400, 2000); + tester.view.devicePixelRatio = 1; + addTearDown(tester.view.reset); + await tester.pumpWidget( + app( + Builder( + builder: (context) => Scaffold( + body: TextButton( + onPressed: () => showChessGamesSheet(context, channel), + child: const Text('open'), + ), + ), + ), + ), + ); + await tester.tap(find.text('open')); + await tester.pumpAndSettle(); + expect(find.text(_l10n.chess_sectionYourGames.toUpperCase()), findsOne); + expect(find.text(_l10n.chess_vs('Me', 'Bob')), findsOne); + expect(find.text(_l10n.chess_rowOpenInvite('Carol')), findsOne); + expect(find.text(_l10n.chess_accept), findsOne); + }); + + testWidgets('tapping a piece and a target sends the move', (tester) async { + tester.view.physicalSize = const Size(400, 1600); + tester.view.devicePixelRatio = 1; + addTearDown(tester.view.reset); + await tester.pumpWidget( + app(ChessGameScreen(channelId: channelId, gameId: myGame.gameId)), + ); + await tester.pump(); + expect(find.byType(ChessBoardView), findsOne); + expect(find.text(_l10n.chess_statusYourMove), findsWidgets); + + await tester.tap(find.bySemanticsLabel('e2 P')); + await tester.pump(); + await tester.tap(find.bySemanticsLabel('e4')); + await tester.pumpAndSettle(); + + final move = ChessPacket.decode(link.sent.last); + expect(move, isA()); + expect(myGame.sanMoves, ['e4']); + expect(find.text(_l10n.chess_statusWaiting('Bob')), findsOne); + }); +} diff --git a/test/screens/small_screen_layout_test.dart b/test/screens/small_screen_layout_test.dart index e85b541e..fef25628 100644 --- a/test/screens/small_screen_layout_test.dart +++ b/test/screens/small_screen_layout_test.dart @@ -12,6 +12,13 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'package:meshcore_open/connector/meshcore_connector.dart'; import 'package:meshcore_open/connector/meshcore_protocol.dart'; +import 'package:meshcore_open/games/chess/chess_game.dart'; +import 'package:meshcore_open/games/chess/chess_link.dart'; +import 'package:meshcore_open/games/chess/chess_packets.dart'; +import 'package:meshcore_open/games/chess/chess_service.dart'; +import 'package:meshcore_open/games/chess/ui/chess_game_screen.dart'; +import 'package:meshcore_open/games/chess/ui/chess_games_sheet.dart'; +import 'package:meshcore_open/games/hash_chain.dart'; import 'package:meshcore_open/l10n/app_localizations.dart'; import 'package:meshcore_open/models/contact.dart'; import 'package:meshcore_open/review_mode/review_radio.dart'; @@ -81,8 +88,13 @@ Future<_Env> _connect(WidgetTester tester) async { final retry = MessageRetryService(); final settings = AppSettingsService(); final translation = TranslationService(settings); + final chess = ChessService( + link: ConnectorChessLink(connector, settings: settings), + startHousekeeping: false, + ); final env = _Env(connector, [ ChangeNotifierProvider.value(value: connector), + ChangeNotifierProvider.value(value: chess), ChangeNotifierProvider.value(value: retry), ChangeNotifierProvider.value(value: PathHistoryService(storage)), ChangeNotifierProvider.value(value: settings), @@ -122,9 +134,57 @@ Future<_Env> _connect(WidgetTester tester) async { await Future.delayed(const Duration(milliseconds: 25)); } }); + _seedChessGames(chess, connector.channels.first.storageId!); return env; } +const _chessGameId = 77; + +/// A game in progress (long names, a few moves) and an open invite. +void _seedChessGames(ChessService chess, String channelId) { + void feed(ChessPacket p) => + chess.handleIncoming(ChessIncoming(channelId, p.encode())); + final white = HashChain(Uint8List(16)); + final black = HashChain(Uint8List(16)..[0] = 1); + feed( + ChessInfoPacket( + gameId: _chessGameId, + ply: 0, + startedAtUnix: 1700000000, + deadline: ChessDeadline.hour1, + whiteCommitment: white.commitment, + blackCommitment: black.commitment, + whiteName: 'Alexandra the Long-Named', + blackName: 'Bartholomew Repeater Fan', + ), + ); + final game = chess.game(channelId, _chessGameId)!; + for (final (i, uci) in ['e2e4', 'e7e5', 'g1f3'].indexed) { + final probe = ChessGame.fromJson(game.toJson())!; + final index = probe.legalUci().indexOf(uci); + probe.applyUci(uci); + feed( + ChessMovePacket( + gameId: _chessGameId, + ply: i + 1, + minutes: i, + moveIndex: index, + chainValue: (i.isEven ? white : black).valueAt(i ~/ 2 + 1), + position: probe.packedPosition(), + ), + ); + } + feed( + ChessInvitePacket( + gameId: 78, + deadline: ChessDeadline.day1, + colour: ChessColourPreference.random, + commitment: HashChain(Uint8List(16)..[0] = 2).commitment, + inviterName: 'Cornelius Openinvite', + ), + ); +} + Contact _contactOfType(MeshCoreConnector c, int type) => c.contacts.firstWhere( (x) => x.type == type, orElse: () => c.contacts.first, @@ -151,6 +211,14 @@ _interactions = { await t.tap(find.byType(FloatingActionButton)); }, // Four routing modes (Auto, Flood, Direct, Manual) share one row. + 'Chess games sheet': (t, c) async { + unawaited( + showChessGamesSheet( + t.element(find.byType(ChannelChatScreen)), + c.channels.first, + ), + ); + }, 'Routing sheet': (t, c) async { unawaited( ContactRoutingSheet.show( @@ -183,6 +251,11 @@ final Map _screens = { 'Map': (_) => const MapScreen(), 'Chat': (c) => ChatScreen(contact: _contactOfType(c, advTypeChat)), 'ChannelChat': (c) => ChannelChatScreen(channel: c.channels.first), + 'Chess games sheet': (c) => ChannelChatScreen(channel: c.channels.first), + 'ChessGame': (c) => ChessGameScreen( + channelId: c.channels.first.storageId!, + gameId: _chessGameId, + ), 'ChannelMessagePath': (c) { final msgs = c.getChannelMessages(c.channels.first); return ChannelMessagePathScreen(message: msgs.last); @@ -261,6 +334,7 @@ void main() { 'Map', 'Chat', 'ChannelChat', + 'ChessGame', 'Settings', }.contains(entry.key)) (entry, true),