Browse Source

多语言问题修改

桂欢 1 year ago
parent
commit
abf62ecf43

+ 1 - 1
SLAiELTS/SLAiELTS/Tool/Views/SLVerifiButton.m

@@ -97,7 +97,7 @@
 
     }else{
         
-        [self setTitle:[NSString stringWithFormat:@"%ld秒",_nCount] forState:UIControlStateNormal];
+        [self setTitle:[NSString stringWithFormat:@"%ld%@",_nCount,NSLocalizedString(@"秒", nil)] forState:UIControlStateNormal];
 //        [self setTitleColor:SLColor(@"E84848") forState:UIControlStateNormal];
 
     }

+ 3 - 3
SLAiELTS/SLAiELTS/Vendor/Resources/en.lproj/Localizable.strings

@@ -119,9 +119,9 @@
 "全部" = "All";
 "  已添加  " = "  Added  ";
 "   添加   " = "  Add  ";
-"男性" = "male";
-"男性" = "male";
-"性" = "male";
+"秒" = "s";
+"音" = "Accent";
+"性" = "male";
 "男性" = "male";
 "男性" = "male";
 "男性" = "male";

+ 3 - 3
SLAiELTS/SLAiELTS/ViewControllers/MyVC/VCs/SLAiSetVc.m

@@ -120,7 +120,7 @@
     NSString *speechRate = [[RoleModel roleModelDict] objectForKey:title];
     if ([SLGlobalInfo SharedInstance].loginInfo && speechRate) {
         RoleModel *model = [RoleModel mj_objectWithKeyValues:[[SLGlobalInfo SharedInstance].roleModel mj_keyValues]];
-        if ([title containsString:@"音"]) {
+        if ([title containsString:NSLocalizedString(@"音", nil)]) {
             model.language = speechRate;
         }else {
             model.speechRate = speechRate;
@@ -130,8 +130,8 @@
 
             }];
         });
-        NSString *url = [title containsString:@"音"] ? @"/api/User/UpdateAILanguage" : @"/api/User/UpdateSpeechRate";
-        NSDictionary *params = [title containsString:@"音"] ? @{@"language" : speechRate} : @{@"speechRate" : speechRate};
+        NSString *url = [title containsString:NSLocalizedString(@"音", nil)] ? @"/api/User/UpdateAILanguage" : @"/api/User/UpdateSpeechRate";
+        NSDictionary *params = [title containsString:NSLocalizedString(@"音", nil)] ? @{@"language" : speechRate} : @{@"speechRate" : speechRate};
         [[SLHttpCenter SharedInstance] getWithUrl:url parameter:params success:^(id responseObject) {
             [SLGlobalInfo SharedInstance].roleModel = model;
         } failure:^(SPRequestError *error) {

+ 2 - 2
SLAiELTS/SLAiELTS/ViewControllers/RoleLabelVC/Views/SLRoleLabelView.m

@@ -276,9 +276,9 @@
             break;
         case SLRoleLanguage:
         {   //XXXXXXXXXX
-            if ([title containsString:@"音"]) {
+            if ([title containsString:NSLocalizedString(@"音", nil)]) {
                 self.roleModel.language = value;
-            }else if ([title containsString:@"性"]) {
+            }else if ([title containsString:NSLocalizedString(@"性", nil)]) {
                 self.roleModel.aiSex = value;
             }else {
                 self.roleModel.speechRate = value;