From 48fb3ebc1886591da18d2e65c9afe7992c603eba Mon Sep 17 00:00:00 2001 From: Ryan Dotson Date: Tue, 22 Oct 2019 19:58:05 +0900 Subject: [PATCH 1/2] Curled some quotes --- Frameworks/Account/AccountError.swift | 4 ++-- .../Feedly/FeedlyAccountDelegateError.swift | 22 +++++++++---------- .../AccountsPreferencesViewController.swift | 4 ++-- .../Account/SettingsDetailAccountView.swift | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Frameworks/Account/AccountError.swift b/Frameworks/Account/AccountError.swift index 480871f2b..2c7fdb720 100644 --- a/Frameworks/Account/AccountError.swift +++ b/Frameworks/Account/AccountError.swift @@ -28,7 +28,7 @@ public enum AccountError: LocalizedError { switch error { case TransportError.httpError(let status): if status == 401 { - let localizedText = NSLocalizedString("Your \"%@\" credentials are invalid or expired.", comment: "Invalid or expired") + let localizedText = NSLocalizedString("Your “%@” credentials are invalid or expired.", comment: "Invalid or expired") return NSString.localizedStringWithFormat(localizedText as NSString, account.nameForDisplay) as String } else { return unknownError(error, account) @@ -62,7 +62,7 @@ public enum AccountError: LocalizedError { } private func unknownError(_ error: Error, _ account: Account) -> String { - let localizedText = NSLocalizedString("An error occurred while processing the \"%@\" account: %@", comment: "Unknown error") + let localizedText = NSLocalizedString("An error occurred while processing the “%@” account: %@", comment: "Unknown error") return NSString.localizedStringWithFormat(localizedText as NSString, account.nameForDisplay, error.localizedDescription) as String } } diff --git a/Frameworks/Account/Feedly/FeedlyAccountDelegateError.swift b/Frameworks/Account/Feedly/FeedlyAccountDelegateError.swift index ed23a71cc..a77fcfe02 100644 --- a/Frameworks/Account/Feedly/FeedlyAccountDelegateError.swift +++ b/Frameworks/Account/Feedly/FeedlyAccountDelegateError.swift @@ -22,37 +22,37 @@ enum FeedlyAccountDelegateError: LocalizedError { var errorDescription: String? { switch self { case .notLoggedIn: - return NSLocalizedString("Please add the Feedly account again.", comment: "Feedly - Credentials not found.") + return NSLocalizedString("Please add the Feedly account again.", comment: "Feedly – Credentials not found.") case .unableToAddFolder(let name): - let template = NSLocalizedString("Could not create a folder named \"%@\".", comment: "Feedly - Could not create a folder/collection.") + let template = NSLocalizedString("Could not create a folder named “%@”.", comment: "Feedly – Could not create a folder/collection.") return String(format: template, name) case .unableToRenameFolder(let from, let to): - let template = NSLocalizedString("Could not rename \"%@\" to \"%@\".", comment: "Feedly - Could not rename a folder/collection.") + let template = NSLocalizedString("Could not rename “%@” to “%@”.", comment: "Feedly – Could not rename a folder/collection.") return String(format: template, from, to) case .unableToRemoveFolder(let name): - let template = NSLocalizedString("Could not remove the folder named \"%@\".", comment: "Feedly - Could not remove a folder/collection.") + let template = NSLocalizedString("Could not remove the folder named “%@”.", comment: "Feedly – Could not remove a folder/collection.") return String(format: template, name) case .unableToMoveFeedBetweenFolders(let feed, _, let to): - let template = NSLocalizedString("Could not move \"%@\" to \"%@\".", comment: "Feedly - Could not move a feed between folders/collections.") + let template = NSLocalizedString("Could not move “%@” to “%@”.", comment: "Feedly – Could not move a feed between folders/collections.") return String(format: template, feed.nameForDisplay, to.nameForDisplay) case .addFeedChooseFolder: - return NSLocalizedString("Please choose a folder to contain the feed.", comment: "Feedly - Feed can only be added to folders.") + return NSLocalizedString("Please choose a folder to contain the feed.", comment: "Feedly – Feed can only be added to folders.") case .addFeedInvalidFolder(let invalidFolder): - let template = NSLocalizedString("Feeds cannot be added to the \"%@\" folder.", comment: "Feedly - Feed can only be added to folders.") + let template = NSLocalizedString("Feeds cannot be added to the “%@” folder.", comment: "Feedly – Feed can only be added to folders.") return String(format: template, invalidFolder.nameForDisplay) case .unableToRenameFeed(let from, let to): - let template = NSLocalizedString("Could not rename \"%@\" to \"%@\".", comment: "Feedly - Could not rename a feed.") + let template = NSLocalizedString("Could not rename “%@” to “%@”.", comment: "Feedly – Could not rename a feed.") return String(format: template, from, to) case .unableToRemoveFeed(let feed): - let template = NSLocalizedString("Could not remove \"%@\".", comment: "Feedly - Could not remove a feed.") + let template = NSLocalizedString("Could not remove “%@”.", comment: "Feedly – Could not remove a feed.") return String(format: template, feed.nameForDisplay) } } @@ -72,14 +72,14 @@ enum FeedlyAccountDelegateError: LocalizedError { return nil case .unableToMoveFeedBetweenFolders(let feed, let from, let to): - let template = NSLocalizedString("\"%@\" may be in both \"%@\" and \"%@\".", comment: "Feedly - Could not move a feed between folders/collections.") + let template = NSLocalizedString("“%@” may be in both “%@” and “%@”.", comment: "Feedly – Could not move a feed between folders/collections.") return String(format: template, feed.nameForDisplay, from.nameForDisplay, to.nameForDisplay) case .addFeedChooseFolder: return nil case .addFeedInvalidFolder: - return NSLocalizedString("Please choose a different folder to contain the feed.", comment: "Feedly - Feed can only be added to folders recovery suggestion.") + return NSLocalizedString("Please choose a different folder to contain the feed.", comment: "Feedly – Feed can only be added to folders recovery suggestion.") case .unableToRemoveFeed: return nil diff --git a/Mac/Preferences/Accounts/AccountsPreferencesViewController.swift b/Mac/Preferences/Accounts/AccountsPreferencesViewController.swift index cfc540d09..5c5022610 100644 --- a/Mac/Preferences/Accounts/AccountsPreferencesViewController.swift +++ b/Mac/Preferences/Accounts/AccountsPreferencesViewController.swift @@ -52,8 +52,8 @@ final class AccountsPreferencesViewController: NSViewController { let alert = NSAlert() alert.alertStyle = .warning let deletePrompt = NSLocalizedString("Delete", comment: "Delete") - alert.messageText = "\(deletePrompt) \"\(acctName)\"?" - alert.informativeText = NSLocalizedString("Are you sure you want to delete the account \"\(acctName)\"? This can not be undone.", comment: "Delete text") + alert.messageText = "\(deletePrompt) “\(acctName)”?" + alert.informativeText = NSLocalizedString("Are you sure you want to delete the account “\(acctName)”? This can not be undone.", comment: "Delete text") alert.addButton(withTitle: NSLocalizedString("Delete", comment: "Delete Account")) alert.addButton(withTitle: NSLocalizedString("Cancel", comment: "Cancel Delete Account")) diff --git a/iOS/Settings/Account/SettingsDetailAccountView.swift b/iOS/Settings/Account/SettingsDetailAccountView.swift index f67b29833..8fc673c93 100644 --- a/iOS/Settings/Account/SettingsDetailAccountView.swift +++ b/iOS/Settings/Account/SettingsDetailAccountView.swift @@ -53,7 +53,7 @@ struct SettingsDetailAccountView : View { Text("Delete Account").foregroundColor(.red) } .alert(isPresented: $isDeleteAlertPresented) { - Alert(title: Text("Are you sure you want to delete \"\(viewModel.nameForDisplay)\"?"), + Alert(title: Text("Are you sure you want to delete “\(viewModel.nameForDisplay)”?"), primaryButton: Alert.Button.default(Text("Delete"), action: { self.viewModel.delete() self.presentation.wrappedValue.dismiss() From 2f00285197467cebc96fb04094b3a5f25fdf3a39 Mon Sep 17 00:00:00 2001 From: Daniel Jalkut Date: Tue, 22 Oct 2019 10:49:32 -0400 Subject: [PATCH 2/2] Add missing xcconfig file for MAS version of Safari extension. --- ...afariextension_target_macappstore.xcconfig | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 xcconfig/NetNewsWire_safariextension_target_macappstore.xcconfig diff --git a/xcconfig/NetNewsWire_safariextension_target_macappstore.xcconfig b/xcconfig/NetNewsWire_safariextension_target_macappstore.xcconfig new file mode 100644 index 000000000..c9f4822a1 --- /dev/null +++ b/xcconfig/NetNewsWire_safariextension_target_macappstore.xcconfig @@ -0,0 +1,44 @@ +CODE_SIGN_IDENTITY[config=Release] = 3rd Party Mac Developer Application +CODE_SIGN_IDENTITY[config=Debug] = - +DEVELOPMENT_TEAM = M8L2WTLA8W +CODE_SIGN_STYLE = Manual +ORGANIZATION_IDENTIFIER = com.ranchero +PROVISIONING_PROFILE_SPECIFIER = + +// developers can locally override the Xcode settings for code signing +// by creating a DeveloperSettings.xcconfig file locally at the appropriate path +// This allows a pristine project to have code signing set up with the appropriate +// developer ID and certificates, and for dev to be able to have local settings +// without needing to check in anything into source control +// +// As an example, make a ../../SharedXcodeSettings/DeveloperSettings.xcconfig file and +// give it the contents +// +// CODE_SIGN_IDENTITY[sdk=macosx*] = Mac Developer +// CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer +// CODE_SIGN_IDENTITY[sdk=iphonesimulator*] = iPhone Developer +// DEVELOPMENT_TEAM = +// ORGANIZATION_IDENTIFIER = +// CODE_SIGN_STYLE = Automatic +// PROVISIONING_PROFILE_SPECIFIER = +// +// And you should be able to build without code signing errors and without modifying +// the NetNewsWire Xcode project. +// +// Example: if your NetNewsWire Xcode project file is at +// /Users/Shared/git/NetNewsWire/NetNewsWire.xcodeproj +// create your DeveloperSettings.xcconfig file at +// /Users/Shared/git/SharedXcodeSettings/DeveloperSettings.xcconfig +// + +#include? "../../SharedXcodeSettings/DeveloperSettings.xcconfig" +#include "./common/NetNewsWire_mac_target_common.xcconfig" + +CODE_SIGN_ENTITLEMENTS = Mac/SafariExtension/Subscribe_to_Feed.entitlements +INFOPLIST_FILE = Mac/SafariExtension/Info.plist +LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks +PRODUCT_BUNDLE_IDENTIFIER = $(ORGANIZATION_IDENTIFIER).NetNewsWire-Evergreen.MAS.Subscribe-to-Feed +PRODUCT_NAME = $(TARGET_NAME) +OTHER_SWIFT_FLAGS = -DMAC_APP_STORE $(inherited) + +SDKROOT = macosx