From e6d31e96f065ef815dca228df5bbbe7f46d25c83 Mon Sep 17 00:00:00 2001 From: Nick Chan Date: Fri, 9 Aug 2024 19:13:55 +0800 Subject: [PATCH] Internationalize some new strings --- .../Localization/Localizable.xcstrings | 48 +++++++++++++++++++ palera1nLoader/View/ViewController.swift | 18 +++---- 2 files changed, 57 insertions(+), 9 deletions(-) diff --git a/palera1nLoader/Localization/Localizable.xcstrings b/palera1nLoader/Localization/Localizable.xcstrings index 967ae81f..96146df4 100644 --- a/palera1nLoader/Localization/Localizable.xcstrings +++ b/palera1nLoader/Localization/Localizable.xcstrings @@ -83,6 +83,18 @@ } } }, + "Apple TV Rootless is not supported, please switch to rootful.\\n\\n(Advanced) Custom configuration may be specified at Options -> Change Download URL." : { + "comment" : "✅ Alert body trying to use rootless on Apple TV, and the configuration URL is unchanged.", + "extractionState" : "manual", + "localizations" : { + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "不支援Apple TV 無根越獄,請轉到有根越獄。\\n\\n(進階) 配置文件可以在選項 -> 更改下載網址中更改。" + } + } + } + }, "Architecture" : { "comment" : "✅ Tableview cell label which shows your arch or cpu type, i.e arm64 or arm64e", "extractionState" : "manual", @@ -964,6 +976,18 @@ } } }, + "Not Supported" : { + "comment" : "✅ Alert title trying to use rootless on Apple TV", + "extractionState" : "manual", + "localizations" : { + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "不支援" + } + } + } + }, "Options" : { "comment" : "✅ A tableview cell which would bring up the options page", "extractionState" : "manual", @@ -1497,6 +1521,18 @@ } } }, + "The current jailbreak environment is not supported by the current loader configuration file.\\n\\nSwitch to a supported jailbreak environment, or change configuration in options -> Change Download URL.\\n\\nPlatform: %@\\nJailbreak type: %@\\nCF: %d" : { + "comment" : "✅ Alert body when the custom configuration file does not support the current jailbreak environment", + "extractionState" : "manual", + "localizations" : { + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "當前的越獄環境不被當前的配置文件支援。\\n\\n 請切換到一個支援的越獄環境或在選項 -> 更改下載網址中更改配置文件。\\n\\n 平台: %@\\n 越獄類型:%@\\nCF: %d" + } + } + } + }, "Too Long" : { "comment" : "✅ If your set password is over the 254 char limit in the password prompt", "extractionState" : "manual", @@ -1641,6 +1677,18 @@ } } }, + "Update Required" : { + "comment" : "✅ Alert title when current loader version is lower than the minimum loader version in JSON.", + "extractionState" : "manual", + "localizations" : { + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "需要更新" + } + } + } + }, "Use System Language" : { "comment" : "✅ Toggle if the user wants to use their system language instead of a preferred", "extractionState" : "manual", diff --git a/palera1nLoader/View/ViewController.swift b/palera1nLoader/View/ViewController.swift index aef3775a..4f6f2ded 100644 --- a/palera1nLoader/View/ViewController.swift +++ b/palera1nLoader/View/ViewController.swift @@ -341,16 +341,16 @@ extension ViewController { { DispatchQueue.main.async { let lame = UIAlertAction(title: .localized("Dismiss"), style: .default, handler: nil) - let alert = UIAlertController.coolAlert(title: "Not Supported", message: "Apple TV Rootless is not supported, please switch to rootful.\n\n(Advanced) Custom configuration may be specified at Options -> Change Download URL.", actions: [lame]) + let alert = UIAlertController.coolAlert(title: .localized("Not Supported"), message: .localized("Apple TV Rootless is not supported, please switch to rootful.\n\n(Advanced) Custom configuration may be specified at Options -> Change Download URL."), actions: [lame]) self.present(alert, animated: true) } - } else { - DispatchQueue.main.async { - let lame = UIAlertAction(title: .localized("Dismiss"), style: .default, handler: nil) - let alert = UIAlertController.coolAlert(title: "Not Supported", message: "The current jailbreak environment is not supported by the current loader configuration file.\n\nSwitch to a supported jailbreak environment, or change configuration in options -> Change Download URL.\n\nPlatform: \(device)\nJailbreak type: \(paleInfo.palerain_option_rootful ? String.localized("Rootful") : String.localized("Rootless"))\nCF: \(Int(floor((kCFCoreFoundationVersionNumber))))", actions: [lame]) - self.present(alert, animated: true) - } - } + } else { + DispatchQueue.main.async { + let lame = UIAlertAction(title: .localized("Dismiss"), style: .default, handler: nil) + let alert = UIAlertController.coolAlert(title: .localized("Not Supported"), message: .localized("The current jailbreak environment is not supported by the current loader configuration file.\n\nSwitch to a supported jailbreak environment, or change configuration in options -> Change Download URL.\n\nPlatform: %@\nJailbreak type: %@\nCF: %d", arguments: device, paleInfo.palerain_option_rootful ? String.localized("Rootful") : String.localized("Rootless"), Int(floor((kCFCoreFoundationVersionNumber)))), actions: [lame]) + self.present(alert, animated: true) + } + } break } @@ -406,7 +406,7 @@ extension ViewController { } DispatchQueue.main.async { let lame = UIAlertAction(title: .localized("Dismiss"), style: .default, handler: nil) - let alert = UIAlertController.error(title: "New Update Available", message: .localized("Loader Update"), actions: [lame]) + let alert = UIAlertController.error(title: .localized("Update Required"), message: .localized("Loader Update"), actions: [lame]) self.present(alert, animated: true) } }