From de26ed339f41529322d3894205d76f7f7be3906f Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Thu, 11 Jun 2026 10:37:44 -0700 Subject: [PATCH] Move Activity Log after Error Log in Settings. Give some strings explicit localization comments (instead of allowing auto-generation). --- .../Sources/ActivityLog/ActivityKind.swift | 10 ++--- .../Resources/Localizable.xcstrings | 21 ++++++++++ Shared/Localizable.xcstrings | 39 +++++-------------- iOS/Settings/ActivityLogView.swift | 8 ++-- iOS/Settings/ErrorLogView.swift | 4 +- iOS/Settings/Settings.storyboard | 34 ++++++++-------- iOS/Settings/SettingsViewController.swift | 8 ++-- 7 files changed, 63 insertions(+), 61 deletions(-) diff --git a/Modules/ActivityLog/Sources/ActivityLog/ActivityKind.swift b/Modules/ActivityLog/Sources/ActivityLog/ActivityKind.swift index a48a44dac..0b254dd92 100644 --- a/Modules/ActivityLog/Sources/ActivityLog/ActivityKind.swift +++ b/Modules/ActivityLog/Sources/ActivityLog/ActivityKind.swift @@ -119,7 +119,7 @@ public enum ActivityKind: Sendable, Hashable { } switch self { case .refreshFeedContent(let feedURL): - let format = NSLocalizedString("Refreshing feed: %@", bundle: .module, comment: "Activity kind — refreshing a feed; %@ is the feed name or URL") + let format = NSLocalizedString("Refreshing feed: %@", bundle: .module, comment: "Activity kind — refreshing a feed — %@ is the feed name or URL") return String(format: format, detail ?? feedURL) case .findFeed(let urlString): let format = NSLocalizedString("Finding feed %@", bundle: .module, comment: "Activity kind — finding a feed at %@ URL") @@ -128,16 +128,16 @@ public enum ActivityKind: Sendable, Hashable { let format = NSLocalizedString("Fetching %@", bundle: .module, comment: "Activity kind — fetching a candidate URL during feed finding") return String(format: format, urlString) case .downloadFeedImage(let feedURL): - let format = NSLocalizedString("Downloading image %@", bundle: .module, comment: "Activity kind — downloading a feed image; %@ is the URL") + let format = NSLocalizedString("Downloading image %@", bundle: .module, comment: "Activity kind — downloading a feed image — %@ is the URL") return String(format: format, feedURL) case .downloadFavicon(let faviconURL): - let format = NSLocalizedString("Downloading favicon %@", bundle: .module, comment: "Activity kind — downloading a favicon; %@ is the URL") + let format = NSLocalizedString("Downloading favicon %@", bundle: .module, comment: "Activity kind — downloading a favicon — %@ is the URL") return String(format: format, faviconURL) case .downloadAvatar(let avatarURL): - let format = NSLocalizedString("Downloading avatar %@", bundle: .module, comment: "Activity kind — downloading an author avatar; %@ is the URL") + let format = NSLocalizedString("Downloading avatar %@", bundle: .module, comment: "Activity kind — downloading an author avatar — %@ is the URL") return String(format: format, avatarURL) case .downloadHTMLMetadata(let urlString): - let format = NSLocalizedString("Downloading metadata %@", bundle: .module, comment: "Activity kind — downloading HTML metadata; %@ is the URL") + let format = NSLocalizedString("Downloading metadata %@", bundle: .module, comment: "Activity kind — downloading HTML metadata — %@ is the URL") return String(format: format, urlString) default: return "" diff --git a/Modules/ActivityLog/Sources/ActivityLog/Resources/Localizable.xcstrings b/Modules/ActivityLog/Sources/ActivityLog/Resources/Localizable.xcstrings index 6438c012e..fb33a5eaa 100644 --- a/Modules/ActivityLog/Sources/ActivityLog/Resources/Localizable.xcstrings +++ b/Modules/ActivityLog/Sources/ActivityLog/Resources/Localizable.xcstrings @@ -45,6 +45,18 @@ } } }, + "Downloading avatar %@" : { + "comment" : "Activity kind — downloading an author avatar — %@ is the URL" + }, + "Downloading favicon %@" : { + "comment" : "Activity kind — downloading a favicon — %@ is the URL" + }, + "Downloading image %@" : { + "comment" : "Activity kind — downloading a feed image — %@ is the URL" + }, + "Downloading metadata %@" : { + "comment" : "Activity kind — downloading HTML metadata — %@ is the URL" + }, "Exporting OPML" : { "comment" : "Activity kind", "localizations" : { @@ -89,6 +101,9 @@ } } }, + "Fetching %@" : { + "comment" : "Activity kind — fetching a candidate URL during feed finding" + }, "Fetching iCloud stats" : { "comment" : "Activity kind", "localizations" : { @@ -100,6 +115,9 @@ } } }, + "Finding feed %@" : { + "comment" : "Activity kind — finding a feed at %@ URL" + }, "HTML Metadata" : { "comment" : "Activity owner name", "localizations" : { @@ -155,6 +173,9 @@ } } }, + "Refreshing feed: %@" : { + "comment" : "Activity kind — refreshing a feed — %@ is the feed name or URL" + }, "Refreshing missing articles" : { "comment" : "Activity kind", "localizations" : { diff --git a/Shared/Localizable.xcstrings b/Shared/Localizable.xcstrings index b1aae3367..7541f4509 100644 --- a/Shared/Localizable.xcstrings +++ b/Shared/Localizable.xcstrings @@ -68,12 +68,13 @@ }, "Activity Log" : { - "comment" : "The title of the activity log.", - "isCommentAutoGenerated" : true + "comment" : "Activity Log screen title" + }, + "Activity Log Help" : { + "comment" : "Help link" }, "Activity may contain feed URLs and other information you may not want to share publicly." : { - "comment" : "A warning that the activity log may contain sensitive information.", - "isCommentAutoGenerated" : true + "comment" : "Activity log privacy warning" }, "Add Account" : { "comment" : "Add Account" @@ -333,27 +334,15 @@ "Downloading avatar" : { "comment" : "Downloading avatar" }, - "Downloading avatar %@" : { - "comment" : "Activity kind — downloading an author avatar; %@ is the URL" - }, "Downloading favicon" : { "comment" : "Downloading favicon" }, - "Downloading favicon %@" : { - "comment" : "Activity kind — downloading a favicon; %@ is the URL" - }, "Downloading image" : { "comment" : "Downloading image" }, - "Downloading image %@" : { - "comment" : "Activity kind — downloading a feed image; %@ is the URL" - }, "Downloading metadata" : { "comment" : "Downloading metadata" }, - "Downloading metadata %@" : { - "comment" : "Activity kind — downloading HTML metadata; %@ is the URL" - }, "Duplicate Theme" : { "comment" : "Duplicate Theme" }, @@ -372,6 +361,9 @@ "Error Log" : { "comment" : "Error Log window title" }, + "Error Log Help" : { + "comment" : "Help link" + }, "Errors may contain feed URLs and other information you may not want to share publicly." : { "comment" : "Error log privacy warning" }, @@ -429,9 +421,6 @@ "Fetching" : { "comment" : "Fetching" }, - "Fetching %@" : { - "comment" : "Activity kind — fetching a candidate URL during feed finding" - }, "Filter Read Articles" : { "comment" : "Filter Read Articles" }, @@ -450,9 +439,6 @@ "Finding feed" : { "comment" : "Finding feed" }, - "Finding feed %@" : { - "comment" : "Activity kind — finding a feed at %@ URL" - }, "Finding feed…" : { "comment" : "Feed finder" }, @@ -706,15 +692,13 @@ "comment" : "Next Unread Article" }, "No Activity Logged" : { - "comment" : "A title for a view that indicates that there is no activity log.", - "isCommentAutoGenerated" : true + "comment" : "Activity log empty state" }, "No current activity." : { "comment" : "Current Activity empty state" }, "No Errors Logged" : { - "comment" : "A title for a view that shows when there are no errors in the error log.", - "isCommentAutoGenerated" : true + "comment" : "Error log empty state" }, "No Icon Preview" : { "comment" : "No Icon Preview" @@ -813,9 +797,6 @@ "Refresh Scan" : { "comment" : "Refresh scan button" }, - "Refreshing feed: %@" : { - "comment" : "Activity kind — refreshing a feed; %@ is the feed name or URL" - }, "Remove" : { "comment" : "Remove" }, diff --git a/iOS/Settings/ActivityLogView.swift b/iOS/Settings/ActivityLogView.swift index 130e4a675..9fd71b3b9 100644 --- a/iOS/Settings/ActivityLogView.swift +++ b/iOS/Settings/ActivityLogView.swift @@ -22,7 +22,7 @@ struct ActivityLogView: View { var body: some View { VStack(spacing: 0) { if isEmpty { - ContentUnavailableView("No Activity Logged", systemImage: "checkmark.circle") + ContentUnavailableView(NSLocalizedString("No Activity Logged", comment: "Activity log empty state"), systemImage: "checkmark.circle") .frame(maxWidth: .infinity, maxHeight: .infinity) } else { privacyWarning @@ -38,7 +38,7 @@ struct ActivityLogView: View { Divider() helpLinkFooter } - .navigationTitle("Activity Log") + .navigationTitle(NSLocalizedString("Activity Log", comment: "Activity Log screen title")) .toolbar { ToolbarItem(placement: .topBarTrailing) { Button("Copy Contents") { @@ -59,14 +59,14 @@ struct ActivityLogView: View { } private var privacyWarning: some View { - Text("Activity may contain feed URLs and other information you may not want to share publicly.") + Text("Activity may contain feed URLs and other information you may not want to share publicly.", comment: "Activity log privacy warning") .font(.footnote) .foregroundStyle(.secondary) .padding() } private var helpLinkFooter: some View { - Button("Activity Log Help") { + Button(NSLocalizedString("Activity Log Help", comment: "Help link")) { showHelp = true } .font(.subheadline) diff --git a/iOS/Settings/ErrorLogView.swift b/iOS/Settings/ErrorLogView.swift index 523e629aa..083b0fcf2 100644 --- a/iOS/Settings/ErrorLogView.swift +++ b/iOS/Settings/ErrorLogView.swift @@ -22,7 +22,7 @@ struct ErrorLogView: View { var body: some View { VStack(spacing: 0) { if entries.isEmpty { - ContentUnavailableView("No Errors Logged", systemImage: "checkmark.circle") + ContentUnavailableView(NSLocalizedString("No Errors Logged", comment: "Error log empty state"), systemImage: "checkmark.circle") .frame(maxWidth: .infinity, maxHeight: .infinity) } else { privacyWarning @@ -75,7 +75,7 @@ struct ErrorLogView: View { } private var helpLinkFooter: some View { - Button("Error Log Help") { + Button(NSLocalizedString("Error Log Help", comment: "Help link")) { showHelp = true } .font(.subheadline) diff --git a/iOS/Settings/Settings.storyboard b/iOS/Settings/Settings.storyboard index 74967c268..e4e9bce70 100644 --- a/iOS/Settings/Settings.storyboard +++ b/iOS/Settings/Settings.storyboard @@ -482,6 +482,23 @@ + + + + + + + + + + + @@ -533,23 +550,6 @@ - - - - - - - - - - - diff --git a/iOS/Settings/SettingsViewController.swift b/iOS/Settings/SettingsViewController.swift index 864392770..2e10b1f04 100644 --- a/iOS/Settings/SettingsViewController.swift +++ b/iOS/Settings/SettingsViewController.swift @@ -30,10 +30,10 @@ final class SettingsViewController: UITableViewController { private enum TroubleshootingRow: Int { case errorLog = 0 - case accountStats = 1 - case dinosaurs = 2 - case cloudKitZoneStats = 3 - case activityLog = 4 + case activityLog = 1 + case accountStats = 2 + case dinosaurs = 3 + case cloudKitZoneStats = 4 } private enum FeedsRow: Int {