Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.
Swift apple-siliconcustom-formathomebrewiosipaipadipadosiphonemetalnative-portnintendo-switchnxnativeromfsswitch-games
iOS quit prompt: say the app closes and the player opens it again (#620)
v0lumehi2911a2849470
diff --git a/frontend-ios/Sources/ShellHost/Resources/Localizable.xcstrings b/frontend-ios/Sources/ShellHost/Resources/Localizable.xcstringsindex 80adb6e0..4adcac32 100644--- a/frontend-ios/Sources/ShellHost/Resources/Localizable.xcstrings+++ b/frontend-ios/Sources/ShellHost/Resources/Localizable.xcstrings@@ -2601,42 +2601,42 @@}}},- "Unsaved progress will be lost. The app closes and opens on your games next time.": {+ "Unsaved progress will be lost. The app closes. Open it again to get back to your games.": {"localizations": {"de": {"stringUnit": {"state": "translated",- "value": "Nicht gesicherter Fortschritt geht verloren. Die App wird geschlossen und zeigt beim nächsten Öffnen deine Spiele."+ "value": "Nicht gesicherter Fortschritt geht verloren. Die App wird geschlossen. Öffne sie erneut, um zu deinen Spielen zurückzukehren."}},"en": {"stringUnit": {"state": "translated",- "value": "Unsaved progress will be lost. The app closes and opens on your games next time."+ "value": "Unsaved progress will be lost. The app closes. Open it again to get back to your games."}},"fr": {"stringUnit": {"state": "translated",- "value": "La progression non sauvegardée sera perdue. L’app se ferme et s’ouvre sur vos jeux la prochaine fois."+ "value": "La progression non sauvegardée sera perdue. L’app se ferme. Rouvrez-la pour revenir à vos jeux."}},"it": {"stringUnit": {"state": "translated",- "value": "I progressi non salvati andranno persi. L’app si chiude e la prossima volta si apre sui tuoi giochi."+ "value": "I progressi non salvati andranno persi. L’app si chiude. Riaprila per tornare ai tuoi giochi."}},"sv": {"stringUnit": {"state": "translated",- "value": "Osparade framsteg går förlorade. Appen stängs och öppnas med dina spel nästa gång."+ "value": "Osparade framsteg går förlorade. Appen stängs. Öppna den igen för att komma tillbaka till dina spel."}},"zh-Hans": {"stringUnit": {"state": "translated",- "value": "未保存的进度将会丢失。App 会关闭,下次打开时显示你的游戏。"+ "value": "未保存的进度将会丢失。App 会关闭,再次打开即可回到你的游戏。"}}}diff --git a/frontend-ios/Sources/ShellHost/ShellHostModel.swift b/frontend-ios/Sources/ShellHost/ShellHostModel.swiftindex 788b39c7..0d83c4fe 100644--- a/frontend-ios/Sources/ShellHost/ShellHostModel.swift+++ b/frontend-ios/Sources/ShellHost/ShellHostModel.swift@@ -470,7 +470,7 @@ public struct ShellHostConfig: Sendable {/// or Home is held. The menu item reads the title without its question mark.static func quitPromptText(gameName: String) -> String {[hostText("Keep holding to quit"), hostText("Quit \(gameName)?"),- hostText("Unsaved progress will be lost. The app closes and opens on your games next time."), hostText("Quit"), hostText("Cancel")]+ hostText("Unsaved progress will be lost. The app closes. Open it again to get back to your games."), hostText("Quit"), hostText("Cancel")].map { $0.replacingOccurrences(of: "\n", with: " ") }.joined(separator: "\n")}diff --git a/frontend-ios/Tests/ShellHostTests/ShellHostModelTests.swift b/frontend-ios/Tests/ShellHostTests/ShellHostModelTests.swiftindex 7dbb20c2..e5cc73e3 100644--- a/frontend-ios/Tests/ShellHostTests/ShellHostModelTests.swift+++ b/frontend-ios/Tests/ShellHostTests/ShellHostModelTests.swift@@ -84,6 +84,12 @@ final class Clock: @unchecked Sendable { var date: Date; init(_ d: Date) { date#expect(lines.count == 5 && lines.allSatisfy { !$0.isEmpty } && lines[1].contains(name))}+ /// #620: Exit Game closes the app and iOS does not let it start itself again, so the prompt's note says the player opens it again to get back.+ @Test func theQuitPromptNoteSaysTheAppClosesAndMustBeOpenedAgain() {+ let note = ShellHostModel.quitPromptText(gameName: "Orbit").components(separatedBy: "\n")[2]+ #expect(note.contains("The app closes.") && note.contains("Open it again"), "\(note)")+ }+/// The prompt's texts in every language: no semicolon, no line break (one text per line in DM_HOME_QUIT_TEXT), the title keeps the game's name.@Test func theQuitPromptTextsFollowTheTextRules() throws {let l10n = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent().deletingLastPathComponent()diff --git a/frontend/l10n/de.json b/frontend/l10n/de.jsonindex 37d9a174..92570c5d 100644--- a/frontend/l10n/de.json+++ b/frontend/l10n/de.json@@ -685,7 +685,7 @@"ios.host.quitButton": "Beenden","ios.host.quitCancel": "Abbrechen","ios.host.quitHold": "Zum Beenden gedrückt halten",- "ios.host.quitNote": "Nicht gesicherter Fortschritt geht verloren. Die App wird geschlossen und zeigt beim nächsten Öffnen deine Spiele.",+ "ios.host.quitNote": "Nicht gesicherter Fortschritt geht verloren. Die App wird geschlossen. Öffne sie erneut, um zu deinen Spielen zurückzukehren.","ios.host.quitTitle": "%@ beenden?","ios.host.rangeWithoutLimits": "%@ ist ein Bereich ohne min, max und step.","ios.host.sameTitleId": "%@ hat dieselbe Title-ID %@ wie %@, das stattdessen verwendet wird.",diff --git a/frontend/l10n/en.json b/frontend/l10n/en.jsonindex 69e6c2c1..1488a801 100644--- a/frontend/l10n/en.json+++ b/frontend/l10n/en.json@@ -683,7 +683,7 @@"ios.host.quitButton": "Quit","ios.host.quitCancel": "Cancel","ios.host.quitHold": "Keep holding to quit",- "ios.host.quitNote": "Unsaved progress will be lost. The app closes and opens on your games next time.",+ "ios.host.quitNote": "Unsaved progress will be lost. The app closes. Open it again to get back to your games.","ios.host.quitTitle": "Quit %@?","ios.host.rangeWithoutLimits": "%@ is a range without min, max and step.","ios.host.sameTitleId": "%@ has the same title ID %@ as %@, which is used instead.",diff --git a/frontend/l10n/fr.json b/frontend/l10n/fr.jsonindex 991be1c0..db6060ed 100644--- a/frontend/l10n/fr.json+++ b/frontend/l10n/fr.json@@ -684,7 +684,7 @@"ios.host.quitButton": "Quitter","ios.host.quitCancel": "Annuler","ios.host.quitHold": "Maintenez pour quitter",- "ios.host.quitNote": "La progression non sauvegardée sera perdue. L’app se ferme et s’ouvre sur vos jeux la prochaine fois.",+ "ios.host.quitNote": "La progression non sauvegardée sera perdue. L’app se ferme. Rouvrez-la pour revenir à vos jeux.","ios.host.quitTitle": "Quitter %@ ?","ios.host.rangeWithoutLimits": "%@ est une plage sans min, max et step.","ios.host.sameTitleId": "%@ a le même ID de titre %@ que %@, qui est utilisé à sa place.",diff --git a/frontend/l10n/it.json b/frontend/l10n/it.jsonindex fdb5562e..e4e4fdb5 100644--- a/frontend/l10n/it.json+++ b/frontend/l10n/it.json@@ -684,7 +684,7 @@"ios.host.quitButton": "Esci","ios.host.quitCancel": "Annulla","ios.host.quitHold": "Tieni premuto per uscire",- "ios.host.quitNote": "I progressi non salvati andranno persi. L’app si chiude e la prossima volta si apre sui tuoi giochi.",+ "ios.host.quitNote": "I progressi non salvati andranno persi. L’app si chiude. Riaprila per tornare ai tuoi giochi.","ios.host.quitTitle": "Uscire da %@?","ios.host.rangeWithoutLimits": "%@ è un intervallo senza min, max e step.","ios.host.sameTitleId": "%@ ha lo stesso ID titolo %@ di %@, che viene usato al suo posto.",diff --git a/frontend/l10n/sv.json b/frontend/l10n/sv.jsonindex 35837f7e..f598d8bb 100644--- a/frontend/l10n/sv.json+++ b/frontend/l10n/sv.json@@ -526,7 +526,7 @@"ios.host.quitButton": "Avsluta","ios.host.quitCancel": "Avbryt","ios.host.quitHold": "Fortsätt hålla in för att avsluta",- "ios.host.quitNote": "Osparade framsteg går förlorade. Appen stängs och öppnas med dina spel nästa gång.",+ "ios.host.quitNote": "Osparade framsteg går förlorade. Appen stängs. Öppna den igen för att komma tillbaka till dina spel.","ios.host.quitTitle": "Avsluta %@?","ios.host.rangeWithoutLimits": "%@ är ett intervall utan min, max och step.","ios.host.sameTitleId": "%@ har samma titel-ID %@ som %@, som används i stället.",diff --git a/frontend/l10n/zh.json b/frontend/l10n/zh.jsonindex 8eb9283c..39be6d73 100644--- a/frontend/l10n/zh.json+++ b/frontend/l10n/zh.json@@ -684,7 +684,7 @@"ios.host.quitButton": "退出","ios.host.quitCancel": "取消","ios.host.quitHold": "继续按住即可退出",- "ios.host.quitNote": "未保存的进度将会丢失。App 会关闭,下次打开时显示你的游戏。",+ "ios.host.quitNote": "未保存的进度将会丢失。App 会关闭,再次打开即可回到你的游戏。","ios.host.quitTitle": "退出%@?","ios.host.rangeWithoutLimits": "%@ 是缺少 min、max、step 的范围项。","ios.host.sameTitleId": "%@ 的 title ID %@ 与 %@ 相同,已改用后者。",