diff --git a/code/apps/Managed Software Center/Managed Software Center/AlertController.py b/code/apps/Managed Software Center/Managed Software Center/AlertController.py index cb17988c..59f74b24 100644 --- a/code/apps/Managed Software Center/Managed Software Center/AlertController.py +++ b/code/apps/Managed Software Center/Managed Software Center/AlertController.py @@ -88,7 +88,7 @@ class AlertController(NSObject): self._force_warning_btns[NSAlertDefaultReturn], self._force_warning_btns[NSAlertAlternateReturn], nil, - infoText) + u"%@", infoText) alert.beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_( self.window, self, self.forceLogoutWarningDidEnd_returnCode_contextInfo_, nil) @@ -111,7 +111,7 @@ class AlertController(NSObject): NSLocalizedString(u"OK", u"OK button title"), nil, nil, - NSLocalizedString( + u"%@", NSLocalizedString( (u"There are additional pending updates to install or remove."), u"Additional Pending Updates detail")) alert.beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_( @@ -133,7 +133,7 @@ class AlertController(NSObject): NSLocalizedString(u"Log out and update", u"Log out and Update button text"), NSLocalizedString(u"Cancel", u"Cancel button title"), nil, - NSLocalizedString( + u"%@", NSLocalizedString( (u"A restart is required after updating. Please be patient " "as there may be a short delay at the login window. Log " "out and update now?"), u"Restart Required detail")) @@ -146,7 +146,7 @@ class AlertController(NSObject): NSLocalizedString(u"Log out and update", u"Log out and Update button text"), NSLocalizedString(u"Cancel", u"Cancel button title"), nil, - NSLocalizedString( + u"%@", NSLocalizedString( (u"A logout is required before updating. Please be patient " "as there may be a short delay at the login window. Log " "out and update now?"), u"Logout Required detail")) @@ -188,7 +188,7 @@ class AlertController(NSObject): NSLocalizedString(u"Cancel", u"Cancel button title"), nil, nil, - NSLocalizedString( + u"%@", NSLocalizedString( (u"There are other users logged into this computer.\n" "Updating now could cause other users to lose their " "work.\n\nPlease try again later after the other users " @@ -223,31 +223,30 @@ class AlertController(NSObject): if item['user'] != current_user] my_apps = [item['display_name'] for item in running_apps if item['user'] == current_user] + msulog.log("MSC", "conflicting_apps", ','.join(other_users_apps + my_apps)) if other_users_apps: + detailText = NSLocalizedString( + (u"Other logged in users are using the following applications. " + "Try updating later when they are no longer in use:\n\n%s"), + u"Other Users Blocking Apps Running detail") alert = NSAlert.alertWithMessageText_defaultButton_alternateButton_otherButton_informativeTextWithFormat_( NSLocalizedString( u"Applications in use by others", u"Other Users Blocking Apps Running title"), NSLocalizedString(u"OK", u'OKButtonText'), nil, nil, - NSLocalizedString( - (u"Other logged in users are using the following applications. " - "Try updating later when they are no longer in use:\n\n%s"), - u"Other Users Blocking Apps Running detail") - % '\n'.join(set(other_users_apps))) + u"%@", detailText % u'\n'.join(set(other_users_apps))) else: + detailText = NSLocalizedString((u"You must quit the following applications before " + "proceeding with installation or removal:\n\n%s"), + u"Blocking Apps Running detail") alert = NSAlert.alertWithMessageText_defaultButton_alternateButton_otherButton_informativeTextWithFormat_( NSLocalizedString( u"Conflicting applications running", u"Blocking Apps Running title"), NSLocalizedString(u"OK", u"OK button title"), nil, nil, - NSLocalizedString( - (u"You must quit the following applications before " - "proceeding with installation or removal:\n\n%s"), - u"Blocking Apps Running detail") - % '\n'.join(set(my_apps))) - msulog.log("MSC", "conflicting_apps", ','.join(other_users_apps + my_apps)) + u"%@", detailText % u'\n'.join(set(my_apps))) alert.beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_( self.window, self, self.blockingAppsRunningAlertDidEnd_returnCode_contextInfo_, @@ -329,7 +328,7 @@ class AlertController(NSObject): NSLocalizedString(u"Continue", u"Continue button text"), NSLocalizedString(u"Cancel", u"Cancel button title"), nil, - NSLocalizedString( + u"%@", NSLocalizedString( (u"For best results, you should connect your computer to a " "power source before updating. Are you sure you want to " "continue the update?"), u"No Power Source Warning detail")) diff --git a/code/apps/Managed Software Center/Managed Software Center/MSUMainWindowController.py b/code/apps/Managed Software Center/Managed Software Center/MSUMainWindowController.py index b3f7481a..549f629c 100644 --- a/code/apps/Managed Software Center/Managed Software Center/MSUMainWindowController.py +++ b/code/apps/Managed Software Center/Managed Software Center/MSUMainWindowController.py @@ -113,7 +113,7 @@ class MSUMainWindowController(NSWindowController): NSLocalizedString(u"Quit", u"Quit button title"), nil, NSLocalizedString(u"Update now", u"Update Now button title"), - alertDetail) + u"%@", alertDetail) alert.beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_( self.window(), self, self.updateAlertDidEnd_returnCode_contextInfo_, objc.nil) @@ -217,7 +217,7 @@ class MSUMainWindowController(NSWindowController): # show the alert sheet self.window().makeKeyAndOrderFront_(self) alert = NSAlert.alertWithMessageText_defaultButton_alternateButton_otherButton_informativeTextWithFormat_( - alertMessageText, OKButtonTitle, nil, nil, detailText) + alertMessageText, OKButtonTitle, nil, nil, u"%@", detailText) alert.beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_( self.window(), self, self.munkiSessionErrorAlertDidEnd_returnCode_contextInfo_, nil) diff --git a/code/apps/Managed Software Center/Managed Software Center/MSUStatusController.py b/code/apps/Managed Software Center/Managed Software Center/MSUStatusController.py index 2a4f7d64..efea8e2d 100644 --- a/code/apps/Managed Software Center/Managed Software Center/MSUStatusController.py +++ b/code/apps/Managed Software Center/Managed Software Center/MSUStatusController.py @@ -206,7 +206,7 @@ class MSUStatusController(NSObject): NSLocalizedString(u"Restart", u"Restart button title"), nil, nil, - NSLocalizedString( + u"%@", NSLocalizedString( u"Software installed or removed requires a restart. You will " "have a chance to save open documents.", u"Restart Required alert detail")) alert.beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_( @@ -222,7 +222,7 @@ class MSUStatusController(NSObject): def setMessage_(self, messageText): '''Display main status message''' - self._status_message = messageText + self._status_message = NSLocalizedString(messageText, None) document = self.statusWindowController.webView.mainFrameDocument() if document: spinner = document.getElementById_('updates-progress-spinner') @@ -236,7 +236,7 @@ class MSUStatusController(NSObject): def setDetail_(self, detailText): '''Display status detail''' - self._status_detail = detailText + self._status_detail = NSLocalizedString(detailText, None) document = self.statusWindowController.webView.mainFrameDocument() if document: spinner = document.getElementById_('updates-progress-spinner') diff --git a/code/apps/Managed Software Center/Managed Software Center/en.lproj/MainMenu.xib b/code/apps/Managed Software Center/Managed Software Center/en.lproj/MainMenu.xib index a339d350..8a2784ea 100644 --- a/code/apps/Managed Software Center/Managed Software Center/en.lproj/MainMenu.xib +++ b/code/apps/Managed Software Center/Managed Software Center/en.lproj/MainMenu.xib @@ -1,5 +1,5 @@ - + @@ -239,7 +239,7 @@