diff --git a/Frameworks/Resources/Localizable.xcstrings b/Frameworks/Resources/Localizable.xcstrings index d9ac34d7..b410f245 100644 --- a/Frameworks/Resources/Localizable.xcstrings +++ b/Frameworks/Resources/Localizable.xcstrings @@ -11700,53 +11700,6 @@ } } }, - "Bonjour" : { - "extractionState" : "manual", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Bonjour" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Bonjour" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Bonjour" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "Bonjour" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "Bonjour" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "Bonjour" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "Bonjour" - } - } - } - }, "Both" : { "extractionState" : "manual", "localizations" : { @@ -21001,47 +20954,6 @@ } } }, - "Dark Custom Configuration" : { - "extractionState" : "manual", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Benutzerdefinierte dunkle Konfiguration" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Configuration sombre personnalisée" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "ダークモードのカスタム設定" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "다크 모드 사용자 설정" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "深色自定义配置" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "深色自訂設定" - } - } - } - }, "Dark Theme" : { "extractionState" : "manual", "localizations" : { @@ -38151,47 +38063,6 @@ } } }, - "Light Custom Configuration" : { - "extractionState" : "manual", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Benutzerdefinierte helle Konfiguration" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Configuration claire personnalisée" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "ライトモードのカスタム設定" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "라이트 모드 사용자 설정" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "浅色自定义配置" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "淺色自訂設定" - } - } - } - }, "Light Theme" : { "extractionState" : "manual", "localizations" : { @@ -51818,53 +51689,6 @@ } } }, - "Port 23 Open" : { - "extractionState" : "manual", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Port 23 offen" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Port 23 Open" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "Port 23 ouvert" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "ポート23が開いています" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "포트 23 열림" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "端口23已开放" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "連接埠23已開啟" - } - } - } - }, "Port Forwarding" : { "extractionState" : "manual", "localizations" : { @@ -60010,53 +59834,6 @@ } } }, - "SSH Advertised" : { - "extractionState" : "manual", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "SSH angekündigt" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "SSH Advertised" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "SSH annoncé" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "SSHサービス公開中" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "SSH 서비스 광고됨" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "已广播SSH服务" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "已廣播SSH服務" - } - } - } - }, "SSH Certificate" : { "extractionState" : "manual", "localizations" : { @@ -60262,53 +60039,6 @@ } } }, - "SSH Verified" : { - "extractionState" : "manual", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "SSH bestätigt" - } - }, - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "SSH Verified" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "SSH vérifié" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "SSH確認済み" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "SSH 확인됨" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "已验证SSH" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "已驗證SSH" - } - } - } - }, "SSH and SFTP connection links cannot contain passwords." : { "extractionState" : "manual", "localizations" : { diff --git a/Frameworks/TermindPresentation/Strings/LocalNetwork.swift b/Frameworks/TermindPresentation/Strings/LocalNetwork.swift index 33b56e83..4bb9ce8f 100644 --- a/Frameworks/TermindPresentation/Strings/LocalNetwork.swift +++ b/Frameworks/TermindPresentation/Strings/LocalNetwork.swift @@ -56,18 +56,6 @@ extension AppStrings { public static var scanFailed: LocalizedStringResource { "Local discovery failed. Check your network and try again." } - public static var bonjour: LocalizedStringResource { - "Bonjour" - } - public static var verifiedSSH: LocalizedStringResource { - "SSH Verified" - } - public static var telnetPortOpen: LocalizedStringResource { - "Port 23 Open" - } - public static var advertisedSSH: LocalizedStringResource { - "SSH Advertised" - } public static var noMAC: LocalizedStringResource { "No physical network adapter was found. Enter the MAC address manually." } diff --git a/Frameworks/TermindPresentation/Strings/Settings.swift b/Frameworks/TermindPresentation/Strings/Settings.swift index eb43b630..b3f630bc 100644 --- a/Frameworks/TermindPresentation/Strings/Settings.swift +++ b/Frameworks/TermindPresentation/Strings/Settings.swift @@ -225,10 +225,6 @@ extension AppStrings { "Dark" } - public static var darkCustomConfiguration: LocalizedStringResource { - "Dark Custom Configuration" - } - public static var deleteAllLoggingFilesConfirmation: LocalizedStringResource { "Delete all logging files?" } @@ -420,10 +416,6 @@ extension AppStrings { "Light" } - public static var lightCustomConfiguration: LocalizedStringResource { - "Light Custom Configuration" - } - public static var limits: LocalizedStringResource { "Limits" } diff --git a/TFITests/Screenshots/MobileLocalDiscoveryRenderingTests.swift b/TFITests/Screenshots/MobileLocalDiscoveryRenderingTests.swift index 34b39673..fbca65a5 100644 --- a/TFITests/Screenshots/MobileLocalDiscoveryRenderingTests.swift +++ b/TFITests/Screenshots/MobileLocalDiscoveryRenderingTests.swift @@ -89,13 +89,14 @@ struct MobileLocalDiscoveryRenderingTests { try await Task.sleep(for: .milliseconds(700)) window.layoutIfNeeded() let labels = accessibilityLabels(in: window) - #expect(labels.contains { $0.contains("192.168.1.24:22") }) + for text in ["Mac mini", "mac-mini.local:22", "192.168.1.24:22", "Raspberry Pi", "raspberrypi.local:22"] { + #expect(labels.contains { $0.contains(text) }) + } for resource in [ - AppStrings.LocalNetwork.bonjour, AppStrings.LocalNetwork.advertisedSSH, - AppStrings.LocalNetwork.verifiedSSH, AppStrings.LocalNetwork.telnetPortOpen, + AppStrings.LocalNetwork.discovery, AppStrings.LocalNetwork.rescan, AppStrings.Common.cancel, ] { - let unwanted = AppLocalization.resolve(resource, locale: Locale(identifier: language)) - #expect(!labels.contains { $0.contains(unwanted) }) + let title = AppLocalization.resolve(resource, locale: Locale(identifier: language)) + #expect(labels.contains { $0.contains(title) }) } let data = UIGraphicsImageRenderer(bounds: window.bounds).pngData { _ in window.drawHierarchy(in: window.bounds, afterScreenUpdates: true) diff --git a/TFMTests/MetricsDetailToolbarTests.swift b/TFMTests/MetricsDetailToolbarTests.swift index e0e0e03a..3e89e553 100644 --- a/TFMTests/MetricsDetailToolbarTests.swift +++ b/TFMTests/MetricsDetailToolbarTests.swift @@ -70,20 +70,22 @@ struct MetricsDetailToolbarTests { @Test(arguments: [AppLanguage.english, .simplifiedChinese, .traditionalChinese]) func legacyCompactSearchOpensTheNativeFieldAndKeepsItsQueryWhenWidened(_ language: AppLanguage) async throws { let configuration = ScreenshotDemoConfiguration(scene: .metricsDetail, language: language) - let model = configuration.makeMetricsModel(hosts: .demo()) + let hosts = HostLibraryModel.demo() + let model = configuration.makeMetricsModel(hosts: hosts) + let app = AppModel(hosts: hosts, serverMetrics: model) let server = try #require(model.servers.first) let state = WindowModel() state.selectedDestination = .metrics state.metricsHostID = server.id state.metricsModel = model let root = LegacyMetricsToolbarFixture(server: server) - .environment(state).environment(\.locale, language.locale) + .environment(app).environment(state).environment(\.locale, language.locale) let window = makeWindow(root) defer { window.orderOut(nil) window.contentViewController = nil window.close() - model.shutdown() + app.shutdownForTermination() } await settle(window) #expect(state.showsCompactMetricsDetail) diff --git a/TFMTests/ResponsivePageLayoutTests.swift b/TFMTests/ResponsivePageLayoutTests.swift index e09fd033..81ddcc67 100644 --- a/TFMTests/ResponsivePageLayoutTests.swift +++ b/TFMTests/ResponsivePageLayoutTests.swift @@ -71,13 +71,15 @@ struct ResponsivePageLayoutTests { @Test func metricsPagesAndResizeKeepTheProcessTableAndBothScrollPositions() async throws { let configuration = ScreenshotDemoConfiguration(scene: .metricsDetail, language: .english) - let model = configuration.makeMetricsModel(hosts: .demo()) + let hosts = HostLibraryModel.demo() + let model = configuration.makeMetricsModel(hosts: hosts) + let app = AppModel(hosts: hosts, serverMetrics: model) let server = try #require(model.servers.first) let state = WindowModel() state.selectedDestination = .metrics state.metricsModel = model state.metricsHostID = server.id - let hosting = NSHostingView(rootView: MetricsDetailView(server: server).environment(state)) + let hosting = NSHostingView(rootView: MetricsDetailView(server: server).environment(app).environment(state)) let window = NSWindow( contentRect: CGRect(x: 0, y: 0, width: 900, height: 600), styleMask: .borderless, backing: .buffered, defer: false) @@ -85,7 +87,7 @@ struct ResponsivePageLayoutTests { window.contentView = hosting defer { window.close() - model.shutdown() + app.shutdownForTermination() } await layout(hosting) let table = try #require(descendant(in: hosting, ofType: NSTableView.self))