From 79684598ab67dc8863753fe18bff8daac5e21a2b Mon Sep 17 00:00:00 2001 From: True Zhuanjia Date: Tue, 10 Feb 2026 17:17:35 +0800 Subject: [PATCH] learn more action for rendering backend tip --- VoidLink/Localization/Localizable.xcstrings | 81 +++++++++++++------ .../ViewControllers/SettingsViewController.m | 12 ++- 2 files changed, 66 insertions(+), 27 deletions(-) diff --git a/VoidLink/Localization/Localizable.xcstrings b/VoidLink/Localization/Localizable.xcstrings index feb89418..a06fc608 100644 --- a/VoidLink/Localization/Localizable.xcstrings +++ b/VoidLink/Localization/Localizable.xcstrings @@ -1048,6 +1048,35 @@ } } }, + "betterPerformanceLink" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "https://voidlink.yuque.com/org-wiki-voidlink-znirha/fa3tgr/pruyeo2a5imihey5" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "https://voidlink.yuque.com/org-wiki-voidlink-znirha/fa3tgr/hxns3rgbcqhtyq0t" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "https://voidlink.yuque.com/org-wiki-voidlink-znirha/fa3tgr/hxns3rgbcqhtyq0t" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "https://voidlink.yuque.com/org-wiki-voidlink-znirha/fa3tgr/hxns3rgbcqhtyq0t" + } + } + } + }, "Bitrate: %.1f Mbps" : { "extractionState" : "manual", "localizations" : { @@ -6227,29 +6256,6 @@ } } }, - "Rendering mode change requires app restart" : { - "extractionState" : "manual", - "localizations" : { - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "更改渲染模式需要重启应用以确保干净启动。您是否要立即退出应用?" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "更改渲染模式需要重新啟動應用程式以確保乾淨啟動。您是否要立即退出應用程式?" - } - }, - "zh-HK" : { - "stringUnit" : { - "state" : "translated", - "value" : "更改渲染模式需要重新啟動應用程式以確保乾淨啟動。您是否要立即退出應用程式?" - } - } - } - }, "renderingBackendStackTip" : { "extractionState" : "manual", "localizations" : { @@ -7161,6 +7167,35 @@ } } }, + "standardRenderTip" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "\n- Standard render has better performance on most devices now.\n\n- Changing the rendering mode requires restarting the application to ensure a clean start." + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "\n- 标准渲染模式目前在大多数设备上具有更好的性能。\n\n- 更改渲染模式需要重启应用以确保干净启动。您是否要立即退出应用?" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "\n- 目前在大多数装置上,標準渲染模式具有较佳的效能。\n\n- 更改渲染模式需要重新啟動應用程式以確保乾淨啟動。您是否要立即退出應用程式?" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "\n- 目前在大多数装置上,標準渲染模式具有较佳的效能。\n\n- 更改渲染模式需要重新啟動應用程式以確保乾淨啟動。您是否要立即退出應用程式?" + } + } + } + }, "Start" : { "extractionState" : "manual", "localizations" : { diff --git a/VoidLink/ViewControllers/SettingsViewController.m b/VoidLink/ViewControllers/SettingsViewController.m index b08d8e3d..1bfa8526 100644 --- a/VoidLink/ViewControllers/SettingsViewController.m +++ b/VoidLink/ViewControllers/SettingsViewController.m @@ -2298,14 +2298,14 @@ BOOL isCustomResolution(int resolutionSelected) { // Check if the rendering backend has actually changed if (previousBackend != sender.selectedSegmentIndex) { // Show alert to prompt user to restart the app - NSString *message = [LocalizationHelper localizedStringForKey: sender.selectedSegmentIndex == 1 ? @"metalRenderTip" : @"Rendering mode change requires app restart"]; + NSString *message = [LocalizationHelper localizedStringForKey: sender.selectedSegmentIndex == 1 ? @"metalRenderTip" : @"standardRenderTip"]; UIAlertController *alertController = [UIAlertController alertControllerWithTitle:[LocalizationHelper localizedStringForKey:@"Restart Required"] message:message preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction *quitAction = [UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Quit Now"] - style:UIAlertActionStyleDestructive + style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { Settings* directSettings = [self->dataMan retrieveSettings]; @@ -2316,10 +2316,14 @@ BOOL isCustomResolution(int resolutionSelected) { exit(0); }]; - UIAlertAction *laterAction = [UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Later"] + UIAlertAction *laterAction = [UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Learn More"] style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { - self.renderingBackendSelector.selectedSegmentIndex = labs(self.renderingBackendSelector.selectedSegmentIndex - 1); + self.renderingBackendSelector.selectedSegmentIndex = 0; + NSURL *url = [NSURL URLWithString:[LocalizationHelper localizedStringForKey:@"betterPerformanceLink"]]; + if ([[UIApplication sharedApplication] canOpenURL:url]) { + [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil]; + } }]; [alertController addAction:laterAction];