Kaynağa Gözat

1.修改iOS Apex Drivers登陆提示文字国际化。

Pen Li 7 yıl önce
ebeveyn
işleme
fd1aa66f5d

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

@@ -76,6 +76,7 @@
 		4280034320C0F146004D4F50 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 4280033C20C0F145004D4F50 /* NSData+Base64.m */; };
 		4280034420C0F146004D4F50 /* NSData+CommonCrypto.m in Sources */ = {isa = PBXBuildFile; fileRef = 4280033E20C0F145004D4F50 /* NSData+CommonCrypto.m */; };
 		4280034520C0F146004D4F50 /* NSString+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 4280034020C0F145004D4F50 /* NSString+Base64.m */; };
+		429CF61C20E0E32E00CE8DAD /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 429CF61E20E0E32E00CE8DAD /* Localizable.strings */; };
 		42D8B8A320C2253E001C125F /* fake_order_list.json in Resources */ = {isa = PBXBuildFile; fileRef = 42D8B8A220C2253E001C125F /* fake_order_list.json */; };
 		42D8B8A820C23DD9001C125F /* RAOrderDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D8B8A720C23DD9001C125F /* RAOrderDetailViewController.m */; };
 		42D8B8AA20C23DF0001C125F /* Detail.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 42D8B8A920C23DF0001C125F /* Detail.storyboard */; };
@@ -233,6 +234,7 @@
 		4280033E20C0F145004D4F50 /* NSData+CommonCrypto.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+CommonCrypto.m"; sourceTree = "<group>"; };
 		4280033F20C0F145004D4F50 /* NSString+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Base64.h"; sourceTree = "<group>"; };
 		4280034020C0F145004D4F50 /* NSString+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Base64.m"; sourceTree = "<group>"; };
+		429CF61F20E0E35D00CE8DAD /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = "<group>"; };
 		42D8B8A220C2253E001C125F /* fake_order_list.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = fake_order_list.json; sourceTree = "<group>"; };
 		42D8B8A620C23DD9001C125F /* RAOrderDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAOrderDetailViewController.h; sourceTree = "<group>"; };
 		42D8B8A720C23DD9001C125F /* RAOrderDetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAOrderDetailViewController.m; sourceTree = "<group>"; };
@@ -336,6 +338,7 @@
 				71EAA33C20B95720002F003C /* LaunchScreen.storyboard */,
 				71EAA33F20B95720002F003C /* Info.plist */,
 				71EAA34020B95720002F003C /* main.m */,
+				429CF61E20E0E32E00CE8DAD /* Localizable.strings */,
 			);
 			name = Other;
 			sourceTree = "<group>";
@@ -778,6 +781,7 @@
 				4255EC8F20C5260400E5DA24 /* fake_order_edit.json in Resources */,
 				424204DE20C6156E005AEED9 /* QRCode.storyboard in Resources */,
 				424204F020C66D2D005AEED9 /* PhotoPreview.storyboard in Resources */,
+				429CF61C20E0E32E00CE8DAD /* Localizable.strings in Resources */,
 				4280034220C0F146004D4F50 /* LICENSE in Resources */,
 				4258D16120CE296E00067071 /* logout.png in Resources */,
 				425B97EA20C7BF4E00B35713 /* Upload.storyboard in Resources */,
@@ -876,6 +880,14 @@
 /* End PBXSourcesBuildPhase section */
 
 /* Begin PBXVariantGroup section */
+		429CF61E20E0E32E00CE8DAD /* Localizable.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				429CF61F20E0E35D00CE8DAD /* Base */,
+			);
+			name = Localizable.strings;
+			sourceTree = "<group>";
+		};
 		71EAA33720B9571B002F003C /* Main.storyboard */ = {
 			isa = PBXVariantGroup;
 			children = (

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

@@ -0,0 +1,18 @@
+/* 
+  Localized.strings
+  Apex And Drivers
+
+  Created by Jack on 2018/6/25.
+  Copyright © 2018年 USAI. All rights reserved.
+*/
+"alert_title_retrieve_success"="Retrieve successfully!!";
+"alert_msg_email_sent"="Email has been sent.";
+"ok"="Ok";
+"alert_title_error"="Error";
+"alert_msg_failed_retrieve_password"="Failed to retrieve password code %d";
+"alert_msg_uecanotempty"="User&Email can not be empty!";
+"alert_msg_upcanotempty"="User&Password can not be empty!";
+"net_not_available"="Network not available, please check.";
+"net_error"="Network error, can not access server.";
+"auth_error"="Can not login, user or password may not correct.";
+"ver_low"="Current App version is too low, please update.";

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

@@ -45,8 +45,8 @@
     if(user.length==0||password.length==0)
     {
         
-        UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"alert_title_error", nil) message:NSLocalizedString(@"alert_msg_upcanotempty", nil) preferredStyle:UIAlertControllerStyleAlert];
-        UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"ok", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+        UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"alert_title_error", @"Error") message:NSLocalizedString(@"alert_msg_upcanotempty", @"User&Password can not be empty!") preferredStyle:UIAlertControllerStyleAlert];
+        UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"ok", @"Ok") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
             
         }];
         
