Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions Sources/Nifro/App/Intents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Nifro/App/Shortcuts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
62 changes: 41 additions & 21 deletions Sources/Nifro/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"zh-Hans": {
"stringUnit": {
"state": "translated",
"value": "${shouldToggle} Nifro ${isEnabled}"
"value": "将 Nifro ${shouldToggle}${isEnabled}"
}
}
}
Expand Down Expand Up @@ -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": "浏览模式:按住时使用,轻按打开或关闭"
}
}
}
Expand Down Expand Up @@ -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,等等。"
}
}
}
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -1362,7 +1382,7 @@
"zh-Hans": {
"stringUnit": {
"state": "translated",
"value": "Nifro 待在菜单栏靠右的位置。点它的图标,选“添加网站…”就可以开始了。\n\n需要登录网站或者和它交互时,用“浏览模式”。在那里做的一切都会记住,所以只需登录一次。\n\n不知道该放什么?同一个菜单里的“推荐站点…”列出了适合当壁纸的网页,每条都附带让它好用的设置。"
"value": "Nifro 待在菜单栏靠右的位置。点它的图标,选“添加网站…”就可以开始了。\n\n需要登录网站或者和它交互时,用“浏览模式”。在那里做的一切都会记住,所以只需登录一次。\n\n不知道该放什么?同一个菜单里的“网站库…”列出了适合当壁纸的网页,每条都附带让它好用的设置。"
}
}
}
Expand Down Expand Up @@ -1712,7 +1732,7 @@
"zh-Hans": {
"stringUnit": {
"state": "translated",
"value": "重新加载网站"
"value": "刷新网站"
}
}
}
Expand Down Expand Up @@ -1752,7 +1772,7 @@
"zh-Hans": {
"stringUnit": {
"state": "translated",
"value": "重新加载网站"
"value": "刷新网站"
}
}
}
Expand All @@ -1762,7 +1782,7 @@
"zh-Hans": {
"stringUnit": {
"state": "translated",
"value": "重新加载 Nifro 当前的网站。"
"value": "刷新 Nifro 当前的网站。"
}
}
}
Expand Down Expand Up @@ -2122,7 +2142,7 @@
"zh-Hans": {
"stringUnit": {
"state": "translated",
"value": "推荐站点"
"value": "网站库"
}
}
}
Expand All @@ -2132,7 +2152,7 @@
"zh-Hans": {
"stringUnit": {
"state": "translated",
"value": "推荐站点…"
"value": "网站库…"
}
}
}
Expand Down Expand Up @@ -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": "打开或关闭浏览模式"
}
}
}
Expand All @@ -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 的「浏览模式」。"
}
}
}
Expand All @@ -2402,7 +2422,7 @@
"zh-Hans": {
"stringUnit": {
"state": "translated",
"value": "切换"
"value": "设为"
}
}
}
Expand Down Expand Up @@ -2642,7 +2662,7 @@
"zh-Hans": {
"stringUnit": {
"state": "translated",
"value": "%lld 个站点 · 内置副本,连不上 GitHub"
"value": "%lld 个网站 · 内置副本,连不上 GitHub"
}
}
}
Expand All @@ -2652,7 +2672,7 @@
"zh-Hans": {
"stringUnit": {
"state": "translated",
"value": "%lld 个站点 · 已与 GitHub 同步"
"value": "%lld 个网站 · 已与 GitHub 同步"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Nifro/Screens/AddWebsiteScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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."
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Nifro/Screens/SettingsScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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."))
}
}
}
Expand Down
Loading