فهرست منبع

1.修改iOS Apex Drivers国际化。

Pen Li 7 سال پیش
والد
کامیت
2f53e3b52d

+ 14 - 0
Redant Drivers/Apex And Drivers.xcodeproj/project.pbxproj

@@ -173,6 +173,7 @@
 		42F0C5D720E20B3F00922442 /* RACameraViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 42F0C5D620E20B3E00922442 /* RACameraViewController.m */; };
 		42F3A32C21829EAC00AB0D3D /* date.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 42F3A32E21829EAC00AB0D3D /* date.storyboard */; };
 		42F3A3342182A53E00AB0D3D /* setting.json in Resources */ = {isa = PBXBuildFile; fileRef = 42F3A3362182A53E00AB0D3D /* setting.json */; };
+		42F3A33F2182BDA900AB0D3D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 42F3A3412182BDA900AB0D3D /* InfoPlist.strings */; };
 		42F624E5214BA4A100B1F012 /* RAMessageViewController+DataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 42F624E4214BA4A100B1F012 /* RAMessageViewController+DataSource.m */; };
 		42F624E8214BA4AF00B1F012 /* RAMessageViewController+Delegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 42F624E7214BA4AF00B1F012 /* RAMessageViewController+Delegate.m */; };
 		42F624EB214BA50D00B1F012 /* RAMessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 42F624EA214BA50D00B1F012 /* RAMessageCell.m */; };
@@ -535,6 +536,8 @@
 		42F3A3352182A53E00AB0D3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = Base; path = Base.lproj/setting.json; sourceTree = "<group>"; };
 		42F3A3372182A54100AB0D3D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = en; path = en.lproj/setting.json; sourceTree = "<group>"; };
 		42F3A3382182A54200AB0D3D /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = "zh-Hans"; path = "zh-Hans.lproj/setting.json"; sourceTree = "<group>"; };
+		42F3A3402182BDA900AB0D3D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		42F3A3422182BDAB00AB0D3D /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
 		42F624E3214BA4A100B1F012 /* RAMessageViewController+DataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RAMessageViewController+DataSource.h"; sourceTree = "<group>"; };
 		42F624E4214BA4A100B1F012 /* RAMessageViewController+DataSource.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RAMessageViewController+DataSource.m"; sourceTree = "<group>"; };
 		42F624E6214BA4AF00B1F012 /* RAMessageViewController+Delegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RAMessageViewController+Delegate.h"; sourceTree = "<group>"; };
@@ -610,6 +613,7 @@
 				71EAA33A20B95720002F003C /* Assets.xcassets */,
 				71EAA33C20B95720002F003C /* LaunchScreen.storyboard */,
 				71EAA33F20B95720002F003C /* Info.plist */,
+				42F3A3412182BDA900AB0D3D /* InfoPlist.strings */,
 				71EAA34020B95720002F003C /* main.m */,
 				429CF61E20E0E32E00CE8DAD /* Localizable.strings */,
 			);
@@ -1417,6 +1421,7 @@
 				424204DE20C6156E005AEED9 /* QRCode.storyboard in Resources */,
 				424204F020C66D2D005AEED9 /* PhotoPreview.storyboard in Resources */,
 				429CF61C20E0E32E00CE8DAD /* Localizable.strings in Resources */,
+				42F3A33F2182BDA900AB0D3D /* InfoPlist.strings in Resources */,
 				42810FF320E4CE1200315156 /* fake_more_order.json in Resources */,
 				4280034220C0F146004D4F50 /* LICENSE in Resources */,
 				42DCCC802181B1D60027A5BB /* Edit.storyboard in Resources */,
@@ -1702,6 +1707,15 @@
 			name = setting.json;
 			sourceTree = "<group>";
 		};
