From 669c369ce7264193335bc7648effc59f33c804d7 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sun, 18 Apr 2021 12:06:34 -0700 Subject: [PATCH 1/4] Add missing localization strings to Sparkle.strings --- Sparkle/Base.lproj/Sparkle.strings | 25 +++++++++++++++++++++++++ Sparkle/SPUBasicUpdateDriver.m | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Sparkle/Base.lproj/Sparkle.strings b/Sparkle/Base.lproj/Sparkle.strings index 48acd4d4..40e1021a 100644 --- a/Sparkle/Base.lproj/Sparkle.strings +++ b/Sparkle/Base.lproj/Sparkle.strings @@ -14,6 +14,22 @@ "%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ is currently the newest version available.\n(You are currently running version %3$@.)"; +"No valid update information could be loaded." = "No valid update information could be loaded."; + +"No new update has been checked because the installation will require interaction, which has been prevented." = "No new update has been checked because the installation will require interaction, which has been prevented."; + +"A new update is available but cannot be installed because interaction has been prevented." = "A new update is available but cannot be installed because interaction has been prevented."; + +"An error occurred while running the updater. Please try again later." = "An error occurred while running the updater. Please try again later."; + +"An error occurred while encoding the installer parameters. Please try again later." = "An error occurred while encoding the installer parameters. Please try again later."; + +"An error occurred while starting the installer. Please try again later." = "An error occurred while starting the installer. Please try again later."; + +"An error occurred while connecting to the installer. Please try again later." = "An error occurred while connecting to the installer. Please try again later."; + +"An error occurred while launching the installer. Please try again later." = "An error occurred while launching the installer. Please try again later."; + "Update Installed" = "Update Installed"; "%@ is now updated to version %@!" = "%@ is now updated to version %@!"; @@ -26,6 +42,9 @@ /* Description text for SUUpdateAlert when the update informational with no download. */ "%@ %@ is now available--you have %@. Would you like to learn more about this update on the web?" = "%1$@ %2$@ is now available—you have %3$@. Would you like to learn more about this update on the web?"; +/* Critical downloadable update */ +"%@ %@ is now available--you have %@. This is an important update; would you like to download it now?" = "%1$@ %2$@ is now available--you have %3$@. This is an important update; would you like to download it now?"; + "%@ downloaded" = "%@ downloaded"; "%@ of %@" = "%1$@ of %2$@"; @@ -44,6 +63,10 @@ "An error occurred while parsing the update feed." = "An error occurred while parsing the update feed."; +"An error occurred while downloading the update feed." = "An error occurred while downloading the update feed."; + +"Failed to resume installing update." = "Failed to resume installing update."; + "An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@." = "An error occurred while relaunching %1$@, but the new version will be available next time you run %1$@."; "An important update to %@ is ready to install" = "An important update to %@ is ready to install"; @@ -68,6 +91,8 @@ "Install and Relaunch" = "Install and Relaunch"; +"Install on Quit" = "Install on Quit"; + /* Take care not to overflow the status window. */ "Installing update..." = "Installing update…"; diff --git a/Sparkle/SPUBasicUpdateDriver.m b/Sparkle/SPUBasicUpdateDriver.m index fa072a6b..49929c1a 100644 --- a/Sparkle/SPUBasicUpdateDriver.m +++ b/Sparkle/SPUBasicUpdateDriver.m @@ -187,7 +187,7 @@ } else { localizedDescription = SULocalizedString(@"Update Error!", nil); recoverySuggestion = SULocalizedString(@"No valid update information could be loaded.", nil); - recoveryOption = @"Cancel Update"; + recoveryOption = SULocalizedString(@"Cancel Update", nil); } NSError *notFoundError = From c7ff8f4bb09b3b0ff681a9bac0ddddcddcdb4a25 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sun, 18 Apr 2021 12:11:46 -0700 Subject: [PATCH 2/4] Add Install on Quit localizations from automatic alert from 1.x --- Sparkle/ca.lproj/Sparkle.strings | 2 ++ Sparkle/cs.lproj/Sparkle.strings | 2 ++ Sparkle/he.lproj/Sparkle.strings | 2 ++ 3 files changed, 6 insertions(+) diff --git a/Sparkle/ca.lproj/Sparkle.strings b/Sparkle/ca.lproj/Sparkle.strings index 9e87bd64..f3980c83 100644 --- a/Sparkle/ca.lproj/Sparkle.strings +++ b/Sparkle/ca.lproj/Sparkle.strings @@ -42,6 +42,8 @@ "Install and Relaunch" = "Instal·la i reinicia"; +"Install on Quit" = "Reinicia el programa més tard"; + "Installing update..." = "Instal·lant l'actualització…"; "No" = "No"; diff --git a/Sparkle/cs.lproj/Sparkle.strings b/Sparkle/cs.lproj/Sparkle.strings index 666980ba..6a4ab85c 100644 --- a/Sparkle/cs.lproj/Sparkle.strings +++ b/Sparkle/cs.lproj/Sparkle.strings @@ -62,6 +62,8 @@ "Install and Relaunch" = "Instalovat a znovu spustit"; +"Install on Quit" = "Instalovat a ukončit"; + /* Take care not to overflow the status window. */ "Installing update..." = "Instaluje se aktualizace…"; diff --git a/Sparkle/he.lproj/Sparkle.strings b/Sparkle/he.lproj/Sparkle.strings index 8815b76b..ca82ce84 100644 --- a/Sparkle/he.lproj/Sparkle.strings +++ b/Sparkle/he.lproj/Sparkle.strings @@ -40,6 +40,8 @@ "Install and Relaunch" = "התקן ואתחל"; +"Install on Quit" = "אתחל מאוחר יותר"; + "Installing update..." = "מתקין עידכון…"; "No" = "לא"; From e8f41640dce38c0bdd126236f915d46e5473841e Mon Sep 17 00:00:00 2001 From: Zorg Date: Sun, 18 Apr 2021 18:54:05 -0700 Subject: [PATCH 3/4] Comment which localizations are rare/unlikely --- Sparkle/Base.lproj/Sparkle.strings | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sparkle/Base.lproj/Sparkle.strings b/Sparkle/Base.lproj/Sparkle.strings index 40e1021a..22dade56 100644 --- a/Sparkle/Base.lproj/Sparkle.strings +++ b/Sparkle/Base.lproj/Sparkle.strings @@ -14,14 +14,18 @@ "%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ is currently the newest version available.\n(You are currently running version %3$@.)"; +/* An appcast feed error when checking for updates and no appcast items are retrieved */ "No valid update information could be loaded." = "No valid update information could be loaded."; +/* An installer error that is rare to occur when the updater opts into preventing interaction; may not be worthwhile translating */ "No new update has been checked because the installation will require interaction, which has been prevented." = "No new update has been checked because the installation will require interaction, which has been prevented."; +/* An installer error that is rare to occur when the updater opts into preventing interaction; may not be worthwhile translating */ "A new update is available but cannot be installed because interaction has been prevented." = "A new update is available but cannot be installed because interaction has been prevented."; "An error occurred while running the updater. Please try again later." = "An error occurred while running the updater. Please try again later."; +/* An installer error that is rare to occur; may not be worthwhile translating */ "An error occurred while encoding the installer parameters. Please try again later." = "An error occurred while encoding the installer parameters. Please try again later."; "An error occurred while starting the installer. Please try again later." = "An error occurred while starting the installer. Please try again later."; From ce70a30be56f73844c0cc4334291427d8b085ae6 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sun, 18 Apr 2021 19:00:58 -0700 Subject: [PATCH 4/4] Don't localize rare/unlikely/specific scenario error strings --- Sparkle/Base.lproj/Sparkle.strings | 9 --------- Sparkle/SPUCoreBasedUpdateDriver.m | 4 ++-- Sparkle/SPUInstallerDriver.m | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/Sparkle/Base.lproj/Sparkle.strings b/Sparkle/Base.lproj/Sparkle.strings index 22dade56..0c503e0d 100644 --- a/Sparkle/Base.lproj/Sparkle.strings +++ b/Sparkle/Base.lproj/Sparkle.strings @@ -17,17 +17,8 @@ /* An appcast feed error when checking for updates and no appcast items are retrieved */ "No valid update information could be loaded." = "No valid update information could be loaded."; -/* An installer error that is rare to occur when the updater opts into preventing interaction; may not be worthwhile translating */ -"No new update has been checked because the installation will require interaction, which has been prevented." = "No new update has been checked because the installation will require interaction, which has been prevented."; - -/* An installer error that is rare to occur when the updater opts into preventing interaction; may not be worthwhile translating */ -"A new update is available but cannot be installed because interaction has been prevented." = "A new update is available but cannot be installed because interaction has been prevented."; - "An error occurred while running the updater. Please try again later." = "An error occurred while running the updater. Please try again later."; -/* An installer error that is rare to occur; may not be worthwhile translating */ -"An error occurred while encoding the installer parameters. Please try again later." = "An error occurred while encoding the installer parameters. Please try again later."; - "An error occurred while starting the installer. Please try again later." = "An error occurred while starting the installer. Please try again later."; "An error occurred while connecting to the installer. Please try again later." = "An error occurred while connecting to the installer. Please try again later."; diff --git a/Sparkle/SPUCoreBasedUpdateDriver.m b/Sparkle/SPUCoreBasedUpdateDriver.m index 68fed439..2b36f0c3 100644 --- a/Sparkle/SPUCoreBasedUpdateDriver.m +++ b/Sparkle/SPUCoreBasedUpdateDriver.m @@ -102,7 +102,7 @@ // Otherwise check if we have sufficient privileges to update without interaction [self.installerDriver checkIfApplicationInstallationRequiresAuthorizationWithReply:^(BOOL requiresAuthorization) { if (requiresAuthorization) { - reply([NSError errorWithDomain:SUSparkleErrorDomain code:SUNotAllowedInteractionError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:SULocalizedString(@"No new update has been checked because the installation will require interaction, which has been prevented.", nil)] }]); + reply([NSError errorWithDomain:SUSparkleErrorDomain code:SUNotAllowedInteractionError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"No new update has been checked because the installation will require interaction, which has been prevented."] }]); } else { reply(nil); } @@ -161,7 +161,7 @@ // Package type installations will always require installer interaction as long as we don't support running as root // If it's not a package type installation, we should be okay since we did an auth check before checking for updates above if (![updateItem.installationType isEqualToString:SPUInstallationTypeApplication]) { - [self.delegate coreDriverIsRequestingAbortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUNotAllowedInteractionError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:SULocalizedString(@"A new update is available but cannot be installed because interaction has been prevented.", nil)] }]]; + [self.delegate coreDriverIsRequestingAbortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUNotAllowedInteractionError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"A new update is available but cannot be installed because interaction has been prevented."] }]]; } else { [self.delegate basicDriverDidFindUpdateWithAppcastItem:updateItem preventsAutoupdate:preventsAutoupdate]; } diff --git a/Sparkle/SPUInstallerDriver.m b/Sparkle/SPUInstallerDriver.m index 92797933..51bb1e2b 100644 --- a/Sparkle/SPUInstallerDriver.m +++ b/Sparkle/SPUInstallerDriver.m @@ -189,7 +189,7 @@ NSData *archivedData = SPUArchiveRootObjectSecurely(installationData); if (archivedData == nil) { - [self.delegate installerIsRequestingAbortInstallWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:@{ NSLocalizedDescriptionKey:SULocalizedString(@"An error occurred while encoding the installer parameters. Please try again later.", nil) }]]; + [self.delegate installerIsRequestingAbortInstallWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:@{ NSLocalizedDescriptionKey:@"An error occurred while encoding the installer parameters. Please try again later." }]]; return; }