First pass at adding support for localization to Managed Software Update.app; wrapped UI strings with NSLocalizedString().

git-svn-id: http://munki.googlecode.com/svn/trunk@916 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Greg Neagle
2010-11-16 18:27:03 +00:00
parent a7cc6e5457
commit 16210ce780
4 changed files with 124 additions and 50 deletions
@@ -109,7 +109,7 @@ class MSUStatusWindowController(NSObject):
self.window.setCanBecomeVisibleWithoutLogin_(True)
self.window.setLevel_(NSScreenSaverWindowLevel - 1)
self.window.center()
self.messageFld.setStringValue_(u"Starting…")
self.messageFld.setStringValue_(NSLocalizedString(u"Starting…", None))
self.detailFld.setStringValue_(u"")
self.stopBtn.setHidden_(False)
self.stopBtn.setEnabled_(True)
@@ -272,6 +272,12 @@ class MSUStatusWindowController(NSObject):
def doRestartAlert(self):
self.restartAlertDismissed = 0
alert = NSAlert.alertWithMessageText_defaultButton_alternateButton_otherButton_informativeTextWithFormat_(u"Restart Required", u"Restart", objc.nil, objc.nil, "Software installed or removed requires a restart. You will have a chance to save open documents.")
alert.beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_(self.window, self, self.alertDidEnd_returnCode_contextInfo_, objc.nil)
alert = NSAlert.alertWithMessageText_defaultButton_alternateButton_otherButton_informativeTextWithFormat_(
NSLocalizedString(u"Restart Required", None),
NSLocalizedString(u"Restart", None),
objc.nil,
objc.nil,
NSLocalizedString(u"Software installed or removed requires a restart. You will have a chance to save open documents.", None))
alert.beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_(
self.window, self, self.alertDidEnd_returnCode_contextInfo_, objc.nil)