feat: confirm before leaving a game, and fix untranslated strings
Build & Deploy Farolero / Análisis de código (push) Successful in 13s
Build & Deploy Farolero / Build APK + AAB release (push) Successful in 1m22s

Exit confirmation
- A dialog in the app's own style now guards every in-game screen. The safe
  action is the prominent one, so a stray tap keeps you in the game.
- Eleven screens covered, against both the system back gesture and the close
  buttons. The message adapts: a single-device game is lost, a host ends it
  for everyone, a client can rejoin.
- The two screens the host also opens from the manager take a flag so that
  back there just closes them instead of offering to quit.

Translations
- 21 keys were still holding the English text in Arabic, Basque, Hindi,
  Japanese, Korean, Dutch, Polish, Russian, Turkish and both Chinese
  variants: 231 strings, covering the whole multi-device flow, permissions
  and the mode picker. Nothing failed, the app just showed English.
- The permissions dialog was hardcoded in Spanish; it is localized now.
- Portuguese used Spanish gerunds where pt-PT takes "a + infinitive".

Checked what looked untranslated but is not: Animals and Notes are correct
Catalan, Configuration and Vibration correct French, Version correct German.
Those are whitelisted in the new test rather than silently rewritten.

l10n_cobertura_test guards all of it: no missing or orphan keys, no empty
values, no English left outside the whitelist, and placeholders preserved.
This commit is contained in:
2026-07-25 23:59:57 +02:00
parent d98ca66793
commit 56f07364c2
50 changed files with 2313 additions and 853 deletions
+126 -62
View File
@@ -643,84 +643,74 @@ class AppLocalizationsZh extends AppLocalizations {
String get delete => '删除';
@override
String get selectAtLeastThreeUsersToStart =>
'Select at least 3 users to start.';
String get selectAtLeastThreeUsersToStart => '至少选择 3 名用户才能开始。';
@override
String get hostPhoneMustSelectUser =>
'The host phone must select at least one user.';
String get hostPhoneMustSelectUser => '房主的手机必须至少选择一名用户。';
@override
String get roomNoLongerInLobby => 'The room is no longer in the lobby.';
String get roomNoLongerInLobby => '房间已不在等候大厅。';
@override
String get completeUserSelectionToStart =>
'Complete user selection to start.';
String get completeUserSelectionToStart => '完成用户选择后才能开始。';
@override
String get preparingSecureRoom => 'Preparing the secure room';
String get preparingSecureRoom => '正在准备安全房间';
@override
String get searchingNearbyBluetoothGames =>
'Searching nearby games over Bluetooth';
String get searchingNearbyBluetoothGames => '正在通过蓝牙搜索附近的游戏';
@override
String get tapToJoin => 'Tap to join';
String get tapToJoin => '点击加入';
@override
String get bluetoothLocationPermissionsRequired =>
'Bluetooth and location permissions are required to search for games.';
String get bluetoothLocationPermissionsRequired => '搜索游戏需要蓝牙和定位权限。';
@override
String get bluetoothLocationPermissionsShort =>
'Bluetooth and location permissions are required';
String get bluetoothLocationPermissionsShort => '需要蓝牙和定位权限';
@override
String get couldNotStartSearch =>
'Could not start the search. Check Bluetooth and location.';
String get couldNotStartSearch => '无法开始搜索。请检查蓝牙和定位。';
@override
String couldNotConnectToHost(String host) {
return 'Could not connect to $host';
return '无法连接到 $host';
}
@override
String get room => '房间';
@override
String get singleDeviceSubtitle => 'Game on this device';
String get singleDeviceSubtitle => '在这台设备上游戏';
@override
String get singleDeviceDescription =>
'Ideal for playing together by passing the phone around. Fast, direct setup.';
String get singleDeviceDescription => '适合大家传着手机一起玩。设置快速直接。';
@override
String get multiDeviceSubtitle => 'Each player on their phone';
String get multiDeviceSubtitle => '每位玩家用自己的手机';
@override
String get multiDeviceDescription =>
'Create a premium room, share the QR code and manage users from the lobby.';
String get multiDeviceDescription => '创建高级房间,分享二维码,并在大厅管理用户。';
@override
String get singleDeviceGameLabel => 'Game on this device';
String get singleDeviceGameLabel => '本机游戏';
@override
String get multiDeviceGameLabel => 'Multi-device game';
String get multiDeviceGameLabel => '多设备游戏';
@override
String get mainDeviceUser => 'Main device user';
String get mainDeviceUser => '本机主用户';
@override
String get couldNotCreateRoom =>
'Could not create the room. Check Bluetooth.';
String get couldNotCreateRoom => '无法创建房间。请检查蓝牙。';
@override
String cannotStartWithReason(String reason) {
return 'Cannot start: $reason';
return '无法开始:$reason';
}
@override
String get invalidRoom => 'invalid room';
String get invalidRoom => '无效的房间';
@override
String get defaultPlayerName => '玩家';
@@ -829,6 +819,48 @@ class AppLocalizationsZh extends AppLocalizations {
String playerRejoined(String name) {
return '$name 已重新加入游戏';
}
@override
String get leaveGameTitle => '要退出游戏吗?';
@override
String get leaveGameSingleDevice => '正在进行的游戏将会丢失,且无法恢复。';
@override
String get leaveGameHost => '你是房主:一旦退出,所有玩家的游戏都会结束。';
@override
String get leaveGameClient => '你将退出这局游戏。只要房主还开着,你随时可以回来。';
@override
String get stayInGame => '继续游戏';
@override
String get permissionsNeededTitle => '需要权限';
@override
String get permissionsNeededBody => '多人游戏模式需要以下权限:';
@override
String get openAppSettingsQuestion => '要打开应用设置吗?';
@override
String get openSettings => '打开设置';
@override
String get permissionLocation => '定位';
@override
String get permissionBluetoothAdvertise => '蓝牙(广播)';
@override
String get permissionBluetoothConnect => '蓝牙(连接)';
@override
String get permissionBluetoothScan => '蓝牙(扫描)';
@override
String get permissionNearbyWifi => '附近的 Wi-Fi';
}
/// The translations for Chinese, as used in Taiwan (`zh_TW`).
@@ -1470,84 +1502,74 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
String get delete => '删除';
@override
String get selectAtLeastThreeUsersToStart =>
'Select at least 3 users to start.';
String get selectAtLeastThreeUsersToStart => '至少選擇 3 名使用者才能開始。';
@override
String get hostPhoneMustSelectUser =>
'The host phone must select at least one user.';
String get hostPhoneMustSelectUser => '房主的手機必須至少選擇一名使用者。';
@override
String get roomNoLongerInLobby => 'The room is no longer in the lobby.';
String get roomNoLongerInLobby => '房間已不在等候大廳。';
@override
String get completeUserSelectionToStart =>
'Complete user selection to start.';
String get completeUserSelectionToStart => '完成使用者選擇後才能開始。';
@override
String get preparingSecureRoom => 'Preparing the secure room';
String get preparingSecureRoom => '正在準備安全房間';
@override
String get searchingNearbyBluetoothGames =>
'Searching nearby games over Bluetooth';
String get searchingNearbyBluetoothGames => '正在透過藍牙搜尋附近的遊戲';
@override
String get tapToJoin => 'Tap to join';
String get tapToJoin => '點擊加入';
@override
String get bluetoothLocationPermissionsRequired =>
'Bluetooth and location permissions are required to search for games.';
String get bluetoothLocationPermissionsRequired => '搜尋遊戲需要藍牙和定位權限。';
@override
String get bluetoothLocationPermissionsShort =>
'Bluetooth and location permissions are required';
String get bluetoothLocationPermissionsShort => '需要藍牙和定位權限';
@override
String get couldNotStartSearch =>
'Could not start the search. Check Bluetooth and location.';
String get couldNotStartSearch => '無法開始搜尋。請檢查藍牙和定位。';
@override
String couldNotConnectToHost(String host) {
return 'Could not connect to $host';
return '無法連線到 $host';
}
@override
String get room => '房间';
@override
String get singleDeviceSubtitle => 'Game on this device';
String get singleDeviceSubtitle => '在這台裝置上遊戲';
@override
String get singleDeviceDescription =>
'Ideal for playing together by passing the phone around. Fast, direct setup.';
String get singleDeviceDescription => '適合大家傳著手機一起玩。設定快速直接。';
@override
String get multiDeviceSubtitle => 'Each player on their phone';
String get multiDeviceSubtitle => '每位玩家用自己的手機';
@override
String get multiDeviceDescription =>
'Create a premium room, share the QR code and manage users from the lobby.';
String get multiDeviceDescription => '建立高級房間,分享 QR Code,並在大廳管理使用者。';
@override
String get singleDeviceGameLabel => 'Game on this device';
String get singleDeviceGameLabel => '本機遊戲';
@override
String get multiDeviceGameLabel => 'Multi-device game';
String get multiDeviceGameLabel => '多裝置遊戲';
@override
String get mainDeviceUser => 'Main device user';
String get mainDeviceUser => '本機主要使用者';
@override
String get couldNotCreateRoom =>
'Could not create the room. Check Bluetooth.';
String get couldNotCreateRoom => '無法建立房間。請檢查藍牙。';
@override
String cannotStartWithReason(String reason) {
return 'Cannot start: $reason';
return '無法開始:$reason';
}
@override
String get invalidRoom => 'invalid room';
String get invalidRoom => '無效的房間';
@override
String get defaultPlayerName => '玩家';
@@ -1656,4 +1678,46 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
String playerRejoined(String name) {
return '$name 已重新加入遊戲';
}
@override
String get leaveGameTitle => '要退出遊戲嗎?';
@override
String get leaveGameSingleDevice => '正在進行的遊戲將會遺失,且無法復原。';
@override
String get leaveGameHost => '你是房主:一旦退出,所有玩家的遊戲都會結束。';
@override
String get leaveGameClient => '你將退出這局遊戲。只要房主還開著,你隨時可以回來。';
@override
String get stayInGame => '繼續遊戲';
@override
String get permissionsNeededTitle => '需要權限';
@override
String get permissionsNeededBody => '多人遊戲模式需要以下權限:';
@override
String get openAppSettingsQuestion => '要開啟應用程式設定嗎?';
@override
String get openSettings => '開啟設定';
@override
String get permissionLocation => '定位';
@override
String get permissionBluetoothAdvertise => '藍牙(廣播)';
@override
String get permissionBluetoothConnect => '藍牙(連線)';
@override
String get permissionBluetoothScan => '藍牙(掃描)';
@override
String get permissionNearbyWifi => '附近的 Wi-Fi';
}