From 82f1ad1f55f65100d57e8401a8715c3f1dd0bd8d Mon Sep 17 00:00:00 2001 From: Kevin <> Date: Thu, 4 Apr 2019 10:37:11 +0800 Subject: [PATCH 1/4] Add launch at login support --- LaunchHelper/AppDelegate.h | 15 ++ LaunchHelper/AppDelegate.m | 43 +++++ .../AppIcon.appiconset/Contents.json | 58 +++++++ LaunchHelper/Assets.xcassets/Contents.json | 6 + LaunchHelper/Base.lproj/MainMenu.xib | 17 ++ LaunchHelper/Info.plist | 32 ++++ LaunchHelper/LaunchHelper.entitlements | 10 ++ LaunchHelper/main.m | 13 ++ V2RayX.xcodeproj/project.pbxproj | 148 ++++++++++++++++++ V2RayX/AppDelegate.h | 4 +- V2RayX/AppDelegate.m | 28 +++- V2RayX/Base.lproj/MainMenu.xib | 11 +- V2RayX/ConfigWindow.xib | 8 +- V2RayX/Info.plist | 2 +- 14 files changed, 383 insertions(+), 12 deletions(-) create mode 100644 LaunchHelper/AppDelegate.h create mode 100644 LaunchHelper/AppDelegate.m create mode 100644 LaunchHelper/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 LaunchHelper/Assets.xcassets/Contents.json create mode 100644 LaunchHelper/Base.lproj/MainMenu.xib create mode 100644 LaunchHelper/Info.plist create mode 100644 LaunchHelper/LaunchHelper.entitlements create mode 100644 LaunchHelper/main.m diff --git a/LaunchHelper/AppDelegate.h b/LaunchHelper/AppDelegate.h new file mode 100644 index 0000000..99f0681 --- /dev/null +++ b/LaunchHelper/AppDelegate.h @@ -0,0 +1,15 @@ +// +// AppDelegate.h +// LaunchHelper +// +// Created by Kevin on 2019/4/4. +// Copyright © 2019 Project V2Ray. All rights reserved. +// + +#import + +@interface AppDelegate : NSObject + + +@end + diff --git a/LaunchHelper/AppDelegate.m b/LaunchHelper/AppDelegate.m new file mode 100644 index 0000000..b058ded --- /dev/null +++ b/LaunchHelper/AppDelegate.m @@ -0,0 +1,43 @@ +// +// AppDelegate.m +// LaunchHelper +// +// Created by Kevin on 2019/4/4. +// Copyright © 2019 Project V2Ray. All rights reserved. +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@property (weak) IBOutlet NSWindow *window; +@end + +@implementation AppDelegate + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + // Insert code here to initialize your application + NSLog(@"V2RayX LaunchHelper"); + + NSWorkspace* ws = [NSWorkspace sharedWorkspace]; + BOOL bLaunched = NO; + bLaunched = [ws launchApplication: @"/Applications/V2RayX.app"]; + if (!bLaunched) { + bLaunched = [ws launchApplication: @"V2RayX.app"]; + } + if (!bLaunched) { + NSArray *pathComponents = [[[NSBundle mainBundle] bundlePath] pathComponents]; + pathComponents = [pathComponents subarrayWithRange:NSMakeRange(0, [pathComponents count] - 4)]; + NSString *path = [NSString pathWithComponents:pathComponents]; + [[NSWorkspace sharedWorkspace] launchApplication:path]; + } + [NSApp terminate:nil]; +} + + +- (void)applicationWillTerminate:(NSNotification *)aNotification { + // Insert code here to tear down your application +} + + +@end diff --git a/LaunchHelper/Assets.xcassets/AppIcon.appiconset/Contents.json b/LaunchHelper/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2db2b1c --- /dev/null +++ b/LaunchHelper/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/LaunchHelper/Assets.xcassets/Contents.json b/LaunchHelper/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/LaunchHelper/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/LaunchHelper/Base.lproj/MainMenu.xib b/LaunchHelper/Base.lproj/MainMenu.xib new file mode 100644 index 0000000..a6404f4 --- /dev/null +++ b/LaunchHelper/Base.lproj/MainMenu.xib @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/LaunchHelper/Info.plist b/LaunchHelper/Info.plist new file mode 100644 index 0000000..0c5d5d5 --- /dev/null +++ b/LaunchHelper/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2019 Project V2Ray. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/LaunchHelper/LaunchHelper.entitlements b/LaunchHelper/LaunchHelper.entitlements new file mode 100644 index 0000000..f2ef3ae --- /dev/null +++ b/LaunchHelper/LaunchHelper.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/LaunchHelper/main.m b/LaunchHelper/main.m new file mode 100644 index 0000000..d030851 --- /dev/null +++ b/LaunchHelper/main.m @@ -0,0 +1,13 @@ +// +// main.m +// LaunchHelper +// +// Created by Kevin on 2019/4/4. +// Copyright © 2019 Project V2Ray. All rights reserved. +// + +#import + +int main(int argc, const char * argv[]) { + return NSApplicationMain(argc, argv); +} diff --git a/V2RayX.xcodeproj/project.pbxproj b/V2RayX.xcodeproj/project.pbxproj index c3cb76c..b743473 100644 --- a/V2RayX.xcodeproj/project.pbxproj +++ b/V2RayX.xcodeproj/project.pbxproj @@ -7,6 +7,11 @@ objects = { /* Begin PBXBuildFile section */ + 0A164CA4225599DD00076EB1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A164CA3225599DD00076EB1 /* AppDelegate.m */; }; + 0A164CA6225599DE00076EB1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0A164CA5225599DE00076EB1 /* Assets.xcassets */; }; + 0A164CA9225599DE00076EB1 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0A164CA7225599DE00076EB1 /* MainMenu.xib */; }; + 0A164CAC225599DE00076EB1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A164CAB225599DE00076EB1 /* main.m */; }; + 0A164CB322559CC400076EB1 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A164CB222559CC300076EB1 /* SystemConfiguration.framework */; }; 9504C07D1C662C3000352520 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9504C07C1C662C3000352520 /* AppDelegate.m */; }; 9504C0801C662C3000352520 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9504C07F1C662C3000352520 /* main.m */; }; 9504C0821C662C3000352520 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9504C0811C662C3000352520 /* Assets.xcassets */; }; @@ -83,6 +88,15 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 0A164CA0225599DD00076EB1 /* LaunchHelper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LaunchHelper.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 0A164CA2225599DD00076EB1 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 0A164CA3225599DD00076EB1 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 0A164CA5225599DE00076EB1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 0A164CA8225599DE00076EB1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 0A164CAA225599DE00076EB1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0A164CAB225599DE00076EB1 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 0A164CAD225599DE00076EB1 /* LaunchHelper.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = LaunchHelper.entitlements; sourceTree = ""; }; + 0A164CB222559CC300076EB1 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; 9504C0781C662C3000352520 /* V2RayX.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = V2RayX.app; sourceTree = BUILT_PRODUCTS_DIR; }; 9504C07B1C662C3000352520 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 9504C07C1C662C3000352520 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; @@ -158,10 +172,18 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 0A164C9D225599DD00076EB1 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 9504C0751C662C3000352520 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 0A164CB322559CC400076EB1 /* SystemConfiguration.framework in Frameworks */, 95A143CC1C87FCDC008756B9 /* Cocoa.framework in Frameworks */, 9504C0C11C662D9400352520 /* libz.tbd in Frameworks */, ); @@ -184,11 +206,26 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 0A164CA1225599DD00076EB1 /* LaunchHelper */ = { + isa = PBXGroup; + children = ( + 0A164CA2225599DD00076EB1 /* AppDelegate.h */, + 0A164CA3225599DD00076EB1 /* AppDelegate.m */, + 0A164CA5225599DE00076EB1 /* Assets.xcassets */, + 0A164CA7225599DE00076EB1 /* MainMenu.xib */, + 0A164CAA225599DE00076EB1 /* Info.plist */, + 0A164CAB225599DE00076EB1 /* main.m */, + 0A164CAD225599DE00076EB1 /* LaunchHelper.entitlements */, + ); + path = LaunchHelper; + sourceTree = ""; + }; 9504C06F1C662C3000352520 = { isa = PBXGroup; children = ( 95862BD41DB2862E00F4A9CA /* compilefromsource.sh */, 9D7DFE521EBEC947001FECBD /* jsonplist */, + 0A164CA1225599DD00076EB1 /* LaunchHelper */, 95FCB2451C688BB20081B6FD /* Frameworks */, 9504C07A1C662C3000352520 /* V2RayX */, 9504C0C71C662DB500352520 /* v2rayx_sysconf */, @@ -202,6 +239,7 @@ 9504C0781C662C3000352520 /* V2RayX.app */, 9504C0C61C662DB400352520 /* v2rayx_sysconf */, 9D7DFE511EBEC947001FECBD /* jsonplist */, + 0A164CA0225599DD00076EB1 /* LaunchHelper.app */, ); name = Products; sourceTree = ""; @@ -326,6 +364,7 @@ 95FCB2451C688BB20081B6FD /* Frameworks */ = { isa = PBXGroup; children = ( + 0A164CB222559CC300076EB1 /* SystemConfiguration.framework */, 95A143CA1C87FC6E008756B9 /* Cocoa.framework */, 9504C0C01C662D9400352520 /* libz.tbd */, ); @@ -355,6 +394,23 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 0A164C9F225599DD00076EB1 /* LaunchHelper */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0A164CB0225599DE00076EB1 /* Build configuration list for PBXNativeTarget "LaunchHelper" */; + buildPhases = ( + 0A164C9C225599DD00076EB1 /* Sources */, + 0A164C9D225599DD00076EB1 /* Frameworks */, + 0A164C9E225599DD00076EB1 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = LaunchHelper; + productName = LaunchHelper; + productReference = 0A164CA0225599DD00076EB1 /* LaunchHelper.app */; + productType = "com.apple.product-type.application"; + }; 9504C0771C662C3000352520 /* V2RayX */ = { isa = PBXNativeTarget; buildConfigurationList = 9504C0891C662C3000352520 /* Build configuration list for PBXNativeTarget "V2RayX" */; @@ -418,6 +474,10 @@ LastUpgradeCheck = 0930; ORGANIZATIONNAME = "Project V2Ray"; TargetAttributes = { + 0A164C9F225599DD00076EB1 = { + CreatedOnToolsVersion = 10.2; + ProvisioningStyle = Manual; + }; 9504C0771C662C3000352520 = { CreatedOnToolsVersion = 7.2.1; }; @@ -435,6 +495,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -444,6 +505,7 @@ projectRoot = ""; targets = ( 9504C0771C662C3000352520 /* V2RayX */, + 0A164C9F225599DD00076EB1 /* LaunchHelper */, 9504C0C51C662DB400352520 /* v2rayx_sysconf */, 9D7DFE501EBEC947001FECBD /* jsonplist */, ); @@ -451,6 +513,15 @@ /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 0A164C9E225599DD00076EB1 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0A164CA6225599DE00076EB1 /* Assets.xcassets in Resources */, + 0A164CA9225599DE00076EB1 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 9504C0761C662C3000352520 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -508,6 +579,15 @@ /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 0A164C9C225599DD00076EB1 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0A164CAC225599DE00076EB1 /* main.m in Sources */, + 0A164CA4225599DD00076EB1 /* AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 9504C0741C662C3000352520 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -564,6 +644,14 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ + 0A164CA7225599DE00076EB1 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 0A164CA8225599DE00076EB1 /* Base */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; 9504C0831C662C3000352520 /* MainMenu.xib */ = { isa = PBXVariantGroup; children = ( @@ -575,6 +663,57 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 0A164CAE225599DE00076EB1 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_ENTITLEMENTS = LaunchHelper/LaunchHelper.entitlements; + CODE_SIGN_STYLE = Manual; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = ""; + GCC_C_LANGUAGE_STANDARD = gnu11; + INFOPLIST_FILE = LaunchHelper/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = cenmrev.V2RayX.LaunchHelper; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + }; + name = Debug; + }; + 0A164CAF225599DE00076EB1 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_ENTITLEMENTS = LaunchHelper/LaunchHelper.entitlements; + CODE_SIGN_STYLE = Manual; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = ""; + GCC_C_LANGUAGE_STANDARD = gnu11; + INFOPLIST_FILE = LaunchHelper/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = cenmrev.V2RayX.LaunchHelper; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + }; + name = Release; + }; 9504C0871C662C3000352520 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -737,6 +876,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 0A164CB0225599DE00076EB1 /* Build configuration list for PBXNativeTarget "LaunchHelper" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0A164CAE225599DE00076EB1 /* Debug */, + 0A164CAF225599DE00076EB1 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 9504C0731C662C3000352520 /* Build configuration list for PBXProject "V2RayX" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/V2RayX/AppDelegate.h b/V2RayX/AppDelegate.h index 1d2ff33..bf2831c 100644 --- a/V2RayX/AppDelegate.h +++ b/V2RayX/AppDelegate.h @@ -24,6 +24,7 @@ typedef enum ProxyMode : NSInteger{ int runCommandLine(NSString* launchPath, NSArray* arguments); @interface AppDelegate : NSObject { + BOOL launchAtLogin; BOOL proxyState; ProxyMode proxyMode; NSInteger localPort; @@ -44,7 +45,7 @@ int runCommandLine(NSString* launchPath, NSArray* arguments); } @property NSString* logDirPath; - +@property BOOL launchAtLogin; @property BOOL proxyState; @property ProxyMode proxyMode; @property NSInteger localPort; @@ -95,6 +96,7 @@ int runCommandLine(NSString* launchPath, NSArray* arguments); @property (weak, nonatomic) IBOutlet NSMenu *serverListMenu; @property (weak, nonatomic) IBOutlet NSMenu *pacListMenu; @property (weak) IBOutlet NSMenuItem *editPacMenuItem; +@property (weak) IBOutlet NSMenuItem *lauchAtLoginMenuItem; @property (weak) IBOutlet NSMenu *authMenu; diff --git a/V2RayX/AppDelegate.m b/V2RayX/AppDelegate.m index 3edbc0a..a1ed9ef 100644 --- a/V2RayX/AppDelegate.m +++ b/V2RayX/AppDelegate.m @@ -14,7 +14,7 @@ #import "MutableDeepCopying.h" #import "ConfigImporter.h" #import "NSData+AES256Encryption.h" - +#import #define kUseAllServer -10 @interface AppDelegate () { @@ -34,7 +34,6 @@ @interface AppDelegate () { @end @implementation AppDelegate - static AppDelegate *appDelegate; - (NSData*)v2rayJSONconfig { @@ -338,7 +337,7 @@ - (void)readDefaults { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSDictionary* appStatus = nilCoalescing([defaults objectForKey:@"appStatus"], @{}); - + launchAtLogin = [nilCoalescing(appStatus[@"launchAtLogin"], @(NO)) boolValue]; proxyState = [nilCoalescing(appStatus[@"proxyState"], @(NO)) boolValue]; //turn off proxy as default proxyMode = [nilCoalescing(appStatus[@"proxyMode"], @(manualMode)) integerValue]; selectedServerIndex = [nilCoalescing(appStatus[@"selectedServerIndex"], @0) integerValue]; @@ -403,6 +402,7 @@ - (void) writeDefaultSettings { @{ @"setingVersion": [NSNumber numberWithInteger:kV2RayXSettingVersion], @"appStatus": @{ + @"launchAtLogin": [NSNumber numberWithBool:NO], @"proxyState": [NSNumber numberWithBool:NO], @"proxyMode": @(manualMode), @"selectedServerIndex": [NSNumber numberWithInteger:0], @@ -437,6 +437,7 @@ - (NSData*) pacData { - (void)saveAppStatus { NSDictionary* status = @{ + @"launchAtLogin": @(launchAtLogin), @"proxyState": @(proxyState), @"proxyMode": @(proxyMode), @"selectedServerIndex": @(selectedServerIndex), @@ -1019,9 +1020,28 @@ -(NSString*)getV2rayPath { } +- (void)setSettingOfLaunchAtLogin:(BOOL)enabled +{ + static NSString* bundleID = @"cenmrev.V2RayX.LaunchHelper"; + + if (SMLoginItemSetEnabled((__bridge CFStringRef)bundleID,enabled)) { + launchAtLogin = enabled; + + NSLog(@"Call SMLoginItemSetEnabled with [%hhd] success", enabled); + } else { + NSLog(@"Call SMLoginItemSetEnabled with [%hhd] failed", enabled); + } +} + + - (IBAction)authorizeV2sys:(id)sender { [self installHelper:true]; } +- (IBAction)launchAtLoginAction:(id)sender { + + [self setSettingOfLaunchAtLogin:!launchAtLogin]; + +} - (IBAction)viewLog:(id)sender { if (!useCusProfile) { @@ -1106,7 +1126,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N } @synthesize logDirPath; - +@synthesize launchAtLogin; @synthesize proxyState; @synthesize proxyMode; @synthesize localPort; diff --git a/V2RayX/Base.lproj/MainMenu.xib b/V2RayX/Base.lproj/MainMenu.xib index aa949e4..7631a80 100644 --- a/V2RayX/Base.lproj/MainMenu.xib +++ b/V2RayX/Base.lproj/MainMenu.xib @@ -1,8 +1,8 @@ - + - + @@ -18,6 +18,7 @@ + @@ -765,6 +766,12 @@ + + + + + + diff --git a/V2RayX/ConfigWindow.xib b/V2RayX/ConfigWindow.xib index 356157f..31d7a34 100644 --- a/V2RayX/ConfigWindow.xib +++ b/V2RayX/ConfigWindow.xib @@ -1,8 +1,8 @@ - + - + @@ -34,7 +34,7 @@ - + @@ -641,6 +641,6 @@ Gw - + diff --git a/V2RayX/Info.plist b/V2RayX/Info.plist index ec326fd..c06cb78 100644 --- a/V2RayX/Info.plist +++ b/V2RayX/Info.plist @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - 1297 + 1305 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) LSUIElement From 8aa473fe2e68b8b31bbd5f60ae2bfbaf7aac41f0 Mon Sep 17 00:00:00 2001 From: Kevin <> Date: Thu, 4 Apr 2019 10:52:00 +0800 Subject: [PATCH 2/4] Add launch at login support --- V2RayX.xcodeproj/project.pbxproj | 12 ++++++++++++ V2RayX/AppDelegate.m | 4 +++- V2RayX/Info.plist | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/V2RayX.xcodeproj/project.pbxproj b/V2RayX.xcodeproj/project.pbxproj index b743473..608b1b5 100644 --- a/V2RayX.xcodeproj/project.pbxproj +++ b/V2RayX.xcodeproj/project.pbxproj @@ -12,6 +12,7 @@ 0A164CA9225599DE00076EB1 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0A164CA7225599DE00076EB1 /* MainMenu.xib */; }; 0A164CAC225599DE00076EB1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A164CAB225599DE00076EB1 /* main.m */; }; 0A164CB322559CC400076EB1 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A164CB222559CC300076EB1 /* SystemConfiguration.framework */; }; + 0AAC425F2255A80200B4D62A /* LaunchHelper.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = 0A164CA0225599DD00076EB1 /* LaunchHelper.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 9504C07D1C662C3000352520 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9504C07C1C662C3000352520 /* AppDelegate.m */; }; 9504C0801C662C3000352520 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9504C07F1C662C3000352520 /* main.m */; }; 9504C0821C662C3000352520 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9504C0811C662C3000352520 /* Assets.xcassets */; }; @@ -67,6 +68,16 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ + 0AAC425E2255A7E100B4D62A /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = Contents/Library/LoginItems; + dstSubfolderSpec = 1; + files = ( + 0AAC425F2255A80200B4D62A /* LaunchHelper.app in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 9504C0C41C662DB400352520 /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -420,6 +431,7 @@ 9DB94D77209D273A0001E9DD /* Run Script */, 953B60541DB3E31D00D40654 /* Run Script */, 9504C0761C662C3000352520 /* Resources */, + 0AAC425E2255A7E100B4D62A /* CopyFiles */, ); buildRules = ( ); diff --git a/V2RayX/AppDelegate.m b/V2RayX/AppDelegate.m index a1ed9ef..27710be 100644 --- a/V2RayX/AppDelegate.m +++ b/V2RayX/AppDelegate.m @@ -619,6 +619,7 @@ - (void)updateMenus { [_pacModeItem setState:proxyMode == pacMode]; [_manualModeItem setState:proxyMode == manualMode]; [_globalModeItem setState:proxyMode == globalMode]; + [_lauchAtLoginMenuItem setState:launchAtLogin]; } - (void)updatePacMenuList { @@ -1026,11 +1027,12 @@ - (void)setSettingOfLaunchAtLogin:(BOOL)enabled if (SMLoginItemSetEnabled((__bridge CFStringRef)bundleID,enabled)) { launchAtLogin = enabled; - + NSLog(@"Call SMLoginItemSetEnabled with [%hhd] success", enabled); } else { NSLog(@"Call SMLoginItemSetEnabled with [%hhd] failed", enabled); } + [self updateMenus]; } diff --git a/V2RayX/Info.plist b/V2RayX/Info.plist index c06cb78..0361d3b 100644 --- a/V2RayX/Info.plist +++ b/V2RayX/Info.plist @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - 1305 + 1309 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) LSUIElement From 6d4dcd20c93ba95ea29ad4d023b9ebadcd51bd65 Mon Sep 17 00:00:00 2001 From: Kevin <> Date: Thu, 4 Apr 2019 11:13:17 +0800 Subject: [PATCH 3/4] Fix Travic CI Build Error --- V2RayX.xcodeproj/project.pbxproj | 13 +++++++++++++ V2RayX/Info.plist | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/V2RayX.xcodeproj/project.pbxproj b/V2RayX.xcodeproj/project.pbxproj index 608b1b5..7a025cd 100644 --- a/V2RayX.xcodeproj/project.pbxproj +++ b/V2RayX.xcodeproj/project.pbxproj @@ -58,6 +58,13 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ + 0AAC42602255AD6400B4D62A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9504C0701C662C3000352520 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0A164C9F225599DD00076EB1; + remoteInfo = LaunchHelper; + }; 9504C0CD1C662DC500352520 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9504C0701C662C3000352520 /* Project object */; @@ -436,6 +443,7 @@ buildRules = ( ); dependencies = ( + 0AAC42612255AD6400B4D62A /* PBXTargetDependency */, 9504C0CE1C662DC500352520 /* PBXTargetDependency */, ); name = V2RayX; @@ -648,6 +656,11 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + 0AAC42612255AD6400B4D62A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 0A164C9F225599DD00076EB1 /* LaunchHelper */; + targetProxy = 0AAC42602255AD6400B4D62A /* PBXContainerItemProxy */; + }; 9504C0CE1C662DC500352520 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 9504C0C51C662DB400352520 /* v2rayx_sysconf */; diff --git a/V2RayX/Info.plist b/V2RayX/Info.plist index 0361d3b..6289b7b 100644 --- a/V2RayX/Info.plist +++ b/V2RayX/Info.plist @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - 1309 + 1312 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) LSUIElement From d30bfd6f648b68e965a576b1eca51bebaa74af55 Mon Sep 17 00:00:00 2001 From: Kevin <> Date: Thu, 4 Apr 2019 16:45:43 +0800 Subject: [PATCH 4/4] Add Localization for zh_CN --- LaunchHelper/zh-Hans.lproj/MainMenu.strings | 1 + V2RayX.xcodeproj/project.pbxproj | 73 ++- V2RayX/AdvancedWindowController.m | 17 +- V2RayX/AppDelegate.m | 40 +- V2RayX/{ => Base.lproj}/AdvancedWindow.xib | 36 +- V2RayX/{ => Base.lproj}/ConfigWindow.xib | 2 +- V2RayX/{ => Base.lproj}/TransportWindow.xib | 14 +- V2RayX/ConfigWindowController.m | 18 +- V2RayX/Info.plist | 2 +- V2RayX/TransportWindowController.m | 4 +- V2RayX/en.lproj/Localizable.strings | 47 ++ V2RayX/zh-Hans.lproj/AdvancedWindow.strings | 216 +++++++++ V2RayX/zh-Hans.lproj/ConfigWindow.strings | 150 ++++++ V2RayX/zh-Hans.lproj/Localizable.strings | 51 ++ V2RayX/zh-Hans.lproj/MainMenu.strings | 465 +++++++++++++++++++ V2RayX/zh-Hans.lproj/TransportWindow.strings | 129 +++++ 16 files changed, 1193 insertions(+), 72 deletions(-) create mode 100644 LaunchHelper/zh-Hans.lproj/MainMenu.strings rename V2RayX/{ => Base.lproj}/AdvancedWindow.xib (98%) rename V2RayX/{ => Base.lproj}/ConfigWindow.xib (99%) rename V2RayX/{ => Base.lproj}/TransportWindow.xib (99%) create mode 100644 V2RayX/en.lproj/Localizable.strings create mode 100644 V2RayX/zh-Hans.lproj/AdvancedWindow.strings create mode 100644 V2RayX/zh-Hans.lproj/ConfigWindow.strings create mode 100644 V2RayX/zh-Hans.lproj/Localizable.strings create mode 100644 V2RayX/zh-Hans.lproj/MainMenu.strings create mode 100644 V2RayX/zh-Hans.lproj/TransportWindow.strings diff --git a/LaunchHelper/zh-Hans.lproj/MainMenu.strings b/LaunchHelper/zh-Hans.lproj/MainMenu.strings new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/LaunchHelper/zh-Hans.lproj/MainMenu.strings @@ -0,0 +1 @@ + diff --git a/V2RayX.xcodeproj/project.pbxproj b/V2RayX.xcodeproj/project.pbxproj index 7a025cd..2771fdc 100644 --- a/V2RayX.xcodeproj/project.pbxproj +++ b/V2RayX.xcodeproj/project.pbxproj @@ -13,18 +13,20 @@ 0A164CAC225599DE00076EB1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A164CAB225599DE00076EB1 /* main.m */; }; 0A164CB322559CC400076EB1 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A164CB222559CC300076EB1 /* SystemConfiguration.framework */; }; 0AAC425F2255A80200B4D62A /* LaunchHelper.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = 0A164CA0225599DD00076EB1 /* LaunchHelper.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 0AAC42732255D18C00B4D62A /* ConfigWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0AAC42752255D18C00B4D62A /* ConfigWindow.xib */; }; + 0AAC42782255D82700B4D62A /* TransportWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0AAC427A2255D82700B4D62A /* TransportWindow.xib */; }; + 0AAC427D2255DC4100B4D62A /* AdvancedWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0AAC427F2255DC4100B4D62A /* AdvancedWindow.xib */; }; + 0AAC42872255EBA600B4D62A /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0AAC42892255EBA600B4D62A /* Localizable.strings */; }; 9504C07D1C662C3000352520 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9504C07C1C662C3000352520 /* AppDelegate.m */; }; 9504C0801C662C3000352520 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9504C07F1C662C3000352520 /* main.m */; }; 9504C0821C662C3000352520 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9504C0811C662C3000352520 /* Assets.xcassets */; }; 9504C0851C662C3000352520 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9504C0831C662C3000352520 /* MainMenu.xib */; }; - 9504C08D1C662C9100352520 /* ConfigWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9504C08C1C662C9100352520 /* ConfigWindow.xib */; }; 9504C0901C662CBF00352520 /* ConfigWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9504C08F1C662CBF00352520 /* ConfigWindowController.m */; }; 9504C0C11C662D9400352520 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 9504C0C01C662D9400352520 /* libz.tbd */; }; 9504C0C91C662DB500352520 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9504C0C81C662DB500352520 /* main.m */; }; 9504C0CF1C662DE300352520 /* v2rayx_sysconf in Resources */ = {isa = PBXBuildFile; fileRef = 9504C0C61C662DB400352520 /* v2rayx_sysconf */; }; 9504C0D11C66373400352520 /* install_helper.sh in Resources */ = {isa = PBXBuildFile; fileRef = 9504C0D01C662E0800352520 /* install_helper.sh */; }; 9504C0D41C66511B00352520 /* ServerProfile.m in Sources */ = {isa = PBXBuildFile; fileRef = 9504C0D31C66511B00352520 /* ServerProfile.m */; }; - 9565E28B1DB25C010082658C /* TransportWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9565E28A1DB25C010082658C /* TransportWindow.xib */; }; 9577E1B21C6B065E00093BD3 /* GCDWebServer.m in Sources */ = {isa = PBXBuildFile; fileRef = 9577E1951C6B065D00093BD3 /* GCDWebServer.m */; }; 9577E1B31C6B065E00093BD3 /* GCDWebServerConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 9577E1971C6B065D00093BD3 /* GCDWebServerConnection.m */; }; 9577E1B41C6B065E00093BD3 /* GCDWebServerFunctions.m in Sources */ = {isa = PBXBuildFile; fileRef = 9577E1991C6B065D00093BD3 /* GCDWebServerFunctions.m */; }; @@ -41,7 +43,6 @@ 95A143CC1C87FCDC008756B9 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95A143CA1C87FC6E008756B9 /* Cocoa.framework */; }; 95E524CB1C674CC80008BB12 /* simple.pac in Resources */ = {isa = PBXBuildFile; fileRef = 95E524CA1C674CC80008BB12 /* simple.pac */; }; 9D24863421CD9EC100C529AB /* config-sample_new.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9D24863321CD9EC000C529AB /* config-sample_new.plist */; }; - 9D3CEE6F209E070F0077CCFE /* AdvancedWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9D3CEE6E209E070F0077CCFE /* AdvancedWindow.xib */; }; 9D5EAC151FDCD70300C14B46 /* geoip.dat in Resources */ = {isa = PBXBuildFile; fileRef = 9D5EAC101FDCD54700C14B46 /* geoip.dat */; }; 9D5EAC161FDCD70300C14B46 /* geosite.dat in Resources */ = {isa = PBXBuildFile; fileRef = 9D5EAC0F1FDCD54600C14B46 /* geosite.dat */; }; 9D5EAC171FDCD70300C14B46 /* v2ctl in Resources */ = {isa = PBXBuildFile; fileRef = 9D5EAC0E1FDCD54600C14B46 /* v2ctl */; }; @@ -115,6 +116,16 @@ 0A164CAB225599DE00076EB1 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 0A164CAD225599DE00076EB1 /* LaunchHelper.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = LaunchHelper.entitlements; sourceTree = ""; }; 0A164CB222559CC300076EB1 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + 0AAC42652255C0F300B4D62A /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/MainMenu.strings"; sourceTree = ""; }; + 0AAC42662255C0F300B4D62A /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/MainMenu.strings"; sourceTree = ""; }; + 0AAC42742255D18C00B4D62A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/ConfigWindow.xib; sourceTree = ""; }; + 0AAC42772255D19500B4D62A /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/ConfigWindow.strings"; sourceTree = ""; }; + 0AAC42792255D82700B4D62A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/TransportWindow.xib; sourceTree = ""; }; + 0AAC427C2255D82D00B4D62A /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/TransportWindow.strings"; sourceTree = ""; }; + 0AAC427E2255DC4100B4D62A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/AdvancedWindow.xib; sourceTree = ""; }; + 0AAC42812255DC4500B4D62A /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/AdvancedWindow.strings"; sourceTree = ""; }; + 0AAC42882255EBA600B4D62A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 0AAC428A2255F3A900B4D62A /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; 9504C0781C662C3000352520 /* V2RayX.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = V2RayX.app; sourceTree = BUILT_PRODUCTS_DIR; }; 9504C07B1C662C3000352520 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 9504C07C1C662C3000352520 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; @@ -122,7 +133,6 @@ 9504C0811C662C3000352520 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 9504C0841C662C3000352520 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 9504C0861C662C3000352520 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 9504C08C1C662C9100352520 /* ConfigWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ConfigWindow.xib; sourceTree = ""; }; 9504C08E1C662CBF00352520 /* ConfigWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConfigWindowController.h; sourceTree = ""; }; 9504C08F1C662CBF00352520 /* ConfigWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConfigWindowController.m; sourceTree = ""; }; 9504C0C01C662D9400352520 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; @@ -133,7 +143,6 @@ 9504C0D31C66511B00352520 /* ServerProfile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ServerProfile.m; sourceTree = ""; }; 953B60551DB3F65A00D40654 /* dlcore.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = dlcore.sh; sourceTree = ""; }; 953B60571DB3F6B700D40654 /* v2ray */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = v2ray; path = "../v2ray-core-bin/v2ray"; sourceTree = ""; }; - 9565E28A1DB25C010082658C /* TransportWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TransportWindow.xib; sourceTree = ""; }; 9577E1941C6B065D00093BD3 /* GCDWebServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCDWebServer.h; sourceTree = ""; }; 9577E1951C6B065D00093BD3 /* GCDWebServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GCDWebServer.m; sourceTree = ""; }; 9577E1961C6B065D00093BD3 /* GCDWebServerConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCDWebServerConnection.h; sourceTree = ""; }; @@ -166,7 +175,6 @@ 95A143CA1C87FC6E008756B9 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 95E524CA1C674CC80008BB12 /* simple.pac */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = simple.pac; sourceTree = ""; }; 9D24863321CD9EC000C529AB /* config-sample_new.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "config-sample_new.plist"; sourceTree = ""; }; - 9D3CEE6E209E070F0077CCFE /* AdvancedWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AdvancedWindow.xib; sourceTree = ""; }; 9D5EAC0E1FDCD54600C14B46 /* v2ctl */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = v2ctl; path = "v2ray-core-bin/v2ctl"; sourceTree = SOURCE_ROOT; }; 9D5EAC0F1FDCD54600C14B46 /* geosite.dat */ = {isa = PBXFileReference; lastKnownFileType = file; name = geosite.dat; path = "v2ray-core-bin/geosite.dat"; sourceTree = SOURCE_ROOT; }; 9D5EAC101FDCD54700C14B46 /* geoip.dat */ = {isa = PBXFileReference; lastKnownFileType = file; name = geoip.dat; path = "v2ray-core-bin/geoip.dat"; sourceTree = SOURCE_ROOT; }; @@ -272,13 +280,13 @@ 9504C07C1C662C3000352520 /* AppDelegate.m */, 9504C0811C662C3000352520 /* Assets.xcassets */, 9504C0831C662C3000352520 /* MainMenu.xib */, - 9504C08C1C662C9100352520 /* ConfigWindow.xib */, + 0AAC42752255D18C00B4D62A /* ConfigWindow.xib */, 9D71D61521D06006007DA052 /* ConfigImporter.h */, 9D71D61621D06006007DA052 /* ConfigImporter.m */, - 9D3CEE6E209E070F0077CCFE /* AdvancedWindow.xib */, + 0AAC427F2255DC4100B4D62A /* AdvancedWindow.xib */, 9DEB294B21CB64CF0052D2BB /* AdvancedWindowController.h */, 9DEB294C21CB64CF0052D2BB /* AdvancedWindowController.m */, - 9565E28A1DB25C010082658C /* TransportWindow.xib */, + 0AAC427A2255D82700B4D62A /* TransportWindow.xib */, 9DDC058F21CA8CFF00C6C2D7 /* TransportWindowController.h */, 9DDC059021CA8CFF00C6C2D7 /* TransportWindowController.m */, 9504C08E1C662CBF00352520 /* ConfigWindowController.h */, @@ -294,6 +302,7 @@ 9504C07E1C662C3000352520 /* Supporting Files */ = { isa = PBXGroup; children = ( + 0AAC42892255EBA600B4D62A /* Localizable.strings */, 9DDC059421CA8DE900C6C2D7 /* utilities.h */, 9DDC059521CA8EAD00C6C2D7 /* utilities.m */, 9DBF3AA3213E1921008C7249 /* MutableDeepCopying.h */, @@ -518,6 +527,7 @@ English, en, Base, + "zh-Hans", ); mainGroup = 9504C06F1C662C3000352520; productRefGroup = 9504C0791C662C3000352520 /* Products */; @@ -546,9 +556,10 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 0AAC42872255EBA600B4D62A /* Localizable.strings in Resources */, 9D5EAC151FDCD70300C14B46 /* geoip.dat in Resources */, 9D5EAC161FDCD70300C14B46 /* geosite.dat in Resources */, - 9D3CEE6F209E070F0077CCFE /* AdvancedWindow.xib in Resources */, + 0AAC427D2255DC4100B4D62A /* AdvancedWindow.xib in Resources */, 9D5EAC171FDCD70300C14B46 /* v2ctl in Resources */, 9D5EAC181FDCD70300C14B46 /* v2ray in Resources */, 9DB4FE951F205BEB00CCEE5F /* config-sample.plist in Resources */, @@ -559,8 +570,8 @@ 9504C0821C662C3000352520 /* Assets.xcassets in Resources */, 9D7109611E0F43BD008A6362 /* Credits.rtf in Resources */, 9504C0851C662C3000352520 /* MainMenu.xib in Resources */, - 9565E28B1DB25C010082658C /* TransportWindow.xib in Resources */, - 9504C08D1C662C9100352520 /* ConfigWindow.xib in Resources */, + 0AAC42782255D82700B4D62A /* TransportWindow.xib in Resources */, + 0AAC42732255D18C00B4D62A /* ConfigWindow.xib in Resources */, 9D24863421CD9EC100C529AB /* config-sample_new.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -673,14 +684,52 @@ isa = PBXVariantGroup; children = ( 0A164CA8225599DE00076EB1 /* Base */, + 0AAC42652255C0F300B4D62A /* zh-Hans */, ); name = MainMenu.xib; sourceTree = ""; }; + 0AAC42752255D18C00B4D62A /* ConfigWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 0AAC42742255D18C00B4D62A /* Base */, + 0AAC42772255D19500B4D62A /* zh-Hans */, + ); + name = ConfigWindow.xib; + sourceTree = ""; + }; + 0AAC427A2255D82700B4D62A /* TransportWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 0AAC42792255D82700B4D62A /* Base */, + 0AAC427C2255D82D00B4D62A /* zh-Hans */, + ); + name = TransportWindow.xib; + sourceTree = ""; + }; + 0AAC427F2255DC4100B4D62A /* AdvancedWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + 0AAC427E2255DC4100B4D62A /* Base */, + 0AAC42812255DC4500B4D62A /* zh-Hans */, + ); + name = AdvancedWindow.xib; + sourceTree = ""; + }; + 0AAC42892255EBA600B4D62A /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 0AAC42882255EBA600B4D62A /* en */, + 0AAC428A2255F3A900B4D62A /* zh-Hans */, + ); + name = Localizable.strings; + sourceTree = ""; + }; 9504C0831C662C3000352520 /* MainMenu.xib */ = { isa = PBXVariantGroup; children = ( 9504C0841C662C3000352520 /* Base */, + 0AAC42662255C0F300B4D62A /* zh-Hans */, ); name = MainMenu.xib; sourceTree = ""; diff --git a/V2RayX/AdvancedWindowController.m b/V2RayX/AdvancedWindowController.m index b7b4251..dd6c305 100644 --- a/V2RayX/AdvancedWindowController.m +++ b/V2RayX/AdvancedWindowController.m @@ -226,7 +226,7 @@ - (BOOL)checkOutbound { NSError *e; NSDictionary* newOutboud = [NSJSONSerialization JSONObjectWithData:[_outboundJsonView.string dataUsingEncoding:NSUTF8StringEncoding] options:0 error:&e]; if (e) { - [self showAlert:@"NOT a valid json"]; + [self showAlert:NSLocalizedString(@"NOT a valid json", nil)]; [_outboundTable selectRowIndexes:[NSIndexSet indexSetWithIndex:_selectedOutbound] byExtendingSelection:NO]; return NO; } else { @@ -311,9 +311,9 @@ - (IBAction)addRemoveRuleSet:(id)sender { [_ruleSetTable reloadData]; } else if ([sender selectedSegment] == 2) { NSAlert* alert = [[NSAlert alloc] init]; - alert.messageText = @"Do you want to reset rule sets to original three ones?"; - [alert addButtonWithTitle:@"OK"]; - [alert addButtonWithTitle:@"Cancel"]; + alert.messageText = NSLocalizedString(@"Do you want to reset rule sets to original three ones?", nil); + [alert addButtonWithTitle:NSLocalizedString(@"OK",nil)]; + [alert addButtonWithTitle:NSLocalizedString(@"Cancel",nil)]; [alert beginSheetModalForWindow:self.window completionHandler:^(NSModalResponse returnCode) { if (returnCode == NSAlertFirstButtonReturn) { NSLog(@"will rest"); @@ -445,8 +445,9 @@ - (IBAction)closeDomainOrIPList:(id)sender { - (IBAction)addRemoveSubscription:(id)sender { NSLog(@"%@", sender); + if ([sender selectedSegment] == 0) { - [_subscriptions addObject:@"enter your subscription link here"]; + [_subscriptions addObject:NSLocalizedString(@"enter your subscription link here", nil)]; [_subscriptionTable reloadData]; } else if ([sender selectedSegment] == 1 && [_subscriptionTable selectedRow] >= 0 && [_subscriptionTable selectedRow] < _subscriptions.count) { [_subscriptions removeObjectAtIndex:[_subscriptionTable selectedRow]]; @@ -477,7 +478,7 @@ - (BOOL)checkConfig { if (returnCode != 0) { [_checkLabel setHidden:YES]; NSAlert *alert = [[NSAlert alloc] init]; - [alert setMessageText:[NSString stringWithFormat:@"%@ is not a valid v2ray config file", filePath]]; + [alert setMessageText:[NSString stringWithFormat:NSLocalizedString(@"%@ is not a valid v2ray config file", nil), filePath]]; [alert beginSheetModalForWindow:self.window completionHandler:^(NSModalResponse returnCode) { return; }]; @@ -606,9 +607,9 @@ - (IBAction)changePassword:(id)sender { } else { self.encryptionKey = [_encryptionKeyConfirmField.stringValue stringByPaddingToLength:32 withString:@"-" startingAtIndex:0]; } - [_changeIndicatorField setStringValue:@"success"]; + [_changeIndicatorField setStringValue:NSLocalizedString(@"success", nil)]; } else { - [_changeIndicatorField setStringValue:@"two password do not match each other."]; + [_changeIndicatorField setStringValue:NSLocalizedString(@"two password do not match each other.", nil)]; } } diff --git a/V2RayX/AppDelegate.m b/V2RayX/AppDelegate.m index 27710be..04e99fe 100644 --- a/V2RayX/AppDelegate.m +++ b/V2RayX/AppDelegate.m @@ -83,7 +83,7 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { NSNumber* setingVersion = [[NSUserDefaults standardUserDefaults] objectForKey:@"setingVersion"]; if(setingVersion == nil || [setingVersion integerValue] != kV2RayXSettingVersion) { NSAlert *noServerAlert = [[NSAlert alloc] init]; - [noServerAlert setMessageText:@"If you are running V2RayX for the first time, ignore this message. \nSorry, unknown settings!\nAll V2RayX settings will be reset."]; + [noServerAlert setMessageText:NSLocalizedString(@"If you are running V2RayX for the first time, ignore this message. \nSorry, unknown settings!\nAll V2RayX settings will be reset.", nil)]; [noServerAlert runModal]; [self writeDefaultSettings]; //explicitly write default settings to user defaults file } @@ -152,10 +152,10 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { if (_enableEncryption && ([profiles count] > 0 || [_subscriptions count] > 0)) { NSUserNotification* notification = [[NSUserNotification alloc] init]; notification.identifier = [NSString stringWithFormat:@"cenmrev.v2rayx.passwork.%@", [NSUUID UUID]]; - notification.title = @"Input Password"; - notification.informativeText = @"input your password to continue"; + notification.title = NSLocalizedString(@"Input Password", nil); + notification.informativeText = NSLocalizedString(@"input your password to continue", nil); notification.soundName = NSUserNotificationDefaultSoundName; - notification.actionButtonTitle = @"Continue"; + notification.actionButtonTitle = NSLocalizedString(@"Continue", nil); notification.hasActionButton = true; [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification]; [_statusBarItem setMenu:_authMenu]; @@ -167,9 +167,9 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { - (IBAction)inputPassword:(id)sender { NSAlert* alert = [[NSAlert alloc] init]; - alert.messageText = @"input password to decrypt configurations"; - [alert addButtonWithTitle:@"Decrypt"]; - [alert addButtonWithTitle:@"Cancel"]; + alert.messageText = NSLocalizedString(@"input password to decrypt configurations", nil); + [alert addButtonWithTitle:NSLocalizedString(@"Decrypt", nil)]; + [alert addButtonWithTitle:NSLocalizedString(@"Cancel", nil)]; NSTextField *input = [[NSSecureTextField alloc] initWithFrame:NSMakeRect(0, 0, 200, 24)]; [input setStringValue:@""]; [alert setAccessoryView:input]; @@ -240,9 +240,9 @@ - (BOOL)installHelper:(BOOL)force { return YES; } NSAlert *installAlert = [[NSAlert alloc] init]; - [installAlert addButtonWithTitle:@"Install"]; - [installAlert addButtonWithTitle:@"Quit"]; - [installAlert setMessageText:@"V2RayX needs to install a small tool to /Library/Application Support/V2RayX/ with administrator privileges to set system proxy quickly.\nOtherwise you need to type in the administrator password every time you change system proxy through V2RayX."]; + [installAlert addButtonWithTitle:NSLocalizedString(@"Install", nil)]; + [installAlert addButtonWithTitle:NSLocalizedString(@"Quit", nil)]; + [installAlert setMessageText:NSLocalizedString(@"V2RayX needs to install a small tool to /Library/Application Support/V2RayX/ with administrator privileges to set system proxy quickly.\nOtherwise you need to type in the administrator password every time you change system proxy through V2RayX.", nil)]; if ([installAlert runModal] == NSAlertFirstButtonReturn) { NSLog(@"start install"); NSString *helperPath = [NSString stringWithFormat:@"%@/%@", [[NSBundle mainBundle] resourcePath], @"install_helper.sh"]; @@ -606,14 +606,14 @@ - (IBAction)didChangeMode:(id)sender { - (void)updateMenus { if (proxyState) { - [_v2rayStatusItem setTitle:@"v2ray-core: loaded"]; - [_enableV2rayItem setTitle:@"Unload core"]; + [_v2rayStatusItem setTitle:NSLocalizedString(@"v2ray-core: loaded", nil)]; + [_enableV2rayItem setTitle:NSLocalizedString(@"Unload core", nil)]; NSImage *icon = [NSImage imageNamed:@"statusBarIcon"]; [icon setTemplate:YES]; [_statusBarItem setImage:icon]; } else { - [_v2rayStatusItem setTitle:@"v2ray-core: unloaded"]; - [_enableV2rayItem setTitle:@"Load core"]; + [_v2rayStatusItem setTitle:NSLocalizedString(@"v2ray-core: unloaded", nil)]; + [_enableV2rayItem setTitle:NSLocalizedString(@"Load core", nil)]; [_statusBarItem setImage:[NSImage imageNamed:@"statusBarIcon_disabled"]]; } [_pacModeItem setState:proxyMode == pacMode]; @@ -652,9 +652,9 @@ - (IBAction)editPac:(id)sender { - (IBAction)resetPac:(id)sender { NSAlert *resetAlert = [[NSAlert alloc] init]; - [resetAlert setMessageText:@"The pac file will be reset to the original one coming with V2RayX. Are you sure to proceed?"]; - [resetAlert addButtonWithTitle:@"Yes"]; - [resetAlert addButtonWithTitle:@"Cancel"]; + [resetAlert setMessageText:NSLocalizedString(@"The pac file will be reset to the original one coming with V2RayX. Are you sure to proceed?", nil)]; + [resetAlert addButtonWithTitle:NSLocalizedString(@"Yes", nil)]; + [resetAlert addButtonWithTitle:NSLocalizedString(@"Cancel", nil)]; NSModalResponse response = [resetAlert runModal]; if(response == NSAlertFirstButtonReturn) { NSString* simplePac = [[NSBundle mainBundle] pathForResource:@"simple" ofType:@"pac"]; @@ -663,7 +663,7 @@ - (IBAction)resetPac:(id)sender { [[NSData dataWithContentsOfFile:simplePac] writeToFile:pacPath atomically:YES]; } else { NSAlert* writePacAlert = [[NSAlert alloc] init]; - [writePacAlert setMessageText:[NSString stringWithFormat:@"%@ is not writable!", pacPath]]; + [writePacAlert setMessageText:[NSString stringWithFormat:NSLocalizedString(@"%@ is not writable!", nil), pacPath]]; [writePacAlert runModal]; } } @@ -762,7 +762,7 @@ - (void)updateRuleSetMenuList { - (void)updateServerMenuList { [_serverListMenu removeAllItems]; if ([profiles count] == 0 && [cusProfiles count] == 0 && [_subsOutbounds count] == 0) { - [_serverListMenu addItem:[[NSMenuItem alloc] initWithTitle:@"no available servers, please add server profiles through config window." action:nil keyEquivalent:@""]]; + [_serverListMenu addItem:[[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"no available servers, please add server profiles through config window.", nil) action:nil keyEquivalent:@""]]; if (_subscriptions.count > 0) { [_serverListMenu addItem:[NSMenuItem separatorItem]]; [_serverListMenu addItem:_updateServerItem]; @@ -794,7 +794,7 @@ - (void)updateServerMenuList { i += 1; } if([profiles count] + [_subsOutbounds count]> 0) { - NSMenuItem *newItem = [[NSMenuItem alloc] initWithTitle:@"Use All" action:@selector(switchServer:) keyEquivalent:@""]; + NSMenuItem *newItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Use All", nil) action:@selector(switchServer:) keyEquivalent:@""]; [newItem setTag:kUseAllServer]; newItem.state = useMultipleServer & !useCusProfile; [_serverListMenu addItem:newItem]; diff --git a/V2RayX/AdvancedWindow.xib b/V2RayX/Base.lproj/AdvancedWindow.xib similarity index 98% rename from V2RayX/AdvancedWindow.xib rename to V2RayX/Base.lproj/AdvancedWindow.xib index e3738dc..c8bd2e2 100644 --- a/V2RayX/AdvancedWindow.xib +++ b/V2RayX/Base.lproj/AdvancedWindow.xib @@ -1,8 +1,8 @@ - + - + @@ -62,7 +62,7 @@ - + @@ -96,7 +96,7 @@ Gw - + @@ -186,6 +186,10 @@ Gw + + + + @@ -214,7 +218,7 @@ Gw - + @@ -290,7 +294,7 @@ Gw - + @@ -438,7 +442,7 @@ Gw - + @@ -693,7 +697,7 @@ Gw - + @@ -867,7 +871,7 @@ Compatibility is not guaranteed. - + @@ -1065,7 +1069,7 @@ will match all private IPs. - + @@ -1087,6 +1091,10 @@ will match all private IPs. + @@ -1129,7 +1137,7 @@ Gw - + @@ -1151,6 +1159,10 @@ Gw + @@ -1189,6 +1201,6 @@ Gw - + diff --git a/V2RayX/ConfigWindow.xib b/V2RayX/Base.lproj/ConfigWindow.xib similarity index 99% rename from V2RayX/ConfigWindow.xib rename to V2RayX/Base.lproj/ConfigWindow.xib index 31d7a34..bc05ebf 100644 --- a/V2RayX/ConfigWindow.xib +++ b/V2RayX/Base.lproj/ConfigWindow.xib @@ -34,7 +34,7 @@ - + diff --git a/V2RayX/TransportWindow.xib b/V2RayX/Base.lproj/TransportWindow.xib similarity index 99% rename from V2RayX/TransportWindow.xib rename to V2RayX/Base.lproj/TransportWindow.xib index e6d3ac1..7bf1c9f 100644 --- a/V2RayX/TransportWindow.xib +++ b/V2RayX/Base.lproj/TransportWindow.xib @@ -1,8 +1,8 @@ - + - + @@ -42,7 +42,7 @@ - + @@ -238,7 +238,7 @@ - + @@ -327,7 +327,7 @@ - + @@ -415,7 +415,7 @@ - + @@ -558,7 +558,7 @@ - + diff --git a/V2RayX/ConfigWindowController.m b/V2RayX/ConfigWindowController.m index 3284489..fbaa5b1 100644 --- a/V2RayX/ConfigWindowController.m +++ b/V2RayX/ConfigWindowController.m @@ -146,9 +146,9 @@ - (BOOL)checkTLSforHttp2 { BOOL tlsEnabled = [self.selectedProfile.streamSettings[@"security"] isEqual: @"tls"]; if (!tlsEnabled) { NSAlert *httpTlsAlerm = [[NSAlert alloc] init]; - [httpTlsAlerm addButtonWithTitle:@"Close"]; - [httpTlsAlerm addButtonWithTitle:@"Help"]; - [httpTlsAlerm setMessageText:@"Both client and server must enable TLS to use HTTP/2 network! Enbale TLS in transport settings. Click \"Help\" if you need more information"]; + [httpTlsAlerm addButtonWithTitle:NSLocalizedString(@"Close", nil)]; + [httpTlsAlerm addButtonWithTitle:NSLocalizedString(@"Help", nil)]; + [httpTlsAlerm setMessageText:NSLocalizedString(@"Both client and server must enable TLS to use HTTP/2 network! Enbale TLS in transport settings. Click \"Help\" if you need more information", nil)]; [httpTlsAlerm beginSheetModalForWindow:self.window completionHandler:^(NSModalResponse returnCode) { if (returnCode == NSAlertSecondButtonReturn) { [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"https://www.v2ray.com/chapter_02/transport/h2.html#tips"]]; @@ -229,15 +229,15 @@ - (IBAction)okSave:(id)sender { NSMutableDictionary *allOutboundDict =[[NSMutableDictionary alloc] init]; for (NSMutableDictionary* outbound in allOutbounds) { if (!outbound[@"tag"] || ![outbound[@"tag"] isKindOfClass:[NSString class]] || [outbound[@"tag"] length] == 0) { - [self showAlert: [NSString stringWithFormat:@"%@\ntag is not valid!", [self firstFewLines:outbound]]]; + [self showAlert: [NSString stringWithFormat:NSLocalizedString(@"%@\ntag is not valid!", nil), [self firstFewLines:outbound]]]; return; } if ([RESERVED_TAGS indexOfObject:outbound[@"tag"]] != NSNotFound) { - [self showAlert: [NSString stringWithFormat:@"tag %@ is reserved, please use another one!", outbound[@"tag"]]]; + [self showAlert: [NSString stringWithFormat:NSLocalizedString(@"tag %@ is reserved, please use another one!", nil), outbound[@"tag"]]]; return; } if (allOutboundDict[outbound[@"tag"]]) { - [self showAlert: [NSString stringWithFormat:@"The two outbounds share the same tag: %@\n%@\nAND\n%@",outbound[@"tag"], [self firstFewLines:outbound], [self firstFewLines:allOutboundDict[outbound[@"tag"]]]]]; + [self showAlert: [NSString stringWithFormat:NSLocalizedString(@"The two outbounds share the same tag: %@\n%@\nAND\n%@", nil),outbound[@"tag"], [self firstFewLines:outbound], [self firstFewLines:allOutboundDict[outbound[@"tag"]]]]]; return; } allOutboundDict[outbound[@"tag"]] = outbound; @@ -332,7 +332,7 @@ - (void)showAlert:(NSString*)text { } - (IBAction)importFromStandardLink:(id)sender { - [self askInputWithPrompt:@"Support standard vmess:// and ss:// link. Standard vmess:// link is still under discussion. Use \"Import from other links...\" to import other links, for example, vmess:// invented by v2rayN." handler:^(NSString *inputStr) { + [self askInputWithPrompt:NSLocalizedString(@"Support standard vmess:// and ss:// link. Standard vmess:// link is still under discussion. Use \"Import from other links...\" to import other links, for example, vmess:// invented by v2rayN.", nil) handler:^(NSString *inputStr) { if (inputStr.length) { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{ NSMutableDictionary* ssOutbound = [ConfigImporter ssOutboundFromSSLink:inputStr]; @@ -351,7 +351,7 @@ - (void)presentImportResultOfVmessCount:(NSInteger)vmessCount otherCount:(NSInte dispatch_async(dispatch_get_main_queue(), ^{ [self->_profileTable reloadData]; self.popover = [[NSPopover alloc] init]; - self.importMessageField.stringValue = [NSString stringWithFormat:@"Imported %lu vmess and %lu other protocol outbounds, %lu routing rule sets.", vmessCount, otherCount, ruleSetCount]; + self.importMessageField.stringValue = [NSString stringWithFormat:NSLocalizedString(@"Imported %lu vmess and %lu other protocol outbounds, %lu routing rule sets.", nil), vmessCount, otherCount, ruleSetCount]; self.popover.contentViewController = [[NSViewController alloc] init]; self.popover.contentViewController.view = self.importResultView; self.popover.behavior = NSPopoverBehaviorTransient; @@ -361,7 +361,7 @@ - (void)presentImportResultOfVmessCount:(NSInteger)vmessCount otherCount:(NSInte } - (IBAction)importFromMiscLinks:(id)sender { - [self askInputWithPrompt:@"V2RayX will try importing ssd://, vmess:// and http(s):// links from v2rayN and SSD(may cause failure)." handler:^(NSString *inputStr) { + [self askInputWithPrompt:NSLocalizedString(@"V2RayX will try importing ssd://, vmess:// and http(s):// links from v2rayN and SSD(may cause failure).", nil) handler:^(NSString *inputStr) { inputStr = [inputStr stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; if ([inputStr length] != 0) { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{ diff --git a/V2RayX/Info.plist b/V2RayX/Info.plist index 6289b7b..46d5423 100644 --- a/V2RayX/Info.plist +++ b/V2RayX/Info.plist @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - 1312 + 1332 LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) LSUIElement diff --git a/V2RayX/TransportWindowController.m b/V2RayX/TransportWindowController.m index f2a6e76..abaa6d5 100644 --- a/V2RayX/TransportWindowController.m +++ b/V2RayX/TransportWindowController.m @@ -154,7 +154,7 @@ - (BOOL)checkInputs { [NSJSONSerialization JSONObjectWithData:[[_tcpHeaderField string] dataUsingEncoding:NSUTF8StringEncoding] options:0 error:&httpHeaderParseError]; if (httpHeaderParseError) { NSAlert* parseAlert = [[NSAlert alloc] init]; - [parseAlert setMessageText:@"Error in parsing customized tcp http header!"]; + [parseAlert setMessageText:NSLocalizedString(@"Error in parsing customized tcp http header!", nil)]; [parseAlert beginSheetModalForWindow:[self window] completionHandler:^(NSModalResponse returnCode) { }]; return NO; } @@ -166,7 +166,7 @@ - (BOOL)checkInputs { [NSJSONSerialization JSONObjectWithData:[[_wsHeaderField string] dataUsingEncoding:NSUTF8StringEncoding] options:0 error:&wsHeaderParseError]; if(wsHeaderParseError) { NSAlert* parseAlert = [[NSAlert alloc] init]; - [parseAlert setMessageText:@"Error in parsing customized WebSocket headers!"]; + [parseAlert setMessageText:NSLocalizedString(@"Error in parsing customized WebSocket headers!", nil)]; [parseAlert beginSheetModalForWindow:[self window] completionHandler:^(NSModalResponse returnCode) { }]; return NO; } diff --git a/V2RayX/en.lproj/Localizable.strings b/V2RayX/en.lproj/Localizable.strings new file mode 100644 index 0000000..9e0b2cd --- /dev/null +++ b/V2RayX/en.lproj/Localizable.strings @@ -0,0 +1,47 @@ +/* + Localizable.strings + V2RayX + + Created by Kevin on 2019/4/4. + Copyright © 2019 Project V2Ray. All rights reserved. +*/ +"enter your subscription link here" = "enter your subscription link here"; +"% is not a valid v2ray config file" = "% is not a valid v2ray config file"; +"NOT a valid json" = "NOT a valid json"; +"Do you want to reset rule sets to original three ones?" = "Do you want to reset rule sets to original three ones?"; + +"two password do not match each other." = "two password do not match each other."; +"Error in parsing customized tcp http header!" = "Error in parsing customized tcp http header!"; +"Error in parsing customized WebSocket headers!" = "Error in parsing customized WebSocket headers!"; +"Both client and server must enable TLS to use HTTP/2 network! Enbale TLS in transport settings. Click \"Help\" if you need more information" = "Both client and server must enable TLS to use HTTP/2 network! Enbale TLS in transport settings. Click \"Help\" if you need more information"; +"%\ntag is not valid!" = "%\ntag is not valid!"; +"tag % is reserved, please use another one!" = "tag % is reserved, please use another one!"; +"The two outbounds share the same tag: %\n%\nAND\n%" = "The two outbounds share the same tag: %\n%\nAND\n%"; +"Support standard vmess:// and ss:// link. Standard vmess:// link is still under discussion. Use \"Import from other links...\" to import other links, for example, vmess:// invented by v2rayN." = "Support standard vmess:// and ss:// link. Standard vmess:// link is still under discussion. Use \"Import from other links...\" to import other links, for example, vmess:// invented by v2rayN."; +"Imported %lu vmess and %lu other protocol outbounds, %lu routing rule sets." = "Imported %lu vmess and %lu other protocol outbounds, %lu routing rule sets."; +"V2RayX will try importing ssd://, vmess:// and http(s):// links from v2rayN and SSD(may cause failure)." = "V2RayX will try importing ssd://, vmess:// and http(s):// links from v2rayN and SSD(may cause failure)."; +"If you are running V2RayX for the first time, ignore this message. \nSorry, unknown settings!\nAll V2RayX settings will be reset." = "If you are running V2RayX for the first time, ignore this message. \nSorry, unknown settings!\nAll V2RayX settings will be reset."; +"Input Password" = "Input Password"; +"input your password to continue" = "input your password to continue"; +"input password to decrypt configurations" = "input password to decrypt configurations"; +"V2RayX needs to install a small tool to /Library/Application Support/V2RayX/ with administrator privileges to set system proxy quickly.\nOtherwise you need to type in the administrator password every time you change system proxy through V2RayX." = "V2RayX needs to install a small tool to /Library/Application Support/V2RayX/ with administrator privileges to set system proxy quickly.\nOtherwise you need to type in the administrator password every time you change system proxy through V2RayX."; + +"v2ray-core: loaded" = "v2ray-core: loaded"; +"Unload core" = "Unload core"; +"v2ray-core: unloaded" = "v2ray-core: unloaded"; +"Load core" = "Load core"; +"The pac file will be reset to the original one coming with V2RayX. Are you sure to proceed?" = "The pac file will be reset to the original one coming with V2RayX. Are you sure to proceed?"; +"% is not writable!" = "% is not writable!"; +"no available servers, please add server profiles through config window." = "no available servers, please add server profiles through config window."; +"Use All" = "Use All"; + + +"success" = "success"; +"Decrypt" = "Decrypt"; +"Close" = "Close"; +"Help" = "Help"; +"Quit" = "Quit"; +"Continue" = "Continue"; +"Cancel" = "Cancel"; +"Yes" = "Yes"; +"Install" = "Install"; diff --git a/V2RayX/zh-Hans.lproj/AdvancedWindow.strings b/V2RayX/zh-Hans.lproj/AdvancedWindow.strings new file mode 100644 index 0000000..7bdc54b --- /dev/null +++ b/V2RayX/zh-Hans.lproj/AdvancedWindow.strings @@ -0,0 +1,216 @@ + +/* Class = "NSTextFieldCell"; title = "WARNING: this function is still in beta. Backup before you try!"; ObjectID = "0s7-uP-t1h"; */ +"0s7-uP-t1h.title" = "警告: 本功能尚在测试中,请注意备份配置!"; + +/* Class = "NSTextFieldCell"; title = "Make sure the following files are present:"; ObjectID = "1Vl-aE-8sN"; */ +"1Vl-aE-8sN.title" = "确保以下文件存在:"; + +/* Class = "NSMenuItem"; title = "Item 1"; ObjectID = "2Oy-Qp-IeQ"; */ +"2Oy-Qp-IeQ.title" = "Item 1"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "2bW-I2-dXF"; */ +"2bW-I2-dXF.title" = "Cancel"; + +/* Class = "NSMenuItem"; title = "Item 2"; ObjectID = "4DK-9y-rmk"; */ +"4DK-9y-rmk.title" = "Item 2"; + +/* Class = "NSTabViewItem"; label = "Core"; ObjectID = "67G-Pu-y5A"; */ +"67G-Pu-y5A.label" = "Core"; + +/* Class = "NSButtonCell"; title = "Save"; ObjectID = "8kA-bO-a9z"; */ +"8kA-bO-a9z.title" = "Save"; + +/* Class = "NSTextFieldCell"; placeholderString = "rule set name"; ObjectID = "9nq-rX-rC3"; */ +"9nq-rX-rC3.placeholderString" = "rule set name"; + +/* Class = "NSBox"; title = "Rules"; ObjectID = "A3j-NA-vk6"; */ +"A3j-NA-vk6.title" = "代理规则"; + +/* Class = "NSTextFieldCell"; title = "Input twice to set a new password:"; ObjectID = "AZm-tN-5qT"; */ +"AZm-tN-5qT.title" = "请输入密码:"; + +/* Class = "NSTextFieldCell"; title = "Domain Strategy:"; ObjectID = "Abd-Kl-8fv"; */ +"Abd-Kl-8fv.title" = "域名策略:"; + +/* Class = "NSButtonCell"; title = "Help"; ObjectID = "BKj-YZ-Vk2"; */ +"BKj-YZ-Vk2.title" = "帮助"; + +/* Class = "NSMenuItem"; title = "Item 3"; ObjectID = "CJg-8o-Fwh"; */ +"CJg-8o-Fwh.title" = "Item 3"; + +/* Class = "NSMenuItem"; title = "Item 2"; ObjectID = "E4G-rh-24K"; */ +"E4G-rh-24K.title" = "Item 2"; + +/* Class = "NSButtonCell"; title = "Edit list"; ObjectID = "E4s-0q-jVZ"; */ +"E4s-0q-jVZ.title" = "编辑列表"; + +/* Class = "NSTextFieldCell"; title = "All the configuration information are stored in ~/Library/Preferences/cenmrev.V2RayX.plist. In case the information is leaked to other unauthorized programs or individuals, set a password and V2RayX will use AES-256-ECB to encrypt the information."; ObjectID = "EAT-73-Qh6"; */ +"EAT-73-Qh6.title" = "所有配置信息都存储在〜/Library/Preferences/cenmrev.V2RayX.plist中。如果信息泄露给其他未授权的程序或个人,请设置密码,V2RayX将使用AES-256-ECB加密信息。"; + +/* Class = "NSTextFieldCell"; title = "To provide domain and IP rules, follow this format:\n separate domains and ips with a line `---`.\nExamples:\n1.\n v2ray.com\n ----\n 10.0.0.0/8\n geoip:private\nwill match traffic with (a destination domain includes \"v2ray.com\") AND (a destination IP in range of 10.0.0.0/8 OR a private destination IP)\n2.\n domain:v2ray.com\n ----\nwill match traffic with a destination domain of v2ray.com and *.v2ray.com.\n3.\n ----\n geoip:private\nwill match all private IPs."; ObjectID = "EXS-dL-5V7"; */ +"EXS-dL-5V7.title" = "IP及域名请遵循以下格式:\n 域名和IP区域请使用`---`来分隔.\n示例:\n1.\n v2ray.com\n ----\n 10.0.0.0/8\n geoip:private\n将会匹配v2ray.com以及10.0.0.0/8范围内的IP地址和特定的IP地址\n2.\n domain:v2ray.com\n ----\n将会匹配v2ray.com以及*.v2ray.com\n3.\n ----\n geoip:private\n将会匹配所有特定的IP地址"; + +/* Class = "NSTabViewItem"; label = "Encryption"; ObjectID = "EcZ-9w-1Yw"; */ +"EcZ-9w-1Yw.label" = "安全性"; + +/* Class = "NSButtonCell"; title = "Domain"; ObjectID = "FXd-hg-kTV"; */ +"FXd-hg-kTV.title" = "域名"; + +/* Class = "NSTextFieldCell"; title = "When an incoming connection matches ALL the criterions (domain/ip/port/network), it will be routed to the provided outbound tag. \n\nFour preset tags:\n main: the outbound users choose from the menu list \"Server\"\ndecline: the connection will be closed.\n direct: incoming traffic will be send to its real destination.\nbalance: v2ray will randomly pickup an outbound from all \n provided outbounds."; ObjectID = "GeG-md-J3l"; */ +"GeG-md-J3l.title" = "当传入连接符合所有规则时(domain/ip/port/network), 将会被转发至所选路由. \n\n路由规则介绍:\n main: 转发至用户在主菜单中所选择的服务器。\ndecline: 拒绝连接。\n direct: 直接连接\nbalance: 在列表中随机选择可用的服务器"; + +/* Class = "NSTextFieldCell"; title = "Label"; ObjectID = "GuH-9u-diX"; */ +"GuH-9u-diX.title" = "Label"; + +/* Class = "NSTextFieldCell"; title = "To use outbounds of other protocols apart from vmess, directly provide the corresponding OutboundObject below. Click Help to see instructions."; ObjectID = "GuN-KN-aPK"; */ +"GuN-KN-aPK.title" = "若需要使用其它代理协议,请添加相应协议的配置。单击\"帮助\"以查看说明"; + +/* Class = "NSButtonCell"; title = "Finish"; ObjectID = "Hv6-1n-72W"; */ +"Hv6-1n-72W.title" = "完成"; + +/* Class = "NSTextFieldCell"; title = "/path/to/application support"; ObjectID = "IEx-Ah-Xhi"; */ +"IEx-Ah-Xhi.title" = "/path/to/application support"; + +/* Class = "NSMenuItem"; title = "Item 3"; ObjectID = "NO6-7e-gtq"; */ +"NO6-7e-gtq.title" = "Item 3"; + +/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "OoL-C4-v5k"; */ +"OoL-C4-v5k.title" = "Text Cell"; + +/* Class = "NSMenuItem"; title = "Item 3"; ObjectID = "PNJ-mc-Nhk"; */ +"PNJ-mc-Nhk.title" = "Item 3"; + +/* Class = "NSTextFieldCell"; title = "v2ray-core/v2ray\nv2ray-core/v2ctl\nv2ray-core/geoip.dat\nv2ray-core/geosite.dat"; ObjectID = "QCH-HC-h7v"; */ +"QCH-HC-h7v.title" = "v2ray-core/v2ray\nv2ray-core/v2ctl\nv2ray-core/geoip.dat\nv2ray-core/geosite.dat"; + +/* Class = "NSWindow"; title = "Window"; ObjectID = "QvC-M9-y7g"; */ +"QvC-M9-y7g.title" = "Window"; + +/* Class = "NSTextFieldCell"; title = "checking..."; ObjectID = "R7w-O4-j5u"; */ +"R7w-O4-j5u.title" = "checking..."; + +/* Class = "NSTextFieldCell"; title = "route to:"; ObjectID = "X80-bG-59t"; */ +"X80-bG-59t.title" = "route to:"; + +/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "ZS4-bp-UnJ"; */ +"ZS4-bp-UnJ.title" = "Text Cell"; + +/* Class = "NSTextFieldCell"; title = "When ALL the following criteria are satisfied:"; ObjectID = "ZeT-4k-vxH"; */ +"ZeT-4k-vxH.title" = "满足所有以下条件时:"; + +/* Class = "NSTextFieldCell"; title = "V2RayX is shipped with a v2ray binary file in the app bundle. If anyone wants to use a different v2ray core binary, put the binary file in the following directory:"; ObjectID = "a4D-MW-Gqf"; */ +"a4D-MW-Gqf.title" = "V2RayX 已经附带了v2ray core,如果想使用其它版本,请将文件放入以下目录中:"; + +/* Class = "NSButtonCell"; title = "Port"; ObjectID = "aZy-cf-V3d"; */ +"aZy-cf-V3d.title" = "Port"; + +/* Class = "NSButtonCell"; title = "IP"; ObjectID = "bEb-OZ-H5Q"; */ +"bEb-OZ-H5Q.title" = "IP"; + +/* Class = "NSTextFieldCell"; placeholderString = "rule name"; ObjectID = "bg2-0h-Zy8"; */ +"bg2-0h-Zy8.placeholderString" = "rule name"; + +/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "bg2-0h-Zy8"; */ +"bg2-0h-Zy8.title" = "Text Cell"; + +/* Class = "NSTextFieldCell"; placeholderString = "full path to your config file, do not use ~"; ObjectID = "blU-qK-jS1"; */ +"blU-qK-jS1.placeholderString" = "full path to your config file, do not use ~"; + +/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "blU-qK-jS1"; */ +"blU-qK-jS1.title" = "Text Cell"; + +/* Class = "NSComboBoxCell"; btf-wg-PEM.ibShadowedObjectValues[0] = "Item 1"; ObjectID = "btf-wg-PEM"; */ +"btf-wg-PEM.ibShadowedObjectValues[0]" = "Item 1"; + +/* Class = "NSComboBoxCell"; btf-wg-PEM.ibShadowedObjectValues[1] = "Item 2"; ObjectID = "btf-wg-PEM"; */ +"btf-wg-PEM.ibShadowedObjectValues[1]" = "Item 2"; + +/* Class = "NSComboBoxCell"; btf-wg-PEM.ibShadowedObjectValues[2] = "Item 3"; ObjectID = "btf-wg-PEM"; */ +"btf-wg-PEM.ibShadowedObjectValues[2]" = "Item 3"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "c0Q-Wz-IXk"; */ +"c0Q-Wz-IXk.title" = "取消"; + +/* Class = "NSTabViewItem"; label = "Subscription"; ObjectID = "c9O-2e-b8g"; */ +"c9O-2e-b8g.label" = "订阅"; + +/* Class = "NSTextFieldCell"; title = "When quiting V2RayX, or unloading core, or choosing manual mode:"; ObjectID = "dIM-hU-vOx"; */ +"dIM-hU-vOx.title" = "当退出V2RayX、关闭v2ray-core、使用手动模式时:"; + +/* Class = "NSTextFieldCell"; placeholderString = "tag"; ObjectID = "dYt-6I-wvZ"; */ +"dYt-6I-wvZ.placeholderString" = "tag"; + +/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "dYt-6I-wvZ"; */ +"dYt-6I-wvZ.title" = "Text Cell"; + +/* Class = "NSButtonCell"; title = "Protocol"; ObjectID = "eJB-Nw-fGt"; */ +"eJB-Nw-fGt.title" = "Protocol"; + +/* Class = "NSMenuItem"; title = "Item 1"; ObjectID = "h2c-ET-iJb"; */ +"h2c-ET-iJb.title" = "Item 1"; + +/* Class = "NSButtonCell"; title = "Inbound Tag"; ObjectID = "hTm-DB-j4B"; */ +"hTm-DB-j4B.title" = "Inbound Tag"; + +/* Class = "NSButtonCell"; title = "Change/setup password"; ObjectID = "hbo-B3-M63"; */ +"hbo-B3-M63.title" = "设置/更改密码"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "hp1-s7-XJV"; */ +"hp1-s7-XJV.title" = "取消"; + +/* Class = "NSTabViewItem"; label = "Rules"; ObjectID = "i0P-1v-Yeh"; */ +"i0P-1v-Yeh.label" = "代理规则"; + +/* Class = "NSButtonCell"; title = "Network:"; ObjectID = "j3B-yf-IFU"; */ +"j3B-yf-IFU.title" = "Network:"; + +/* Class = "NSButtonCell"; title = "Save"; ObjectID = "jQ2-JH-sjq"; */ +"jQ2-JH-sjq.title" = "Save"; + +/* Class = "NSMenuItem"; title = "Item 1"; ObjectID = "jok-h9-59Z"; */ +"jok-h9-59Z.title" = "Item 1"; + +/* Class = "NSTabViewItem"; label = "Configs"; ObjectID = "kZw-NT-AZ4"; */ +"kZw-NT-AZ4.label" = "配置"; + +/* Class = "NSTextFieldCell"; title = "Otherwise V2RayX will still use default v2ray core binaries. \nCompatibility is not guaranteed."; ObjectID = "ldu-SF-fOd"; */ +"ldu-SF-fOd.title" = "否则V2rayX仍将使用默认的v2ray core.\n替换它将不会保证兼容性,请慎重"; + +/* Class = "NSComboBoxCell"; m0j-kv-PFY.ibShadowedObjectValues[0] = "Item 1"; ObjectID = "m0j-kv-PFY"; */ +"m0j-kv-PFY.ibShadowedObjectValues[0]" = "Item 1"; + +/* Class = "NSComboBoxCell"; m0j-kv-PFY.ibShadowedObjectValues[1] = "Item 2"; ObjectID = "m0j-kv-PFY"; */ +"m0j-kv-PFY.ibShadowedObjectValues[1]" = "Item 2"; + +/* Class = "NSComboBoxCell"; m0j-kv-PFY.ibShadowedObjectValues[2] = "Item 3"; ObjectID = "m0j-kv-PFY"; */ +"m0j-kv-PFY.ibShadowedObjectValues[2]" = "Item 3"; + +/* Class = "NSTextFieldCell"; title = "Rule Set Name:"; ObjectID = "nds-1r-ppI"; */ +"nds-1r-ppI.title" = "规则名称:"; + +/* Class = "NSMenuItem"; title = "Turn off system proxy"; ObjectID = "pJL-wh-M4Z"; */ +"pJL-wh-M4Z.title" = "关闭系统代理"; + +/* Class = "NSButtonCell"; title = "Enable Ecryption"; ObjectID = "qR7-nu-QAT"; */ +"qR7-nu-QAT.title" = "开启加密"; + +/* Class = "NSTextFieldCell"; title = "Save your airport subscription link here and refresh config from server list in menubar icon."; ObjectID = "qfa-aV-cmn"; */ +"qfa-aV-cmn.title" = "请在此添加订阅链接,用以更新服务器列表"; + +/* Class = "NSMenuItem"; title = "Item 2"; ObjectID = "rBE-Wt-bzW"; */ +"rBE-Wt-bzW.title" = "Item 2"; + +/* Class = "NSButtonCell"; title = "Open..."; ObjectID = "sPe-U4-330"; */ +"sPe-U4-330.title" = "打开..."; + +/* Class = "NSTextFieldCell"; title = "To fully take control of the V2Ray core, directly provide the full path to complete configure files below."; ObjectID = "sQg-oW-z1H"; */ +"sQg-oW-z1H.title" = "若想自行配置V2Ray core,请在下面添加配置文件路径"; + +/* Class = "NSButtonCell"; title = "Edit list"; ObjectID = "tWE-zk-ucK"; */ +"tWE-zk-ucK.title" = "编辑列表"; + +/* Class = "NSMenuItem"; title = "Restore system proxy to original states"; ObjectID = "uYN-nr-DtG"; */ +"uYN-nr-DtG.title" = "重置系统代理"; + +/* Class = "NSTabViewItem"; label = "Outbounds"; ObjectID = "ubo-eB-GSJ"; */ +"ubo-eB-GSJ.label" = "出站协议配置"; diff --git a/V2RayX/zh-Hans.lproj/ConfigWindow.strings b/V2RayX/zh-Hans.lproj/ConfigWindow.strings new file mode 100644 index 0000000..ebad10d --- /dev/null +++ b/V2RayX/zh-Hans.lproj/ConfigWindow.strings @@ -0,0 +1,150 @@ + +/* Class = "NSButtonCell"; title = "Import..."; ObjectID = "0Vd-cX-tz4"; */ +"0Vd-cX-tz4.title" = "导入配置..."; + +/* Class = "NSMenuItem"; title = "chacha20-poly1305"; ObjectID = "1SH-Qb-KKl"; */ +"1SH-Qb-KKl.title" = "chacha20-poly1305"; + +/* Class = "NSBox"; title = "Box"; ObjectID = "2Sy-sC-XkW"; */ +"2Sy-sC-XkW.title" = "Box"; + +/* Class = "NSMenuItem"; title = "quic"; ObjectID = "54R-sf-YVo"; */ +"54R-sf-YVo.title" = "quic"; + +/* Class = "NSMenuItem"; title = "kcp"; ObjectID = "5Eb-2c-mug"; */ +"5Eb-2c-mug.title" = "kcp"; + +/* Class = "NSTextFieldCell"; title = "seperated by comma(,)"; ObjectID = "5N8-C0-QJV"; */ +"5N8-C0-QJV.title" = "请使用英文逗号(,)分割"; + +/* Class = "NSMenuItem"; title = "Import from other links..."; ObjectID = "8rA-16-mml"; */ +"8rA-16-mml.title" = "使用其它协议的URL导入..."; + +/* Class = "NSMenuItem"; title = "aes-128-gcm"; ObjectID = "92F-Fh-RHW"; */ +"92F-Fh-RHW.title" = "aes-128-gcm"; + +/* Class = "NSMenuItem"; title = "Import from standard share links..."; ObjectID = "CTZ-Lq-X8f"; */ +"CTZ-Lq-X8f.title" = "使用标准ss或vmess协议的URL导入..."; + +/* Class = "NSTextFieldCell"; title = "Network:"; ObjectID = "Dkz-gS-91s"; */ +"Dkz-gS-91s.title" = "协议:"; + +/* Class = "NSMenuItem"; title = "Import from pastboard..."; ObjectID = "EQb-nS-Lf9"; */ +"EQb-nS-Lf9.title" = "从剪贴板导入..."; + +/* Class = "NSTextFieldCell"; title = "Label"; ObjectID = "Eo2-Yu-0N0"; */ +"Eo2-Yu-0N0.title" = "Label"; + +/* Class = "NSTextFieldCell"; title = "Local Socks5 Port:"; ObjectID = "FRd-8H-tqe"; */ +"FRd-8H-tqe.title" = "Socks5代理端口:"; + +/* Class = "NSMenuItem"; title = "tcp"; ObjectID = "Jhw-Hk-xHQ"; */ +"Jhw-Hk-xHQ.title" = "tcp"; + +/* Class = "NSTableColumn"; headerCell.title = "Server list"; ObjectID = "KrX-3H-19h"; */ +"KrX-3H-19h.headerCell.title" = "Server list"; + +/* Class = "NSTextFieldCell"; title = "alterId:"; ObjectID = "MGr-Dc-svg"; */ +"MGr-Dc-svg.title" = "alterId:"; + +/* Class = "NSButtonCell"; title = "Advanced..."; ObjectID = "MOG-35-OP1"; */ +"MOG-35-OP1.title" = "高级..."; + +/* Class = "NSTextFieldCell"; title = ":"; ObjectID = "MdF-cg-Cxu"; */ +"MdF-cg-Cxu.title" = ":"; + +/* Class = "NSMenuItem"; title = "info"; ObjectID = "O9h-My-OpK"; */ +"O9h-My-OpK.title" = "info"; + +/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "OSC-ac-Duc"; */ +"OSC-ac-Duc.title" = "Text Cell"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "OfO-BZ-76k"; */ +"OfO-BZ-76k.title" = "确定"; + +/* Class = "NSMenuItem"; title = "http/2"; ObjectID = "PLv-I0-cbi"; */ +"PLv-I0-cbi.title" = "http/2"; + +/* Class = "NSMenuItem"; title = "WebSocket"; ObjectID = "PPM-JS-9Su"; */ +"PPM-JS-9Su.title" = "WebSocket"; + +/* Class = "NSMenuItem"; title = "warning"; ObjectID = "Qko-Qu-7CT"; */ +"Qko-Qu-7CT.title" = "warning"; + +/* Class = "NSWindow"; title = "V2RayX"; ObjectID = "QvC-M9-y7g"; */ +"QvC-M9-y7g.title" = "V2RayX"; + +/* Class = "NSButtonCell"; title = "Share Over LAN"; ObjectID = "TXX-VD-4P4"; */ +"TXX-VD-4P4.title" = "允许局域网访问"; + +/* Class = "NSTextFieldCell"; title = "VMess Servers:"; ObjectID = "UpZ-NV-drp"; */ +"UpZ-NV-drp.title" = "VMess 服务器:"; + +/* Class = "NSTextFieldCell"; title = "Log level:"; ObjectID = "Vo6-Qu-ybt"; */ +"Vo6-Qu-ybt.title" = "日志级别:"; + +/* Class = "NSTextFieldCell"; title = "Security:"; ObjectID = "Yal-OT-vUv"; */ +"Yal-OT-vUv.title" = "加密方式:"; + +/* Class = "NSButtonCell"; title = "transport settings..."; ObjectID = "az9-1y-OFB"; */ +"az9-1y-OFB.title" = "连接配置..."; + +/* Class = "NSTextFieldCell"; title = "Address:"; ObjectID = "c8I-Ek-z9X"; */ +"c8I-Ek-z9X.title" = "地址:"; + +/* Class = "NSMenuItem"; title = "auto (suggested)"; ObjectID = "clS-ih-hzy"; */ +"clS-ih-hzy.title" = "auto (suggested)"; + +/* Class = "NSTextFieldCell"; title = "level:"; ObjectID = "dET-23-6A4"; */ +"dET-23-6A4.title" = "level:"; + +/* Class = "NSTextFieldCell"; title = "Local Http Port:"; ObjectID = "eGi-xf-mFk"; */ +"eGi-xf-mFk.title" = "Http代理端口:"; + +/* Class = "NSMenuItem"; title = "Import from standard JSON files..."; ObjectID = "eze-Oh-vyD"; */ +"eze-Oh-vyD.title" = "使用JSON配置文件导入..."; + +/* Class = "NSTextFieldCell"; title = "Multiline Label"; ObjectID = "fni-U3-ufg"; */ +"fni-U3-ufg.title" = "Multiline Label"; + +/* Class = "NSButton"; ibShadowedToolTip = "Restart V2Ray and connected to the selected server above"; ObjectID = "fnz-Bw-lGu"; */ +"fnz-Bw-lGu.ibShadowedToolTip" = "Restart V2Ray and connected to the selected server above"; + +/* Class = "NSMenuItem"; title = "none"; ObjectID = "foI-bt-EyF"; */ +"foI-bt-EyF.title" = "none"; + +/* Class = "NSMenuItem"; title = "none"; ObjectID = "gAx-gn-R2X"; */ +"gAx-gn-R2X.title" = "none"; + +/* Class = "NSButtonCell"; title = "show log"; ObjectID = "gkD-dq-Peq"; */ +"gkD-dq-Peq.title" = "查看日志"; + +/* Class = "NSMenuItem"; title = "debug"; ObjectID = "hRW-dz-Ls3"; */ +"hRW-dz-Ls3.title" = "debug"; + +/* Class = "NSTextFieldCell"; title = "User ID:"; ObjectID = "mWH-Q7-PYV"; */ +"mWH-Q7-PYV.title" = "User ID:"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "mkg-dU-bRq"; */ +"mkg-dU-bRq.title" = "取消"; + +/* Class = "NSTextFieldCell"; title = "If the local port is changed, the pac file also needs manual modification."; ObjectID = "nRL-kf-uam"; */ +"nRL-kf-uam.title" = "如果更改了默认的代理端口,PAC文件中的端口仍需手动编辑才可生效"; + +/* Class = "NSButtonCell"; title = "Support UDP"; ObjectID = "pEW-Gw-3ph"; */ +"pEW-Gw-3ph.title" = "开启UDP支持"; + +/* Class = "NSTextFieldCell"; title = "Tag:"; ObjectID = "qUb-Rh-lCr"; */ +"qUb-Rh-lCr.title" = "备注:"; + +/* Class = "NSTextFieldCell"; title = "DNS:"; ObjectID = "sKs-KL-14B"; */ +"sKs-KL-14B.title" = "DNS:"; + +/* Class = "NSButton"; ibShadowedToolTip = "Discard all the changes"; ObjectID = "sO7-Gh-BBo"; */ +"sO7-Gh-BBo.ibShadowedToolTip" = "Discard all the changes"; + +/* Class = "NSMenuItem"; title = "error"; ObjectID = "tFp-yp-GMw"; */ +"tFp-yp-GMw.title" = "error"; + +/* Class = "NSMenuItem"; title = "Item"; ObjectID = "tLs-gB-gFx"; */ +"tLs-gB-gFx.title" = "Item"; diff --git a/V2RayX/zh-Hans.lproj/Localizable.strings b/V2RayX/zh-Hans.lproj/Localizable.strings new file mode 100644 index 0000000..75d0dc4 --- /dev/null +++ b/V2RayX/zh-Hans.lproj/Localizable.strings @@ -0,0 +1,51 @@ +/* + Localizable.strings + V2RayX + + Created by Kevin on 2019/4/4. + Copyright © 2019 Project V2Ray. All rights reserved. + */ +"enter your subscription link here" = "在此输入链接"; +"%@ is not a valid v2ray config file" = "%@ 不是有效的v2ray配置文件"; +"NOT a valid json" = "无效的json"; +"Do you want to reset rule sets to original three ones?" = "确定重置配置吗?"; + +"two password do not match each other." = "两个密码不一致!请重新输入"; +"Error in parsing customized tcp http header!" = "无法解析自定义的tcp http header!"; +"Error in parsing customized WebSocket headers!" = "无法解析WebSocket headers!"; +"Both client and server must enable TLS to use HTTP/2 network! Enbale TLS in transport settings. Click \"Help\" if you need more information" = "要使用Http/2,服务器与客户端必须同时启用TLS! 请在连接配置中开启TLS。如果需要更多信息,请单击\"帮助\"。"; +"%@\ntag is not valid!" = "%@\n出站配置无效!"; +"tag %@ is reserved, please use another one!" = "配置 %@ 冲突,请重新选择!"; +"The two outbounds share the same tag: %@\n%@\nAND\n%@" = "两个配置不能相同: %@\n%@\n与\n%@"; + +"Support standard vmess:// and ss:// link. Standard vmess:// link is still under discussion. Use \"Import from other links...\" to import other links, for example, vmess:// invented by v2rayN." = "支持标准vmess://和ss://链接,vmess://链接标准仍在指定当中。使用\"使用其它协议的URL导入...\"来导入其它类型的链接, 例如由v2rayN导出的vmess://链接."; + +"Imported %lu vmess and %lu other protocol outbounds, %lu routing rule sets." = "已导入 %lu条vmess和%lu条其它协议的配置, 以及%lu条路由配置."; + +"V2RayX will try importing ssd://, vmess:// and http(s):// links from v2rayN and SSD(may cause failure)." = "V2RayX 将尝试导入v2rayN或SSD生成的ssd://,vmess://,http(s)://三种链接(可能会导入失败)"; + +"If you are running V2RayX for the first time, ignore this message. \nSorry, unknown settings!\nAll V2RayX settings will be reset." = "如果你是第一次运行V2rayX,请忽略这条信息。 \错误, 没有找到配置!\nV2RayX的所有配置将会被重置!"; +"Input Password" = "请输入密码"; +"input your password to continue" = "请输入密码"; +"input password to decrypt configurations" = "请输入密码解锁配置"; +"V2RayX needs to install a small tool to /Library/Application Support/V2RayX/ with administrator privileges to set system proxy quickly.\nOtherwise you need to type in the administrator password every time you change system proxy through V2RayX." = "V2RayX需要在/Library/Application Support/V2RayX/中安装小工具,这需要管理权限.\n否则每次配置系统代理时,将会提示输入管理权限密码"; + +"v2ray-core: loaded" = "v2ray-core: 已启动"; +"Unload core" = "关闭v2ray"; +"v2ray-core: unloaded" = "v2ray-core: 未启动"; +"Load core" = "启动v2ray"; +"The pac file will be reset to the original one coming with V2RayX. Are you sure to proceed?" = "PAC文件将会用默认PAC重置,确定继续吗?"; +"%@ is not writable!" = "%@ is not writable!"; +"no available servers, please add server profiles through config window." = "没有可用的服务器配置,请在\"服务器配置中添加服务器\""; +"Use All" = "全选"; + + +"success" = "成功"; +"Decrypt" = "解密"; +"Close" = "关闭"; +"Help" = "帮助"; +"Quit" = "退出"; +"Continue" = "继续"; +"Cancel" = "取消"; +"Yes" = "确定"; +"Install" = "安装"; diff --git a/V2RayX/zh-Hans.lproj/MainMenu.strings b/V2RayX/zh-Hans.lproj/MainMenu.strings new file mode 100644 index 0000000..60f4c91 --- /dev/null +++ b/V2RayX/zh-Hans.lproj/MainMenu.strings @@ -0,0 +1,465 @@ + +/* Class = "NSMenuItem"; title = "Configure..."; ObjectID = "0hJ-Jo-rS2"; */ +"0hJ-Jo-rS2.title" = "服务器配置..."; + +/* Class = "NSMenuItem"; title = "Global Mode"; ObjectID = "12u-76-Ytb"; */ +"12u-76-Ytb.title" = "全局模式"; + +/* Class = "NSMenuItem"; title = "Customize Toolbar…"; ObjectID = "1UK-8n-QPP"; */ +"1UK-8n-QPP.title" = "自定义工具栏..."; + +/* Class = "NSMenuItem"; title = "V2RayX"; ObjectID = "1Xt-HY-uBw"; */ +"1Xt-HY-uBw.title" = "V2RayX"; + +/* Class = "NSMenu"; title = "Find"; ObjectID = "1b7-l0-nxx"; */ +"1b7-l0-nxx.title" = "查找"; + +/* Class = "NSMenuItem"; title = "Lower"; ObjectID = "1tx-W0-xDw"; */ +"1tx-W0-xDw.title" = "Lower"; + +/* Class = "NSMenuItem"; title = "Upgrade"; ObjectID = "29h-Cl-9kt"; */ +"29h-Cl-9kt.title" = "Upgrade"; + +/* Class = "NSMenuItem"; title = "Quit"; ObjectID = "2N5-MP-9vf"; */ +"2N5-MP-9vf.title" = "退出"; + +/* Class = "NSMenuItem"; title = "Copy HTTP Proxy Shell Export Line"; ObjectID = "2fK-AZ-akH"; */ +"2fK-AZ-akH.title" = "复制 HTTP Proxy Shell 至剪贴板"; + +/* Class = "NSMenuItem"; title = "Raise"; ObjectID = "2h7-ER-AoG"; */ +"2h7-ER-AoG.title" = "Raise"; + +/* Class = "NSMenuItem"; title = "Transformations"; ObjectID = "2oI-Rn-ZJC"; */ +"2oI-Rn-ZJC.title" = "Transformations"; + +/* Class = "NSMenu"; title = "Spelling"; ObjectID = "3IN-sU-3Bg"; */ +"3IN-sU-3Bg.title" = "Spelling"; + +/* Class = "NSMenuItem"; title = "Edit pac file"; ObjectID = "3NY-51-bgh"; */ +"3NY-51-bgh.title" = "编辑PAC文件"; + +/* Class = "NSMenuItem"; title = "Use Default"; ObjectID = "3Om-Ey-2VK"; */ +"3Om-Ey-2VK.title" = "Use Default"; + +/* Class = "NSMenu"; title = "Speech"; ObjectID = "3rS-ZA-NoH"; */ +"3rS-ZA-NoH.title" = "Speech"; + +/* Class = "NSMenuItem"; title = "Server"; ObjectID = "3wi-Co-2Kd"; */ +"3wi-Co-2Kd.title" = "选择服务器"; + +/* Class = "NSMenuItem"; title = "Tighten"; ObjectID = "46P-cB-AYj"; */ +"46P-cB-AYj.title" = "Tighten"; + +/* Class = "NSMenuItem"; title = "Find"; ObjectID = "4EN-yA-p0u"; */ +"4EN-yA-p0u.title" = "Find"; + +/* Class = "NSMenuItem"; title = "Quit V2RayX"; ObjectID = "4sb-4s-VLi"; */ +"4sb-4s-VLi.title" = "退出 V2RayX"; + +/* Class = "NSMenuItem"; title = "Edit"; ObjectID = "5QF-Oa-p0T"; */ +"5QF-Oa-p0T.title" = "Edit"; + +/* Class = "NSMenuItem"; title = "View log"; ObjectID = "5Vg-qU-2V2"; */ +"5Vg-qU-2V2.title" = "查看日志"; + +/* Class = "NSMenuItem"; title = "Copy Style"; ObjectID = "5Vv-lz-BsD"; */ +"5Vv-lz-BsD.title" = "Copy Style"; + +/* Class = "NSMenuItem"; title = "About V2RayX"; ObjectID = "5kV-Vb-QxS"; */ +"5kV-Vb-QxS.title" = "关于 V2RayX"; + +/* Class = "NSMenuItem"; title = "Redo"; ObjectID = "6dh-zS-Vam"; */ +"6dh-zS-Vam.title" = "Redo"; + +/* Class = "NSMenuItem"; title = "Correct Spelling Automatically"; ObjectID = "78Y-hA-62v"; */ +"78Y-hA-62v.title" = "Correct Spelling Automatically"; + +/* Class = "NSMenu"; title = "Routing Rule"; ObjectID = "8Ld-d4-m0U"; */ +"8Ld-d4-m0U.title" = "路由规则"; + +/* Class = "NSMenuItem"; title = "Quit"; ObjectID = "8f2-cF-RxH"; */ +"8f2-cF-RxH.title" = "退出"; + +/* Class = "NSMenu"; title = "Writing Direction"; ObjectID = "8mr-sm-Yjd"; */ +"8mr-sm-Yjd.title" = "Writing Direction"; + +/* Class = "NSMenuItem"; title = "Substitutions"; ObjectID = "9ic-FL-obx"; */ +"9ic-FL-obx.title" = "Substitutions"; + +/* Class = "NSMenuItem"; title = "Smart Copy/Paste"; ObjectID = "9yt-4B-nSM"; */ +"9yt-4B-nSM.title" = "Smart Copy/Paste"; + +/* Class = "NSMenu"; title = "Main Menu"; ObjectID = "AYu-sK-qS6"; */ +"AYu-sK-qS6.title" = "Main Menu"; + +/* Class = "NSMenuItem"; title = "Preferences…"; ObjectID = "BOF-NM-1cW"; */ +"BOF-NM-1cW.title" = "Preferences…"; + +/* Class = "NSMenuItem"; title = "\tLeft to Right"; ObjectID = "BgM-ve-c93"; */ +"BgM-ve-c93.title" = "\tLeft to Right"; + +/* Class = "NSMenuItem"; title = "Save As…"; ObjectID = "Bw7-FT-i3A"; */ +"Bw7-FT-i3A.title" = "Save As…"; + +/* Class = "NSMenuItem"; title = "Update subscription"; ObjectID = "C3a-eC-bFQ"; */ +"C3a-eC-bFQ.title" = "Update subscription"; + +/* Class = "NSMenuItem"; title = "View current config.json..."; ObjectID = "C53-wG-wMg"; */ +"C53-wG-wMg.title" = "查看当前 config.json..."; + +/* Class = "NSMenuItem"; title = "PAC Mode"; ObjectID = "Cm9-3e-L2z"; */ +"Cm9-3e-L2z.title" = "PAC模式"; + +/* Class = "NSMenuItem"; title = "Close"; ObjectID = "DVo-aG-piG"; */ +"DVo-aG-piG.title" = "Close"; + +/* Class = "NSMenuItem"; title = "Spelling and Grammar"; ObjectID = "Dv1-io-Yv7"; */ +"Dv1-io-Yv7.title" = "Spelling and Grammar"; + +/* Class = "NSMenuItem"; title = "core status"; ObjectID = "EFa-yl-fQC"; */ +"EFa-yl-fQC.title" = "core status"; + +/* Class = "NSMenu"; title = "Help"; ObjectID = "F2S-fz-NVQ"; */ +"F2S-fz-NVQ.title" = "帮助"; + +/* Class = "NSMenuItem"; title = "V2RayX Help"; ObjectID = "FKE-Sm-Kum"; */ +"FKE-Sm-Kum.title" = "V2RayX Help"; + +/* Class = "NSMenuItem"; title = "Text"; ObjectID = "Fal-I4-PZk"; */ +"Fal-I4-PZk.title" = "Text"; + +/* Class = "NSMenu"; title = "Substitutions"; ObjectID = "FeM-D8-WVr"; */ +"FeM-D8-WVr.title" = "Substitutions"; + +/* Class = "NSMenuItem"; title = "Bold"; ObjectID = "GB9-OM-e27"; */ +"GB9-OM-e27.title" = "Bold"; + +/* Class = "NSMenu"; title = "Format"; ObjectID = "GEO-Iw-cKr"; */ +"GEO-Iw-cKr.title" = "Format"; + +/* Class = "NSMenuItem"; title = "Use Default"; ObjectID = "GUa-eO-cwY"; */ +"GUa-eO-cwY.title" = "Use Default"; + +/* Class = "NSMenuItem"; title = "Font"; ObjectID = "Gi5-1S-RQB"; */ +"Gi5-1S-RQB.title" = "Font"; + +/* Class = "NSMenuItem"; title = "Writing Direction"; ObjectID = "H1b-Si-o9J"; */ +"H1b-Si-o9J.title" = "Writing Direction"; + +/* Class = "NSMenuItem"; title = "View"; ObjectID = "H8h-7b-M4v"; */ +"H8h-7b-M4v.title" = "View"; + +/* Class = "NSMenuItem"; title = "Text Replacement"; ObjectID = "HFQ-gK-NFA"; */ +"HFQ-gK-NFA.title" = "Text Replacement"; + +/* Class = "NSMenuItem"; title = "Show Spelling and Grammar"; ObjectID = "HFo-cy-zxI"; */ +"HFo-cy-zxI.title" = "Show Spelling and Grammar"; + +/* Class = "NSMenu"; title = "View"; ObjectID = "HyV-fh-RgO"; */ +"HyV-fh-RgO.title" = "View"; + +/* Class = "NSMenuItem"; title = "Subscript"; ObjectID = "I0S-gh-46l"; */ +"I0S-gh-46l.title" = "Subscript"; + +/* Class = "NSMenuItem"; title = "load/unload core"; ObjectID = "I9I-uu-xak"; */ +"I9I-uu-xak.title" = "load/unload core"; + +/* Class = "NSMenuItem"; title = "Open…"; ObjectID = "IAo-SY-fd9"; */ +"IAo-SY-fd9.title" = "Open…"; + +/* Class = "NSMenuItem"; title = "Justify"; ObjectID = "J5U-5w-g23"; */ +"J5U-5w-g23.title" = "Justify"; + +/* Class = "NSMenuItem"; title = "Use None"; ObjectID = "J7y-lM-qPV"; */ +"J7y-lM-qPV.title" = "Use None"; + +/* Class = "NSMenuItem"; title = "Revert to Saved"; ObjectID = "KaW-ft-85H"; */ +"KaW-ft-85H.title" = "Revert to Saved"; + +/* Class = "NSMenuItem"; title = "Show All"; ObjectID = "Kd2-mp-pUS"; */ +"Kd2-mp-pUS.title" = "Show All"; + +/* Class = "NSMenuItem"; title = "Bring All to Front"; ObjectID = "LE2-aR-0XJ"; */ +"LE2-aR-0XJ.title" = "Bring All to Front"; + +/* Class = "NSMenuItem"; title = "Paste Ruler"; ObjectID = "LVM-kO-fVI"; */ +"LVM-kO-fVI.title" = "Paste Ruler"; + +/* Class = "NSMenuItem"; title = "\tLeft to Right"; ObjectID = "Lbh-J2-qVU"; */ +"Lbh-J2-qVU.title" = "\tLeft to Right"; + +/* Class = "NSMenuItem"; title = "Copy Ruler"; ObjectID = "MkV-Pr-PK5"; */ +"MkV-Pr-PK5.title" = "Copy Ruler"; + +/* Class = "NSMenuItem"; title = "Services"; ObjectID = "NMo-om-nkz"; */ +"NMo-om-nkz.title" = "Services"; + +/* Class = "NSMenuItem"; title = "\tDefault"; ObjectID = "Nop-cj-93Q"; */ +"Nop-cj-93Q.title" = "\tDefault"; + +/* Class = "NSMenuItem"; title = "Minimize"; ObjectID = "OY7-WF-poV"; */ +"OY7-WF-poV.title" = "Minimize"; + +/* Class = "NSMenuItem"; title = "Baseline"; ObjectID = "OaQ-X3-Vso"; */ +"OaQ-X3-Vso.title" = "Baseline"; + +/* Class = "NSMenuItem"; title = "Hide V2RayX"; ObjectID = "Olw-nP-bQN"; */ +"Olw-nP-bQN.title" = "Hide V2RayX"; + +/* Class = "NSMenuItem"; title = "Find Previous"; ObjectID = "OwM-mh-QMV"; */ +"OwM-mh-QMV.title" = "Find Previous"; + +/* Class = "NSMenuItem"; title = "Stop Speaking"; ObjectID = "Oyz-dy-DGm"; */ +"Oyz-dy-DGm.title" = "Stop Speaking"; + +/* Class = "NSMenuItem"; title = "Manual Mode"; ObjectID = "P4q-kj-6fs"; */ +"P4q-kj-6fs.title" = "手动模式"; + +/* Class = "NSMenuItem"; title = "Bigger"; ObjectID = "Ptp-SP-VEL"; */ +"Ptp-SP-VEL.title" = "Bigger"; + +/* Class = "NSMenuItem"; title = "Show Fonts"; ObjectID = "Q5e-8K-NDq"; */ +"Q5e-8K-NDq.title" = "Show Fonts"; + +/* Class = "NSMenuItem"; title = "Zoom"; ObjectID = "R4o-n2-Eq4"; */ +"R4o-n2-Eq4.title" = "Zoom"; + +/* Class = "NSMenuItem"; title = "\tRight to Left"; ObjectID = "RB4-Sm-HuC"; */ +"RB4-Sm-HuC.title" = "\tRight to Left"; + +/* Class = "NSMenuItem"; title = "Superscript"; ObjectID = "Rqc-34-cIF"; */ +"Rqc-34-cIF.title" = "Superscript"; + +/* Class = "NSMenuItem"; title = "Select All"; ObjectID = "Ruw-6m-B2m"; */ +"Ruw-6m-B2m.title" = "Select All"; + +/* Class = "NSMenuItem"; title = "Jump to Selection"; ObjectID = "S0p-oC-mLd"; */ +"S0p-oC-mLd.title" = "Jump to Selection"; + +/* Class = "NSMenu"; title = "Window"; ObjectID = "Td7-aD-5lo"; */ +"Td7-aD-5lo.title" = "Window"; + +/* Class = "NSMenuItem"; title = "Capitalize"; ObjectID = "UEZ-Bs-lqG"; */ +"UEZ-Bs-lqG.title" = "Capitalize"; + +/* Class = "NSMenuItem"; title = "Center"; ObjectID = "VIY-Ag-zcb"; */ +"VIY-Ag-zcb.title" = "Center"; + +/* Class = "NSMenuItem"; title = "Hide Others"; ObjectID = "Vdr-fp-XzO"; */ +"Vdr-fp-XzO.title" = "Hide Others"; + +/* Class = "NSMenuItem"; title = "Italic"; ObjectID = "Vjx-xi-njq"; */ +"Vjx-xi-njq.title" = "Italic"; + +/* Class = "NSMenu"; title = "Edit"; ObjectID = "W48-6f-4Dl"; */ +"W48-6f-4Dl.title" = "Edit"; + +/* Class = "NSMenuItem"; title = "Underline"; ObjectID = "WRG-CD-K1S"; */ +"WRG-CD-K1S.title" = "Underline"; + +/* Class = "NSMenuItem"; title = "New"; ObjectID = "Was-JA-tGl"; */ +"Was-JA-tGl.title" = "New"; + +/* Class = "NSMenuItem"; title = "Paste and Match Style"; ObjectID = "WeT-3V-zwk"; */ +"WeT-3V-zwk.title" = "Paste and Match Style"; + +/* Class = "NSMenuItem"; title = "Find…"; ObjectID = "Xz5-n4-O0W"; */ +"Xz5-n4-O0W.title" = "Find…"; + +/* Class = "NSMenuItem"; title = "Find and Replace…"; ObjectID = "YEy-JH-Tfz"; */ +"YEy-JH-Tfz.title" = "Find and Replace…"; + +/* Class = "NSMenuItem"; title = "\tDefault"; ObjectID = "YGs-j5-SAR"; */ +"YGs-j5-SAR.title" = "\tDefault"; + +/* Class = "NSMenuItem"; title = "Start Speaking"; ObjectID = "Ynk-f8-cLZ"; */ +"Ynk-f8-cLZ.title" = "Start Speaking"; + +/* Class = "NSMenuItem"; title = "Help"; ObjectID = "Yq1-i5-ecF"; */ +"Yq1-i5-ecF.title" = "帮助"; + +/* Class = "NSMenuItem"; title = "Align Left"; ObjectID = "ZM1-6Q-yy1"; */ +"ZM1-6Q-yy1.title" = "Align Left"; + +/* Class = "NSMenuItem"; title = "Paragraph"; ObjectID = "ZvO-Gk-QUH"; */ +"ZvO-Gk-QUH.title" = "Paragraph"; + +/* Class = "NSMenuItem"; title = "Print…"; ObjectID = "aTl-1u-JFS"; */ +"aTl-1u-JFS.title" = "Print…"; + +/* Class = "NSMenuItem"; title = "Window"; ObjectID = "aUF-d1-5bR"; */ +"aUF-d1-5bR.title" = "Window"; + +/* Class = "NSMenu"; title = "Font"; ObjectID = "aXa-aM-Jaq"; */ +"aXa-aM-Jaq.title" = "Font"; + +/* Class = "NSMenuItem"; title = "Use Default"; ObjectID = "agt-UL-0e3"; */ +"agt-UL-0e3.title" = "Use Default"; + +/* Class = "NSMenuItem"; title = "Routing Rule"; ObjectID = "bUi-AV-IfA"; */ +"bUi-AV-IfA.title" = "路由规则"; + +/* Class = "NSMenuItem"; title = "Show Colors"; ObjectID = "bgn-CT-cEk"; */ +"bgn-CT-cEk.title" = "Show Colors"; + +/* Class = "NSMenu"; title = "File"; ObjectID = "bib-Uj-vzu"; */ +"bib-Uj-vzu.title" = "File"; + +/* Class = "NSMenuItem"; title = "Use Selection for Find"; ObjectID = "buJ-ug-pKt"; */ +"buJ-ug-pKt.title" = "Use Selection for Find"; + +/* Class = "NSMenu"; title = "Transformations"; ObjectID = "c8a-y6-VQd"; */ +"c8a-y6-VQd.title" = "Transformations"; + +/* Class = "NSMenuItem"; title = "Use None"; ObjectID = "cDB-IK-hbR"; */ +"cDB-IK-hbR.title" = "Use None"; + +/* Class = "NSMenuItem"; title = "Selection"; ObjectID = "cqv-fj-IhA"; */ +"cqv-fj-IhA.title" = "Selection"; + +/* Class = "NSMenuItem"; title = "Smart Links"; ObjectID = "cwL-P1-jid"; */ +"cwL-P1-jid.title" = "Smart Links"; + +/* Class = "NSMenuItem"; title = "Make Lower Case"; ObjectID = "d9M-CD-aMd"; */ +"d9M-CD-aMd.title" = "Make Lower Case"; + +/* Class = "NSMenu"; title = "Text"; ObjectID = "d9c-me-L2H"; */ +"d9c-me-L2H.title" = "Text"; + +/* Class = "NSMenuItem"; title = "File"; ObjectID = "dMs-cI-mzQ"; */ +"dMs-cI-mzQ.title" = "File"; + +/* Class = "NSMenuItem"; title = "Undo"; ObjectID = "dRJ-4n-Yzg"; */ +"dRJ-4n-Yzg.title" = "Undo"; + +/* Class = "NSMenu"; title = "Server"; ObjectID = "eqU-gH-G4L"; */ +"eqU-gH-G4L.title" = "选择服务器"; + +/* Class = "NSMenuItem"; title = "About"; ObjectID = "esg-xy-8ve"; */ +"esg-xy-8ve.title" = "关于"; + +/* Class = "NSMenuItem"; title = "Paste"; ObjectID = "gVA-U4-sdL"; */ +"gVA-U4-sdL.title" = "Paste"; + +/* Class = "NSMenuItem"; title = "Input password..."; ObjectID = "h9O-kv-Vd7"; */ +"h9O-kv-Vd7.title" = "Input password..."; + +/* Class = "NSMenuItem"; title = "Smart Quotes"; ObjectID = "hQb-2v-fYv"; */ +"hQb-2v-fYv.title" = "Smart Quotes"; + +/* Class = "NSMenuItem"; title = "Check Document Now"; ObjectID = "hz2-CU-CR7"; */ +"hz2-CU-CR7.title" = "Check Document Now"; + +/* Class = "NSMenu"; title = "Services"; ObjectID = "hz9-B4-Xy5"; */ +"hz9-B4-Xy5.title" = "Services"; + +/* Class = "NSMenuItem"; title = "Smaller"; ObjectID = "i1d-Er-qST"; */ +"i1d-Er-qST.title" = "Smaller"; + +/* Class = "NSMenu"; title = "Baseline"; ObjectID = "ijk-EB-dga"; */ +"ijk-EB-dga.title" = "Baseline"; + +/* Class = "NSMenuItem"; title = "Kern"; ObjectID = "jBQ-r6-VK2"; */ +"jBQ-r6-VK2.title" = "Kern"; + +/* Class = "NSMenuItem"; title = "\tRight to Left"; ObjectID = "jFq-tB-4Kx"; */ +"jFq-tB-4Kx.title" = "\tRight to Left"; + +/* Class = "NSMenuItem"; title = "Format"; ObjectID = "jxT-CU-nIS"; */ +"jxT-CU-nIS.title" = "Format"; + +/* Class = "NSMenuItem"; title = "Check Grammar With Spelling"; ObjectID = "mK6-2p-4JG"; */ +"mK6-2p-4JG.title" = "Check Grammar With Spelling"; + +/* Class = "NSMenuItem"; title = "Authorize v2rayx_sysconf..."; ObjectID = "mOc-zi-Beb"; */ +"mOc-zi-Beb.title" = "安装/重置V2ray插件..."; + +/* Class = "NSMenuItem"; title = "Ligatures"; ObjectID = "o6e-r0-MWq"; */ +"o6e-r0-MWq.title" = "Ligatures"; + +/* Class = "NSMenuItem"; title = "Reset pac file"; ObjectID = "oGZ-uP-dny"; */ +"oGZ-uP-dny.title" = "重置PAC文件"; + +/* Class = "NSMenuItem"; title = "Backup/Export"; ObjectID = "oZx-KW-OLs"; */ +"oZx-KW-OLs.title" = "导出/备份配置"; + +/* Class = "NSMenu"; title = "Open Recent"; ObjectID = "oas-Oc-fiZ"; */ +"oas-Oc-fiZ.title" = "Open Recent"; + +/* Class = "NSMenuItem"; title = "Loosen"; ObjectID = "ogc-rX-tC1"; */ +"ogc-rX-tC1.title" = "Loosen"; + +/* Class = "NSMenuItem"; title = "Delete"; ObjectID = "pa3-QI-u2k"; */ +"pa3-QI-u2k.title" = "Delete"; + +/* Class = "NSMenuItem"; title = "Save…"; ObjectID = "pxx-59-PXV"; */ +"pxx-59-PXV.title" = "Save…"; + +/* Class = "NSMenuItem"; title = "Find Next"; ObjectID = "q09-fT-Sye"; */ +"q09-fT-Sye.title" = "Find Next"; + +/* Class = "NSMenuItem"; title = "Page Setup…"; ObjectID = "qIS-W8-SiK"; */ +"qIS-W8-SiK.title" = "Page Setup…"; + +/* Class = "NSMenuItem"; title = "Launch V2RayX at Login"; ObjectID = "qWo-oQ-HUT"; */ +"qWo-oQ-HUT.title" = "开机自动启动"; + +/* Class = "NSMenuItem"; title = "Check Spelling While Typing"; ObjectID = "rbD-Rh-wIN"; */ +"rbD-Rh-wIN.title" = "Check Spelling While Typing"; + +/* Class = "NSMenuItem"; title = "Smart Dashes"; ObjectID = "rgM-f4-ycn"; */ +"rgM-f4-ycn.title" = "Smart Dashes"; + +/* Class = "NSMenuItem"; title = "Show Toolbar"; ObjectID = "snW-S8-Cw5"; */ +"snW-S8-Cw5.title" = "Show Toolbar"; + +/* Class = "NSMenuItem"; title = "Data Detectors"; ObjectID = "tRr-pd-1PS"; */ +"tRr-pd-1PS.title" = "Data Detectors"; + +/* Class = "NSMenuItem"; title = "Open Recent"; ObjectID = "tXI-mr-wws"; */ +"tXI-mr-wws.title" = "Open Recent"; + +/* Class = "NSMenu"; title = "Kern"; ObjectID = "tlD-Oa-oAM"; */ +"tlD-Oa-oAM.title" = "Kern"; + +/* Class = "NSMenu"; title = "V2RayX"; ObjectID = "uQy-DD-JDr"; */ +"uQy-DD-JDr.title" = "V2RayX"; + +/* Class = "NSMenuItem"; title = "Cut"; ObjectID = "uRl-iY-unG"; */ +"uRl-iY-unG.title" = "Cut"; + +/* Class = "NSMenuItem"; title = "Paste Style"; ObjectID = "vKC-jM-MkH"; */ +"vKC-jM-MkH.title" = "Paste Style"; + +/* Class = "NSMenuItem"; title = "Show Ruler"; ObjectID = "vLm-3I-IUL"; */ +"vLm-3I-IUL.title" = "Show Ruler"; + +/* Class = "NSMenuItem"; title = "Clear Menu"; ObjectID = "vNY-rz-j42"; */ +"vNY-rz-j42.title" = "Clear Menu"; + +/* Class = "NSMenuItem"; title = "Make Upper Case"; ObjectID = "vmV-6d-7jI"; */ +"vmV-6d-7jI.title" = "Make Upper Case"; + +/* Class = "NSMenu"; title = "Ligatures"; ObjectID = "w0m-vy-SC9"; */ +"w0m-vy-SC9.title" = "Ligatures"; + +/* Class = "NSMenuItem"; title = "Align Right"; ObjectID = "wb2-vD-lq4"; */ +"wb2-vD-lq4.title" = "Align Right"; + +/* Class = "NSMenuItem"; title = "Help"; ObjectID = "wpr-3q-Mcd"; */ +"wpr-3q-Mcd.title" = "帮助"; + +/* Class = "NSMenuItem"; title = "Copy"; ObjectID = "x3v-GG-iWU"; */ +"x3v-GG-iWU.title" = "Copy"; + +/* Class = "NSMenuItem"; title = "Use All"; ObjectID = "xQD-1f-W4t"; */ +"xQD-1f-W4t.title" = "全选"; + +/* Class = "NSMenuItem"; title = "Speech"; ObjectID = "xrE-MZ-jX0"; */ +"xrE-MZ-jX0.title" = "Speech"; + +/* Class = "NSMenu"; title = "pac file"; ObjectID = "yno-KX-HOj"; */ +"yno-KX-HOj.title" = "pac file"; + +/* Class = "NSMenuItem"; title = "Show Substitutions"; ObjectID = "z6F-FW-3nz"; */ +"z6F-FW-3nz.title" = "Show Substitutions"; diff --git a/V2RayX/zh-Hans.lproj/TransportWindow.strings b/V2RayX/zh-Hans.lproj/TransportWindow.strings new file mode 100644 index 0000000..d4f2e4f --- /dev/null +++ b/V2RayX/zh-Hans.lproj/TransportWindow.strings @@ -0,0 +1,129 @@ + +/* Class = "NSTextFieldCell"; title = "Multiple hosts should be seperated by comma(,). No spaces."; ObjectID = "0jK-Zu-IjJ"; */ +"0jK-Zu-IjJ.title" = "多个地址请使用英文逗号(,)分隔,中间不能有空格"; + +/* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "2Tc-I8-c1W"; */ +"2Tc-I8-c1W.title" = "取消"; + +/* Class = "NSTabViewItem"; label = "HTTP/2"; ObjectID = "3a5-FH-jdA"; */ +"3a5-FH-jdA.label" = "HTTP/2"; + +/* Class = "NSTextFieldCell"; title = "{ \"Host\": \"v2ray.com\" }"; ObjectID = "5Nf-oY-kxe"; */ +"5Nf-oY-kxe.title" = "{ \"Host\": \"v2ray.com\" }"; + +/* Class = "NSTextFieldCell"; title = "security:"; ObjectID = "5jf-XH-tbH"; */ +"5jf-XH-tbH.title" = "security:"; + +/* Class = "NSTextFieldCell"; title = "header type:"; ObjectID = "AfV-VI-p2V"; */ +"AfV-VI-p2V.title" = "header type:"; + +/* Class = "NSTextFieldCell"; title = "mtu"; ObjectID = "BOl-9E-v9O"; */ +"BOl-9E-v9O.title" = "mtu"; + +/* Class = "NSTabViewItem"; label = "QUIC"; ObjectID = "DRH-Zh-vX2"; */ +"DRH-Zh-vX2.label" = "QUIC"; + +/* Class = "NSButtonCell"; title = "Reset All"; ObjectID = "FgQ-ns-dS8"; */ +"FgQ-ns-dS8.title" = "重置"; + +/* Class = "NSButtonCell"; title = "Help"; ObjectID = "Khe-UB-CcP"; */ +"Khe-UB-CcP.title" = "帮助"; + +/* Class = "NSTextFieldCell"; title = "path:"; ObjectID = "KmU-8N-PNy"; */ +"KmU-8N-PNy.title" = "path:"; + +/* Class = "NSTextFieldCell"; title = "\"headers\":"; ObjectID = "N1a-VD-e73"; */ +"N1a-VD-e73.title" = "\"headers\":"; + +/* Class = "NSTextFieldCell"; title = "read buffer size"; ObjectID = "NxV-UV-hGH"; */ +"NxV-UV-hGH.title" = "read buffer size"; + +/* Class = "NSTabViewItem"; label = "TCP"; ObjectID = "OFA-OY-bP4"; */ +"OFA-OY-bP4.label" = "TCP"; + +/* Class = "NSTextFieldCell"; title = "congestion"; ObjectID = "PeU-Y2-Tha"; */ +"PeU-Y2-Tha.title" = "congestion"; + +/* Class = "NSWindow"; title = "Window"; ObjectID = "QvC-M9-y7g"; */ +"QvC-M9-y7g.title" = "Window"; + +/* Class = "NSTabViewItem"; label = "···"; ObjectID = "QwI-cq-3dE"; */ +"QwI-cq-3dE.label" = "···"; + +/* Class = "NSButtonCell"; title = "Force Tcp Fast Open"; ObjectID = "Rjq-TS-APs"; */ +"Rjq-TS-APs.title" = "强制开启Tcp Fast"; + +/* Class = "NSTextFieldCell"; title = "downlink capacity"; ObjectID = "RrO-iQ-y0q"; */ +"RrO-iQ-y0q.title" = "downlink capacity"; + +/* Class = "NSButtonCell"; title = "TLS allowInsecure"; ObjectID = "Rxl-Fh-p8u"; */ +"Rxl-Fh-p8u.title" = "允许不加密的TLS"; + +/* Class = "NSTextFieldCell"; title = "header type"; ObjectID = "Uwv-C4-vWW"; */ +"Uwv-C4-vWW.title" = "header type"; + +/* Class = "NSTextFieldCell"; title = "Mux concurrency:"; ObjectID = "V4v-kP-BDQ"; */ +"V4v-kP-BDQ.title" = "Mux 并发数:"; + +/* Class = "NSTextFieldCell"; title = "tti"; ObjectID = "X10-mD-ytG"; */ +"X10-mD-ytG.title" = "tti"; + +/* Class = "NSButtonCell"; title = "Customize http-header"; ObjectID = "XK7-pb-uYz"; */ +"XK7-pb-uYz.title" = "自定义 http-header"; + +/* Class = "NSTextFieldCell"; title = "uplink capacity"; ObjectID = "a88-Re-zzm"; */ +"a88-Re-zzm.title" = "uplink capacity"; + +/* Class = "NSTextFieldCell"; title = "Example: "; ObjectID = "cJm-42-mob"; */ +"cJm-42-mob.title" = "示例: "; + +/* Class = "NSButtonCell"; title = "Use TLS"; ObjectID = "cY9-cQ-T9f"; */ +"cY9-cQ-T9f.title" = "使用TLS"; + +/* Class = "NSMenuItem"; title = "false"; ObjectID = "dOx-RU-DS8"; */ +"dOx-RU-DS8.title" = "false"; + +/* Class = "NSTextFieldCell"; title = "alpn:"; ObjectID = "eb7-WI-WKe"; */ +"eb7-WI-WKe.title" = "alpn:"; + +/* Class = "NSButtonCell"; title = "OK"; ObjectID = "eeS-8U-mHp"; */ +"eeS-8U-mHp.title" = "确定"; + +/* Class = "NSTextFieldCell"; title = "TLS serverName:"; ObjectID = "etO-0e-iiM"; */ +"etO-0e-iiM.title" = "TLS域名:"; + +/* Class = "NSButtonCell"; title = "Enable Mux"; ObjectID = "fd8-nx-L0h"; */ +"fd8-nx-L0h.title" = "开启 Mux"; + +/* Class = "NSTextFieldCell"; title = "host:"; ObjectID = "i9E-fj-OGM"; */ +"i9E-fj-OGM.title" = "host:"; + +/* Class = "NSTabViewItem"; label = "KCP"; ObjectID = "jR2-p0-bjc"; */ +"jR2-p0-bjc.label" = "KCP"; + +/* Class = "NSMenuItem"; title = "true"; ObjectID = "lAh-Af-Ylj"; */ +"lAh-Af-Ylj.title" = "true"; + +/* Class = "NSButtonCell"; title = "See Example"; ObjectID = "lrs-YU-384"; */ +"lrs-YU-384.title" = "查看示例"; + +/* Class = "NSTextFieldCell"; title = "path:"; ObjectID = "oah-mG-Lcv"; */ +"oah-mG-Lcv.title" = "path:"; + +/* Class = "NSTextFieldCell"; title = "key:"; ObjectID = "pOx-5i-iHo"; */ +"pOx-5i-iHo.title" = "key:"; + +/* Class = "NSTabViewItem"; label = "TLS"; ObjectID = "sCQ-Dt-YCG"; */ +"sCQ-Dt-YCG.label" = "TLS"; + +/* Class = "NSButtonCell"; title = "TLS allowInsecureCiphers"; ObjectID = "tGs-7I-7qD"; */ +"tGs-7I-7qD.title" = "允许不安全版本的TLS"; + +/* Class = "NSTextFieldCell"; title = "write buffer size"; ObjectID = "vY4-qQ-mjc"; */ +"vY4-qQ-mjc.title" = "write buffer size"; + +/* Class = "NSTextFieldCell"; title = "QUIC is now an experiment in V2Ray. It implements IETF specification. As the spec is still being standardized, compatibility can't be guaranteed."; ObjectID = "vZ8-pU-aE3"; */ +"vZ8-pU-aE3.title" = "QUIC现在是V2Ray的一个实验性质的功能。它实现了IETF规范。由于规范仍在标准化的进程当中,因此无法保证兼容性。"; + +/* Class = "NSTabViewItem"; label = "WebSocket"; ObjectID = "wRJ-HD-bnc"; */ +"wRJ-HD-bnc.label" = "WebSocket";