diff --git a/Sources/Nifro/App/Intents.swift b/Sources/Nifro/App/Intents.swift index 9e2cb4f..956702f 100644 --- a/Sources/Nifro/App/Intents.swift +++ b/Sources/Nifro/App/Intents.swift @@ -68,11 +68,14 @@ struct SetEnabledStateIntent: AppIntent { @Parameter( title: "Action", - displayName: .init(true: "Toggle", false: "Turn") + displayName: .init(true: "Turn On or Off", false: "Turn") ) var shouldToggle: Bool - @Parameter(title: "Is Enabled") + @Parameter( + title: "Is Enabled", + displayName: .init(true: "On", false: "Off") + ) var isEnabled: Bool static var parameterSummary: some ParameterSummary { @@ -227,9 +230,9 @@ struct RandomWebsiteIntent: AppIntent { } struct ToggleBrowsingModeIntent: AppIntent { - static let title: LocalizedStringResource = "Toggle Browsing Mode" + static let title: LocalizedStringResource = "Turn Browsing Mode On or Off" - static let description = IntentDescription("Toggles “Browsing Mode” for Nifro.") + static let description = IntentDescription("Turns “Browsing Mode” on or off in Nifro.") @MainActor func perform() async throws -> some IntentResult { diff --git a/Sources/Nifro/App/Shortcuts.swift b/Sources/Nifro/App/Shortcuts.swift index 602c96b..a884e38 100644 --- a/Sources/Nifro/App/Shortcuts.swift +++ b/Sources/Nifro/App/Shortcuts.swift @@ -60,7 +60,7 @@ enum Shortcut: String, CaseIterable { case .toggleEnabled: String(localized: "Turn Nifro on or off") case .browsingMode: - String(localized: "Browsing Mode — hold to use, tap to toggle") + String(localized: "Browsing Mode — hold to use, tap to turn on or off") case .toggleSound: String(localized: "Turn sound on or off") case .chooseRegion: diff --git a/Sources/Nifro/Localizable.xcstrings b/Sources/Nifro/Localizable.xcstrings index d929328..208c6bd 100644 --- a/Sources/Nifro/Localizable.xcstrings +++ b/Sources/Nifro/Localizable.xcstrings @@ -16,7 +16,7 @@ "zh-Hans": { "stringUnit": { "state": "translated", - "value": "${shouldToggle} Nifro ${isEnabled}" + "value": "将 Nifro ${shouldToggle}${isEnabled}" } } } @@ -317,12 +317,12 @@ } } }, - "Browsing Mode — hold to use, tap to toggle": { + "Browsing Mode — hold to use, tap to turn on or off": { "localizations": { "zh-Hans": { "stringUnit": { "state": "translated", - "value": "浏览模式:按住时使用,轻按切换" + "value": "浏览模式:按住时使用,轻按打开或关闭" } } } @@ -657,12 +657,12 @@ } } }, - "Double-click a website in the list to edit it, toggle dark mode, add custom CSS/JavaScript, and more.": { + "Double-click a website in the list to edit it, turn dark mode on or off, add custom CSS/JavaScript, and more.": { "localizations": { "zh-Hans": { "stringUnit": { "state": "translated", - "value": "在列表里双击一个网站即可编辑:切换深色模式、加自定义 CSS/JavaScript,等等。" + "value": "在列表里双击一个网站即可编辑:打开或关闭深色模式、加自定义 CSS/JavaScript,等等。" } } } @@ -1077,6 +1077,26 @@ } } }, + "Off": { + "localizations": { + "zh-Hans": { + "stringUnit": { + "state": "translated", + "value": "关闭" + } + } + } + }, + "On": { + "localizations": { + "zh-Hans": { + "stringUnit": { + "state": "translated", + "value": "打开" + } + } + } + }, "Its custom CSS, JavaScript, region and schedule go with it, you will be signed out of the site, and there is no undo.": { "localizations": { "zh-Hans": { @@ -1117,7 +1137,7 @@ } } }, - "Keep the website above all other windows while browsing mode is active.": { + "Keep the website above all other windows while Browsing Mode is active.": { "localizations": { "zh-Hans": { "stringUnit": { @@ -1362,7 +1382,7 @@ "zh-Hans": { "stringUnit": { "state": "translated", - "value": "Nifro 待在菜单栏靠右的位置。点它的图标,选“添加网站…”就可以开始了。\n\n需要登录网站或者和它交互时,用“浏览模式”。在那里做的一切都会记住,所以只需登录一次。\n\n不知道该放什么?同一个菜单里的“推荐站点…”列出了适合当壁纸的网页,每条都附带让它好用的设置。" + "value": "Nifro 待在菜单栏靠右的位置。点它的图标,选“添加网站…”就可以开始了。\n\n需要登录网站或者和它交互时,用“浏览模式”。在那里做的一切都会记住,所以只需登录一次。\n\n不知道该放什么?同一个菜单里的“网站库…”列出了适合当壁纸的网页,每条都附带让它好用的设置。" } } } @@ -1712,7 +1732,7 @@ "zh-Hans": { "stringUnit": { "state": "translated", - "value": "重新加载网站" + "value": "刷新网站" } } } @@ -1752,7 +1772,7 @@ "zh-Hans": { "stringUnit": { "state": "translated", - "value": "重新加载网站" + "value": "刷新网站" } } } @@ -1762,7 +1782,7 @@ "zh-Hans": { "stringUnit": { "state": "translated", - "value": "重新加载 Nifro 当前的网站。" + "value": "刷新 Nifro 当前的网站。" } } } @@ -2122,7 +2142,7 @@ "zh-Hans": { "stringUnit": { "state": "translated", - "value": "推荐站点" + "value": "网站库" } } } @@ -2132,7 +2152,7 @@ "zh-Hans": { "stringUnit": { "state": "translated", - "value": "推荐站点…" + "value": "网站库…" } } } @@ -2347,22 +2367,22 @@ } } }, - "Toggle": { + "Turn On or Off": { "localizations": { "zh-Hans": { "stringUnit": { "state": "translated", - "value": "切换" + "value": "打开或关闭" } } } }, - "Toggle Browsing Mode": { + "Turn Browsing Mode On or Off": { "localizations": { "zh-Hans": { "stringUnit": { "state": "translated", - "value": "切换浏览模式" + "value": "打开或关闭浏览模式" } } } @@ -2387,12 +2407,12 @@ } } }, - "Toggles “Browsing Mode” for Nifro.": { + "Turns “Browsing Mode” on or off in Nifro.": { "localizations": { "zh-Hans": { "stringUnit": { "state": "translated", - "value": "切换 Nifro 的「浏览模式」。" + "value": "打开或关闭 Nifro 的「浏览模式」。" } } } @@ -2402,7 +2422,7 @@ "zh-Hans": { "stringUnit": { "state": "translated", - "value": "切换" + "value": "设为" } } } @@ -2642,7 +2662,7 @@ "zh-Hans": { "stringUnit": { "state": "translated", - "value": "%lld 个站点 · 内置副本,连不上 GitHub" + "value": "%lld 个网站 · 内置副本,连不上 GitHub" } } } @@ -2652,7 +2672,7 @@ "zh-Hans": { "stringUnit": { "state": "translated", - "value": "%lld 个站点 · 已与 GitHub 同步" + "value": "%lld 个网站 · 已与 GitHub 同步" } } } diff --git a/Sources/Nifro/Screens/AddWebsiteScreen.swift b/Sources/Nifro/Screens/AddWebsiteScreen.swift index 17b522f..d695bf2 100644 --- a/Sources/Nifro/Screens/AddWebsiteScreen.swift +++ b/Sources/Nifro/Screens/AddWebsiteScreen.swift @@ -345,7 +345,7 @@ struct AddWebsiteScreen: View { // TODO: Find a better way to inform the user about this. Task { await NSAlert.show( - title: "Double-click a website in the list to edit it, toggle dark mode, add custom CSS/JavaScript, and more." + title: "Double-click a website in the list to edit it, turn dark mode on or off, add custom CSS/JavaScript, and more." ) } } diff --git a/Sources/Nifro/Screens/SettingsScreen.swift b/Sources/Nifro/Screens/SettingsScreen.swift index a14a917..878b679 100644 --- a/Sources/Nifro/Screens/SettingsScreen.swift +++ b/Sources/Nifro/Screens/SettingsScreen.swift @@ -537,7 +537,7 @@ private struct BringBrowsingModeToFrontSetting: View { // TODO: Find a better title for this. Defaults.Toggle(key: .bringBrowsingModeToFront) { Text("Keep Browsing Mode in front") - .explained(String(localized: "Keep the website above all other windows while browsing mode is active.")) + .explained(String(localized: "Keep the website above all other windows while Browsing Mode is active.")) } } }