Localized mac app

This commit is contained in:
Stuart Breckenridge
2023-01-04 12:33:38 +08:00
parent 2bca08195e
commit e670d610e3
61 changed files with 1051 additions and 300 deletions

View File

@@ -139,17 +139,17 @@ private extension AddFeedController {
func showAlreadySubscribedError(_ urlString: String) {
let alert = NSAlert()
alert.alertStyle = .informational
alert.messageText = NSLocalizedString("Already subscribed", comment: "Feed finder")
alert.informativeText = NSLocalizedString("Cant add this feed because youve already subscribed to it.", comment: "Feed finder")
alert.messageText = NSLocalizedString("alert.title.already-subscribed", comment: "Already subscribed")
alert.informativeText = NSLocalizedString("alert.message.already-subscribed", comment: "Cant add this feed because youve already subscribed to it.")
alert.beginSheetModal(for: hostWindow)
}
func showInitialDownloadError(_ error: Error) {
let alert = NSAlert()
alert.alertStyle = .informational
alert.messageText = NSLocalizedString("Download Error", comment: "Feed finder")
alert.messageText = NSLocalizedString("alert.title.download-error", comment: "Download Error")
let formatString = NSLocalizedString("Cant add this feed because of a download error: “%@", comment: "Feed finder")
let formatString = NSLocalizedString("alert.message.download-error.%@", comment: "Cant add this feed because of a download error: “%@”")
let errorText = NSString.localizedStringWithFormat(formatString as NSString, error.localizedDescription)
alert.informativeText = errorText as String
alert.beginSheetModal(for: hostWindow)
@@ -158,15 +158,15 @@ private extension AddFeedController {
func showNoFeedsErrorMessage() {
let alert = NSAlert()
alert.alertStyle = .informational
alert.messageText = NSLocalizedString("Feed not found", comment: "Feed finder")
alert.informativeText = NSLocalizedString("Cant add a feed because no feed was found.", comment: "Feed finder")
alert.messageText = NSLocalizedString("alert.title.feed-not-found", comment: "Feed not found")
alert.informativeText = NSLocalizedString("alert.message.feed-not-found", comment: "Cant add a feed because no feed was found.")
alert.beginSheetModal(for: hostWindow)
}
// MARK: Progress
func beginShowingProgress() {
runIndeterminateProgressWithMessage(NSLocalizedString("Finding feed", comment:"Feed finder"))
runIndeterminateProgressWithMessage(NSLocalizedString("label.text.finding-feed", comment:"Finding feed..."))
}
func endShowingProgress() {