@@ -86,16 +86,16 @@
                 NSString* message = nil;
                 switch (ret) {
                     case RESULT_NET_NOTAVAILABLE:
-                        message = NSLocalizedString(@"net_not_available", nil);
+                        message = NSLocalizedString(@"net_not_available", @"Network not available, please check.");
                         break;
                     case RESULT_NET_ERROR:
-                        message = NSLocalizedString(@"net_error", nil);
+                        message = NSLocalizedString(@"net_error", @"Network error, can not access server.");
                         break;
                     case RESULT_FALSE:
-                        message = NSLocalizedString(@"auth_error", nil);
+                        message = NSLocalizedString(@"auth_error", @"Can not login, user or password may not correct.");
                         break;
                     case RESULT_VER_LOW:
-                        message = NSLocalizedString(@"ver_low", nil);
+                        message = NSLocalizedString(@"ver_low", @"Current App version is too low, please update.");
                         break;
                         
                     default:
@@ -103,8 +103,8 @@
                         break;
                 }
                 
-                UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"alert_title_error", nil) message:message preferredStyle:UIAlertControllerStyleAlert];
-                UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"ok", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+                UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"alert_title_error", @"Error") message:message preferredStyle:UIAlertControllerStyleAlert];
+                UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"ok", @"Ok") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
                     
                 }];
                 
@@ -269,7 +269,7 @@
 
 - (void)alertTitle:(NSString *)title withMessage:(NSString *)msg {
     UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:title message:msg preferredStyle:UIAlertControllerStyleAlert];
-    UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"ok", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+    UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"ok", @"Ok") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
         
     }];
     [alertVC addAction:okAction];

+ 6 - 6
Redant Drivers/Apex And Drivers/Login/RetrievePasswordViewController.m

@@ -41,8 +41,8 @@
     if(user.length==0||email.length==0)
     {
         
-        UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"alert_title_error", nil) message:NSLocalizedString(@"alert_msg_uecanotempty", nil) preferredStyle:UIAlertControllerStyleAlert];
-        UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"ok", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+        UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"alert_title_error", @"Error") message:NSLocalizedString(@"alert_msg_uecanotempty", @"User&Email can not be empty!") preferredStyle:UIAlertControllerStyleAlert];
+        UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"ok", @"Ok") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
             
         }];
         
@@ -74,8 +74,8 @@
                 
                 [self dismissViewControllerAnimated:true completion:^{
                     
-                    UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"alert_title_retrieve_success", nil) message:NSLocalizedString(@"alert_msg_email_sent", nil) preferredStyle:UIAlertControllerStyleAlert];
-                    UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"ok", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+                    UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"alert_title_retrieve_success", @"Retrieve successfully!!") message:NSLocalizedString(@"alert_msg_email_sent", @"Email has been sent.") preferredStyle:UIAlertControllerStyleAlert];
+                    UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"ok", @"Ok") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
                         
                     }];
                     
@@ -88,8 +88,8 @@
             else
             {
                 
-                UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"alert_title_error", nil) message:[NSString stringWithFormat:NSLocalizedString(@"alert_msg_failed_retrieve_password", nil),ret] preferredStyle:UIAlertControllerStyleAlert];
-                UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"ok", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+                UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"alert_title_error", @"Error") message:[NSString stringWithFormat:NSLocalizedString(@"alert_msg_failed_retrieve_password", @"Failed to retrieve password code %d"),ret] preferredStyle:UIAlertControllerStyleAlert];
+                UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"ok", @"Ok") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
                     
                 }];
                 

+ 7 - 0
Redant Drivers/Apex And Drivers/en.lproj/Localized.strings

@@ -0,0 +1,7 @@
+/* 
+  Localized.strings
+  Apex And Drivers
+
+  Created by Jack on 2018/6/25.
+  Copyright © 2018年 USAI. All rights reserved.
+*/