+		42F3A3412182BDA900AB0D3D /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				42F3A3402182BDA900AB0D3D /* en */,
+				42F3A3422182BDAB00AB0D3D /* zh-Hans */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
 		71EAA33720B9571B002F003C /* Main.storyboard */ = {
 			isa = PBXVariantGroup;
 			children = (

+ 1 - 1
Redant Drivers/Apex And Drivers/Base.lproj/Localizable.strings

@@ -85,7 +85,7 @@ CFBundleDisplayName="Apex & Drivers";
 "Allow" = "Allow";
 "Always ask" = "Always ask";
 "Reject" = "Reject";
-"Apex & Drivers need background send location" = "Apex & Drivers need background send location";
+"%@ need background send location" = "%@ need background send location";
 "Login" = "Login";
 "ver:%@.A%@" = "ver:%@.A%@";
 

+ 1 - 1
Redant Drivers/Apex And Drivers/Login/LoginViewController.m

@@ -81,7 +81,7 @@
     
     if (RASingleton.sharedInstance.backgroundReportType == RABackgroundReportTypeNone) {
     
-        UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Warning", nil) message:NSLocalizedString(@"Apex & Drivers need background send location", nil) preferredStyle:UIAlertControllerStyleAlert];
+        UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Warning", nil) message:[NSString localizedStringWithFormat:NSLocalizedString(@"%@ need background send location", nil),NSLocalizedString(@"CFBundleDisplayName", nil)] preferredStyle:UIAlertControllerStyleAlert];
         
         UIAlertAction *rejectAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Reject", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
             RASingleton.sharedInstance.backgroundReportType = RABackgroundReportTypeReject;

+ 2 - 2
Redant Drivers/Apex And Drivers/Setting/Model/RASettingAboutModel.m

@@ -21,8 +21,8 @@
 
 - (NSString *)appName {
     if (!_appName) {
-        NSDictionary *infoDic = [[NSBundle mainBundle] infoDictionary];
-        _appName = [infoDic objectForKey:@"CFBundleDisplayName"];
+//        NSDictionary *infoDic = [[NSBundle mainBundle] infoDictionary];
+        _appName = NSLocalizedString(@"CFBundleDisplayName", nil);
     }
     return _appName;
 }

+ 14 - 0
Redant Drivers/Apex And Drivers/en.lproj/InfoPlist.strings

@@ -0,0 +1,14 @@
+/* 
+  InfoPlist.strings
+  Apex And Drivers
+
+  Created by Jack on 2018/10/26.
+  Copyright © 2018年 USAI. All rights reserved.
+*/
+
+CFBundleDisplayName = "Apex & Drivers";
+NSCameraUsageDescription = "Take process evidence";
+NSLocationAlwaysAndWhenInUseUsageDescription = "Display location on map and navigation, report cargo location";
+NSLocationAlwaysUsageDescription = "Report cargo location";
+NSLocationUsageDescription = "Display location on map and navigation";
+NSLocationWhenInUseUsageDescription = "Display location on map and navigation";

+ 1 - 1
Redant Drivers/Apex And Drivers/en.lproj/Localizable.strings

@@ -86,7 +86,7 @@ CFBundleDisplayName="Apex & Drivers";
 "Allow" = "Allow";
 "Always ask" = "Always ask";
 "Reject" = "Reject";
-"Apex & Drivers need background send location" = "Apex & Drivers need background send location";
+"%@ need background send location" = "%@ need background send location";
 "Login" = "Login";
 "ver:%@.A%@" = "ver:%@.A%@";
 

+ 14 - 0
Redant Drivers/Apex And Drivers/zh-Hans.lproj/InfoPlist.strings

@@ -0,0 +1,14 @@
+/* 
+  InfoPlist.strings
+  Apex And Drivers
+
+  Created by Jack on 2018/10/26.
+  Copyright © 2018年 USAI. All rights reserved.
+*/
+
+CFBundleDisplayName = "Apex & Drivers";
+NSCameraUsageDescription = "采取过程证据";
+NSLocationAlwaysAndWhenInUseUsageDescription = "在地图和导航上显示位置,报告货物位置";
+NSLocationAlwaysUsageDescription = "报告货物位置";
+NSLocationUsageDescription = "在地图和导航上显示位置";
+NSLocationWhenInUseUsageDescription = "在地图和导航上显示位置";

+ 1 - 1
Redant Drivers/Apex And Drivers/zh-Hans.lproj/Localizable.strings

@@ -86,7 +86,7 @@ CFBundleDisplayName="汽车人";
 "Allow" = "允许";
 "Always ask" = "每次询问";
 "Reject" = "拒绝";
-"Apex & Drivers need background send location" = "Apex & Drivers 需要后台发送位置给后台";
+"%@ need background send location" = "%@ 需要后台发送位置给服务器";
 "Login" = "登陆";
 "ver:%@.A%@" = "版本:%@.A%@";