diff --git a/pyInstaller/English.lproj/InfoPlist.strings b/pyInstaller/English.lproj/InfoPlist.strings
index fe463ab0..903bcc5a 100755
Binary files a/pyInstaller/English.lproj/InfoPlist.strings and b/pyInstaller/English.lproj/InfoPlist.strings differ
diff --git a/pyInstaller/English.lproj/MainMenu.xib b/pyInstaller/English.lproj/MainMenu.xib
index 9de354a5..1f5efa1d 100755
--- a/pyInstaller/English.lproj/MainMenu.xib
+++ b/pyInstaller/English.lproj/MainMenu.xib
@@ -21,9 +21,9 @@
- {432, 248}
+ {610, 360}
_NS:1109
NSView
@@ -1155,6 +1155,14 @@
522
+
+
+ messageLabel
+
+
+
+ 523
+
@@ -1880,28 +1888,28 @@
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.QTKitIBPlugin
com.apple.InterfaceBuilder.CocoaPlugin
- {{132, 590}, {432, 248}}
+ {{132, 478}, {610, 360}}
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
- P4AAAL+AAABDLAAAw0gAAA
+ P4AAAL+AAABBoAAAw8UAAA
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
- P4AAAL+AAABDoQAAwmAAAA
+ P4AAAL+AAABD+gAAwpgAAA
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
- P4AAAL+AAABDo4AAwkwAAA
+ P4AAAL+AAABDzAAAwpgAAA
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
- P4AAAL+AAABBiAAAwkwAAA
+ P4AAAL+AAABDRwAAwo4AAA
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
@@ -1931,7 +1939,7 @@
- 522
+ 523
@@ -1979,6 +1987,7 @@
cancelButton
licenseTextView
licenseView
+ messageLabel
window
@@ -1988,6 +1997,7 @@
id
id
id
+ id
@@ -1998,6 +2008,7 @@
cancelButton
licenseTextView
licenseView
+ messageLabel
window
@@ -2018,6 +2029,10 @@
licenseView
id
+
+ messageLabel
+ id
+
window
id
diff --git a/pyInstaller/Info.plist b/pyInstaller/Info.plist
index ccf2e95b..9fd09e3d 100755
--- a/pyInstaller/Info.plist
+++ b/pyInstaller/Info.plist
@@ -7,9 +7,9 @@
CFBundleExecutable
${EXECUTABLE_NAME}
CFBundleIconFile
-
+ Lettuce
CFBundleIdentifier
- tw.com.kkbox.${PRODUCT_NAME:identifier}
+ org.openvanilla.${PRODUCT_NAME:identifier}
CFBundleInfoDictionaryVersion
6.0
CFBundleName
@@ -19,9 +19,15 @@
CFBundleShortVersionString
1.0
CFBundleSignature
- KKBX
+ OPVN
CFBundleVersion
1.0
+ LSHasLocalizedDisplayName
+
+ LSMinimumSystemVersion
+ 10.6.0
+ LSUIElement
+
NSMainNibFile
MainMenu
NSPrincipalClass
diff --git a/pyInstaller/Installer.xcodeproj/project.pbxproj b/pyInstaller/Installer.xcodeproj/project.pbxproj
index b3bf7ace..cd742454 100755
--- a/pyInstaller/Installer.xcodeproj/project.pbxproj
+++ b/pyInstaller/Installer.xcodeproj/project.pbxproj
@@ -15,6 +15,7 @@
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
D48D001D143868DA0050BDFF /* McBopomofo.app in Copy Files to Resource Folder */ = {isa = PBXBuildFile; fileRef = D48D0016143868A90050BDFF /* McBopomofo.app */; };
+ D48D00DF1438932E0050BDFF /* Lettuce.icns in Resources */ = {isa = PBXBuildFile; fileRef = D48D00DE1438932E0050BDFF /* Lettuce.icns */; };
D4CA5DAD14040B3300B58ED3 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4CA5DAC14040B3300B58ED3 /* QTKit.framework */; };
/* End PBXBuildFile section */
@@ -71,6 +72,8 @@
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
8D1107320486CEB800E47090 /* Installer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Installer.app; sourceTree = BUILT_PRODUCTS_DIR; };
D48D000F143868A90050BDFF /* Lettuce.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Lettuce.xcodeproj; path = ../Source/Lettuce.xcodeproj; sourceTree = SOURCE_ROOT; };
+ D48D00DC143892E80050BDFF /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/InfoPlist.strings"; sourceTree = ""; };
+ D48D00DE1438932E0050BDFF /* Lettuce.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = Lettuce.icns; path = ../Source/Images/Lettuce.icns; sourceTree = SOURCE_ROOT; };
D4CA5DAC14040B3300B58ED3 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = System/Library/Frameworks/QTKit.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
@@ -150,6 +153,7 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
+ D48D00DE1438932E0050BDFF /* Lettuce.icns */,
77C8C1F70C07829500965286 /* MainMenu.xib */,
8D1107310486CEB800E47090 /* Info.plist */,
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
@@ -212,6 +216,7 @@
Japanese,
French,
German,
+ "zh-Hant",
);
mainGroup = 29B97314FDCFA39411CA2CEA /* xcPROJECTNAMEASXMLxc */;
projectDirPath = "";
@@ -254,6 +259,7 @@
77631A3F0C0748CF005415CB /* main.py in Resources */,
7790198F0C07548A00326F66 /* InstallerAppDelegate.py in Resources */,
77C8C1F90C07829500965286 /* MainMenu.xib in Resources */,
+ D48D00DF1438932E0050BDFF /* Lettuce.icns in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -283,6 +289,7 @@
isa = PBXVariantGroup;
children = (
089C165DFE840E0CC02AAC07 /* English */,
+ D48D00DC143892E80050BDFF /* zh-Hant */,
);
name = InfoPlist.strings;
sourceTree = "";
diff --git a/pyInstaller/InstallerAppDelegate.py b/pyInstaller/InstallerAppDelegate.py
index 5f1c150f..49b1021c 100755
--- a/pyInstaller/InstallerAppDelegate.py
+++ b/pyInstaller/InstallerAppDelegate.py
@@ -2,22 +2,55 @@ from Foundation import *
from AppKit import *
import os, shutil, platform
+MIT_LICENSE = """Copyright (C) 2011 by OpenVanilla.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+"""
+
class InstallerAppDelegate(NSObject):
window = objc.IBOutlet()
licenseView = objc.IBOutlet()
licenseTextView = objc.IBOutlet()
+ messageLabel = objc.IBOutlet()
agreeButton = objc.IBOutlet()
cancelButton = objc.IBOutlet()
+
+ def awakeFromNib(self):
+ self.window.setDelegate_(self)
+ self.window.setTitle_(NSLocalizedString("OpenVanilla McBopomofo", ""))
+ self.agreeButton.setTitle_(NSLocalizedString("Agree", ""))
+ self.cancelButton.setTitle_(NSLocalizedString("Cancel", ""))
+ self.messageLabel.setStringValue_(NSLocalizedString("Do you agree with the license?", ""))
+ self.licenseTextView.textStorage().mutableString().setString_(MIT_LICENSE)
+
+ def windowWillClose_(self, notification):
+ NSApp.terminate_(self)
def checkOSVerion(self):
mac_version = platform.mac_ver()[0].split(".")
if int(mac_version[1]) < 6:
- NSRunAlertPanel("McBoPoMoFo requires on Mac OS X 10.6 or later verion.", "", "OK", None, None)
+ NSRunAlertPanel(NSLocalizedString("McBopomofo requires on Mac OS X 10.6 or later verion.", ""),
+ NSLocalizedString("Unable to install McBopomofo on your Mac.",""),
+ NSLocalizedString("OK", ""), None, None)
NSApp.terminate_(self)
def showLicenseWindow(self):
- self.licenseTextView.textStorage().mutableString().setString_("License")
windowFrame = self.window.frame()
windowFrame.size = self.licenseView.frame().size
windowFrame.size.height += 20.0
@@ -43,20 +76,26 @@ class InstallerAppDelegate(NSObject):
try:
shutil.rmtree(McBopomofoPath)
except:
- NSRunAlertPanel("Failed to remove existing application!", "", "OK", None, None)
+ NSRunAlertPanel(NSLocalizedString("Failed to install McBopomofo!", ""),
+ NSLocalizedString("Failed to remove existing installation.", ""),
+ NSLocalizedString("OK", ""), None, None)
try:
shutil.copytree(packagePath, McBopomofoPath)
except:
- NSRunAlertPanel("Failed to copy application!", "", "OK", None, None)
+ NSRunAlertPanel(NSLocalizedString("Failed to install McBopomofo!", ""),
+ NSLocalizedString("Failed to copy application.", ""),
+ NSLocalizedString("OK", ""), None, None)
NSApp.terminate_(self)
print McBopomofoPath
try:
call([os.path.join(McBopomofoPath, "Contents/MacOS/McBopomofo"), "install"])
except:
- NSRunAlertPanel("Failed to install McBopomofo!", "", "OK", None, None)
+ NSRunAlertPanel(NSLocalizedString("Failed to install McBopomofo!", ""), "", NSLocalizedString("OK", ""), None, None)
NSApp.terminate_(self)
- NSRunAlertPanel("Done!", "", "OK", None, None)
+ NSRunAlertPanel(NSLocalizedString("Done!", ""),
+ NSLocalizedString("OpenVanilla McBopomofo has been installed on your Mac.", ""),
+ NSLocalizedString("OK", ""), None, None)
NSApp.terminate_(self)
@objc.IBAction
diff --git a/pyInstaller/zh-Hant.lproj/InfoPlist.strings b/pyInstaller/zh-Hant.lproj/InfoPlist.strings
new file mode 100755
index 00000000..9bad44ea
Binary files /dev/null and b/pyInstaller/zh-Hant.lproj/InfoPlist.strings differ