From 12b8afbbb61e7b6073b46267fb84c90feb4e6a46 Mon Sep 17 00:00:00 2001 From: PathGao <42336971+PathGao@users.noreply.github.com> Date: Sat, 10 Oct 2026 19:14:37 +0800 Subject: [PATCH 1/2] Align Shortcuts, gallery and reload wording with the glossary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shortcuts say "Turn ... On or Off" instead of "Toggle", site is always 网站, Site Gallery is 网站库, Reload is 刷新, and the Browsing Mode help text capitalises the name. Intent type names are unchanged. --- Sources/Nifro/App/Intents.swift | 6 ++--- Sources/Nifro/Localizable.xcstrings | 30 +++++++++++----------- Sources/Nifro/Screens/SettingsScreen.swift | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Sources/Nifro/App/Intents.swift b/Sources/Nifro/App/Intents.swift index 9e2cb4f..058a679 100644 --- a/Sources/Nifro/App/Intents.swift +++ b/Sources/Nifro/App/Intents.swift @@ -68,7 +68,7 @@ struct SetEnabledStateIntent: AppIntent { @Parameter( title: "Action", - displayName: .init(true: "Toggle", false: "Turn") + displayName: .init(true: "Turn On or Off", false: "Turn") ) var shouldToggle: Bool @@ -227,9 +227,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/Localizable.xcstrings b/Sources/Nifro/Localizable.xcstrings index d929328..a086add 100644 --- a/Sources/Nifro/Localizable.xcstrings +++ b/Sources/Nifro/Localizable.xcstrings @@ -1117,7 +1117,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 +1362,7 @@ "zh-Hans": { "stringUnit": { "state": "translated", - "value": "Nifro 待在菜单栏靠右的位置。点它的图标,选“添加网站…”就可以开始了。\n\n需要登录网站或者和它交互时,用“浏览模式”。在那里做的一切都会记住,所以只需登录一次。\n\n不知道该放什么?同一个菜单里的“推荐站点…”列出了适合当壁纸的网页,每条都附带让它好用的设置。" + "value": "Nifro 待在菜单栏靠右的位置。点它的图标,选“添加网站…”就可以开始了。\n\n需要登录网站或者和它交互时,用“浏览模式”。在那里做的一切都会记住,所以只需登录一次。\n\n不知道该放什么?同一个菜单里的“网站库…”列出了适合当壁纸的网页,每条都附带让它好用的设置。" } } } @@ -1712,7 +1712,7 @@ "zh-Hans": { "stringUnit": { "state": "translated", - "value": "重新加载网站" + "value": "刷新网站" } } } @@ -1752,7 +1752,7 @@ "zh-Hans": { "stringUnit": { "state": "translated", - "value": "重新加载网站" + "value": "刷新网站" } } } @@ -1762,7 +1762,7 @@ "zh-Hans": { "stringUnit": { "state": "translated", - "value": "重新加载 Nifro 当前的网站。" + "value": "刷新 Nifro 当前的网站。" } } } @@ -2122,7 +2122,7 @@ "zh-Hans": { "stringUnit": { "state": "translated", - "value": "推荐站点" + "value": "网站库" } } } @@ -2132,7 +2132,7 @@ "zh-Hans": { "stringUnit": { "state": "translated", - "value": "推荐站点…" + "value": "网站库…" } } } @@ -2347,22 +2347,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 +2387,12 @@ } } }, - "Toggles “Browsing Mode” for Nifro.": { + "Turns “Browsing Mode” on or off in Nifro.": { "localizations": { "zh-Hans": { "stringUnit": { "state": "translated", - "value": "切换 Nifro 的「浏览模式」。" + "value": "打开或关闭 Nifro 的「浏览模式」。" } } } @@ -2642,7 +2642,7 @@ "zh-Hans": { "stringUnit": { "state": "translated", - "value": "%lld 个站点 · 内置副本,连不上 GitHub" + "value": "%lld 个网站 · 内置副本,连不上 GitHub" } } } @@ -2652,7 +2652,7 @@ "zh-Hans": { "stringUnit": { "state": "translated", - "value": "%lld 个站点 · 已与 GitHub 同步" + "value": "%lld 个网站 · 已与 GitHub 同步" } } } 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.")) } } } From 77e48bc0e57d4e50ff7f05c3430854c3e0935097 Mon Sep 17 00:00:00 2001 From: PathGao <42336971+PathGao@users.noreply.github.com> Date: Sat, 10 Oct 2026 19:16:47 +0800 Subject: [PATCH 2/2] Set Enabled State and two labels stop saying toggle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The action reads Turn On or Off Nifro / Turn Nifro On / Turn Nifro Off (打开或关闭 Nifro / 将 Nifro 设为打开 / 设为关闭). Parameter names are unchanged. --- Sources/Nifro/App/Intents.swift | 5 ++- Sources/Nifro/App/Shortcuts.swift | 2 +- Sources/Nifro/Localizable.xcstrings | 32 ++++++++++++++++---- Sources/Nifro/Screens/AddWebsiteScreen.swift | 2 +- 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/Sources/Nifro/App/Intents.swift b/Sources/Nifro/App/Intents.swift index 058a679..956702f 100644 --- a/Sources/Nifro/App/Intents.swift +++ b/Sources/Nifro/App/Intents.swift @@ -72,7 +72,10 @@ struct SetEnabledStateIntent: AppIntent { ) 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 { 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 a086add..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": { @@ -2402,7 +2422,7 @@ "zh-Hans": { "stringUnit": { "state": "translated", - "value": "切换" + "value": "设为" } } } 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." ) } }