MaxKey 3 yıl önce
ebeveyn
işleme
6c2ffe9e4b
59 değiştirilmiş dosya ile 621 ekleme ve 416 silme
  1. 9 8
      maxkey-web-frontend/maxkey-web-app/src/app/routes/access/sessions/sessions.component.ts
  2. 10 11
      maxkey-web-frontend/maxkey-web-app/src/app/routes/config/accouts/accouts.component.ts
  3. 9 8
      maxkey-web-frontend/maxkey-web-app/src/app/routes/config/password/password.component.ts
  4. 29 29
      maxkey-web-frontend/maxkey-web-app/src/app/routes/config/profile/profile.component.html
  5. 12 5
      maxkey-web-frontend/maxkey-web-app/src/app/routes/config/profile/profile.component.ts
  6. 9 8
      maxkey-web-frontend/maxkey-web-app/src/app/routes/config/socials-associate/socials-associate.component.ts
  7. 12 10
      maxkey-web-frontend/maxkey-web-app/src/app/routes/config/socials-provider/socials-provider.component.ts
  8. 19 0
      maxkey-web-frontend/maxkey-web-app/src/assets/i18n/en-US.json
  9. 18 0
      maxkey-web-frontend/maxkey-web-app/src/assets/i18n/zh-CN.json
  10. 18 0
      maxkey-web-frontend/maxkey-web-app/src/assets/i18n/zh-TW.json
  11. 2 0
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/BaseEntity.ts
  12. 9 8
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/group-members/group-members-editer/group-members-editer.component.ts
  13. 8 6
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/group-members/group-members.component.ts
  14. 9 8
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/group-members/member-groups-editer/member-groups-editer.component.ts
  15. 9 8
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/groups/group-editer/group-editer.component.ts
  16. 11 10
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/groups/groups.component.ts
  17. 9 8
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/privileges/privileges-editer/privileges-editer.component.ts
  18. 11 10
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/privileges/privileges.component.ts
  19. 9 8
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/sessions/sessions.component.ts
  20. 6 4
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/accounts/account-editer/account-editer.component.ts
  21. 10 8
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/accounts/accounts.component.ts
  22. 6 4
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-basic-details-editer/app-basic-details-editer.component.ts
  23. 6 4
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-cas-details-editer/app-cas-details-editer.component.ts
  24. 6 4
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-extend-api-details-editer/app-extend-api-details-editer.component.ts
  25. 6 4
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-form-based-details-editer/app-form-based-details-editer.component.ts
  26. 6 4
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-jwt-details-editer/app-jwt-details-editer.component.ts
  27. 6 4
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-oauth20-details-editer/app-oauth20-details-editer.component.ts
  28. 6 4
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-saml20-details-editer/app-saml20-details-editer.component.ts
  29. 6 4
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-token-based-details-editer/app-token-based-details-editer.component.ts
  30. 11 10
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/apps.component.ts
  31. 9 8
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/accounts-strategy/accounts-strategy-editer/accounts-strategy-editer.component.ts
  32. 12 12
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/accounts-strategy/accounts-strategy.component.ts
  33. 12 12
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/adapters/adapters.component.ts
  34. 10 10
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/email-senders/email-senders.component.ts
  35. 9 7
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/institutions/institutions.component.ts
  36. 9 8
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/ldap-context/ldap-context.component.ts
  37. 9 8
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/password-policy/password-policy.component.ts
  38. 9 8
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/sms-provider/sms-provider.component.ts
  39. 9 8
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/socials-provider/socials-provider-editer/socials-provider-editer.component.ts
  40. 11 10
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/socials-provider/socials-provider.component.ts
  41. 9 8
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/synchronizers/synchronizer-editer/synchronizer-editer.component.ts
  42. 13 12
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/synchronizers/synchronizers.component.ts
  43. 14 10
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/organizations/organization-editer/organization-editer.component.ts
  44. 11 10
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/organizations/organizations.component.ts
  45. 19 8
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/privileges/privileges.component.ts
  46. 9 8
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/resources/resource-editer/resource-editer.component.ts
  47. 8 6
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/resources/resources.component.ts
  48. 9 8
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/role-members/member-roles-editer/member-roles-editer.component.ts
  49. 9 8
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/role-members/role-members-editer/role-members-editer.component.ts
  50. 8 6
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/role-members/role-members.component.ts
  51. 9 8
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/roles/role-editer/role-editer.component.ts
  52. 11 10
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/roles/roles.component.ts
  53. 9 7
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/password/password.component.ts
  54. 6 4
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/user-editer/user-editer.component.ts
  55. 16 5
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/users.component.html
  56. 10 8
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/users.component.ts
  57. 19 0
      maxkey-web-frontend/maxkey-web-mgt-app/src/assets/i18n/en-US.json
  58. 18 0
      maxkey-web-frontend/maxkey-web-mgt-app/src/assets/i18n/zh-CN.json
  59. 18 0
      maxkey-web-frontend/maxkey-web-mgt-app/src/assets/i18n/zh-TW.json

+ 9 - 8
maxkey-web-frontend/maxkey-web-app/src/app/routes/access/sessions/sessions.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -84,6 +84,7 @@ export class SessionsComponent implements OnInit {
     private fb: FormBuilder,
     private sessionsService: SessionsService,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -108,10 +109,10 @@ export class SessionsComponent implements OnInit {
 
     this.sessionsService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
       this.cdr.detectChanges();
     });

+ 10 - 11
maxkey-web-frontend/maxkey-web-app/src/app/routes/config/accouts/accouts.component.ts

@@ -1,29 +1,31 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { Component, ChangeDetectorRef, OnInit, Input } from '@angular/core';
+import { Component, ChangeDetectorRef, OnInit, Input, Inject } from '@angular/core';
 import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
 import { Router, ActivatedRoute } from '@angular/router';
+import { I18NService } from '@core';
+import { ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { environment } from '@env/environment';
 import { NzMessageService } from 'ng-zorro-antd/message';
 import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
 
 import { Accounts } from '../../../entity/Accounts';
 import { AccountsService } from '../../../service/accounts.service';
+
 @Component({
   selector: 'app-accouts',
   templateUrl: './accouts.component.html',
@@ -53,6 +55,7 @@ export class AccoutsComponent implements OnInit {
     private modalRef: NzModalRef,
     private accountsService: AccountsService,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -78,18 +81,14 @@ export class AccoutsComponent implements OnInit {
     this.accountsService.update(this.form.model).subscribe(res => {
       if (res.code == 0) {
         this.form.model.init(res.data);
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
         if (this.redirect_uri) {
           window.location.href = `${environment.api.baseUrl}${this.redirect_uri}`;
         }
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
     });
-    // } else {
-    //  this.formGroup.updateValueAndValidity({ onlySelf: true });
-    // this.msg.success(`提交失败`);
-    //}
     this.form.submitting = false;
     this.cdr.detectChanges();
   }

+ 9 - 8
maxkey-web-frontend/maxkey-web-app/src/app/routes/config/password/password.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient, SettingsService, User } from '@delon/theme';
+import { I18NService } from '@core';
+import { SettingsService, User, ALAIN_I18N_TOKEN } from '@delon/theme';
 import { NzMessageService } from 'ng-zorro-antd/message';
 
 import { ChangePassword } from '../../../entity/ChangePassword';
@@ -48,6 +48,7 @@ export class PasswordComponent implements OnInit {
     private settingsService: SettingsService,
     private passwordService: PasswordService,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -74,9 +75,9 @@ export class PasswordComponent implements OnInit {
     this.passwordService.changePassword(this.form.model).subscribe(res => {
       if (res.code == 0) {
         this.form.model.init(res.data);
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
     });
     // } else {

+ 29 - 29
maxkey-web-frontend/maxkey-web-app/src/app/routes/config/profile/profile.component.html

@@ -31,7 +31,7 @@
                     </nz-form-label>
                     <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                       nzErrorTip="The input is not valid username!">
-                      <input [(ngModel)]="form.model.username" [ngModelOptions]="{ standalone: true }" nz-input
+                      <input [(ngModel)]="form.model.username" disabled [ngModelOptions]="{ standalone: true }" nz-input
                         name="username" id="username" />
                     </nz-form-control>
                   </div>
@@ -74,7 +74,7 @@
                   </nz-form-label>
                   <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                     nzErrorTip="The input is not valid employeeNumber!">
-                    <input [(ngModel)]="form.model.employeeNumber" readonly [ngModelOptions]="{ standalone: true }"
+                    <input [(ngModel)]="form.model.employeeNumber" disabled [ngModelOptions]="{ standalone: true }"
                       nz-input name="employeeNumber" id="employeeNumber" />
                   </nz-form-control>
                 </nz-form-item>
@@ -82,8 +82,8 @@
                   <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="windowsAccount">{{ 'mxk.users.windowsAccount' | i18n }}
                   </nz-form-label>
                   <nz-form-control [nzSm]="16" [nzXs]="24" nzErrorTip="The input is not valid status!">
-                    <input [(ngModel)]="form.model.windowsAccount" [ngModelOptions]="{ standalone: true }" nz-input
-                      name="windowsAccount" id="windowsAccount" />
+                    <input disabled [(ngModel)]="form.model.windowsAccount" [ngModelOptions]="{ standalone: true }"
+                      nz-input name="windowsAccount" id="windowsAccount" />
                   </nz-form-control>
                 </nz-form-item>
               </div>
@@ -92,16 +92,16 @@
                   <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="mobile">{{ 'mxk.users.mobile' | i18n }}</nz-form-label>
                   <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                     nzErrorTip="The input is not valid mobile!">
-                    <input [(ngModel)]="form.model.mobile" readonly [ngModelOptions]="{ standalone: true }" nz-input
-                      name="mobile" id="mobile" />
+                    <input disabled [(ngModel)]="form.model.mobile" readonly [ngModelOptions]="{ standalone: true }"
+                      nz-input name="mobile" id="mobile" />
                   </nz-form-control>
                 </nz-form-item>
                 <nz-form-item>
                   <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="email">{{ 'mxk.users.email' | i18n }}</nz-form-label>
                   <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                     nzErrorTip="The input is not valid email!">
-                    <input [(ngModel)]="form.model.email" [ngModelOptions]="{ standalone: true }" nz-input name="email"
-                      id="email" />
+                    <input disabled [(ngModel)]="form.model.email" [ngModelOptions]="{ standalone: true }" nz-input
+                      name="email" id="email" />
                   </nz-form-control>
                 </nz-form-item>
               </div>
@@ -112,8 +112,8 @@
                   </nz-form-label>
                   <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                     nzErrorTip="The input is not valid userType!">
-                    <nz-select [(ngModel)]="form.model.userType" [ngModelOptions]="{ standalone: true }" name="userType"
-                      id="userType">
+                    <nz-select disabled [(ngModel)]="form.model.userType" [ngModelOptions]="{ standalone: true }"
+                      name="userType" id="userType">
                       <nz-option nzValue="EMPLOYEE" nzLabel="{{ 'mxk.users.userType.employee' | i18n }}"> </nz-option>
                       <nz-option nzValue="SUPPLIER" nzLabel="{{ 'mxk.users.userType.supplier' | i18n }}"> </nz-option>
                       <nz-option nzValue="CUSTOMER" nzLabel="{{ 'mxk.users.userType.customer' | i18n }}"> </nz-option>
@@ -132,7 +132,7 @@
                   </nz-form-label>
                   <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                     nzErrorTip="The input is not valid userState!">
-                    <nz-select [(ngModel)]="form.model.userState" [ngModelOptions]="{ standalone: true }"
+                    <nz-select disabled [(ngModel)]="form.model.userState" [ngModelOptions]="{ standalone: true }"
                       name="userState" id="userState">
                       <nz-option nzValue="RESIDENT" nzLabel="{{ 'mxk.users.userstate.resident' | i18n }}"> </nz-option>
                       <nz-option nzValue="WITHDRAWN" nzLabel="{{ 'mxk.users.userstate.withdrawn' | i18n }}">
@@ -150,7 +150,7 @@
                   </nz-form-label>
                   <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                     nzErrorTip="The input is not valid sortIndex!">
-                    <nz-input-number [(ngModel)]="form.model.sortIndex" [ngModelOptions]="{ standalone: true }"
+                    <nz-input-number disabled [(ngModel)]="form.model.sortIndex" [ngModelOptions]="{ standalone: true }"
                       [nzMin]="1" [nzMax]="100000" [nzStep]="1"></nz-input-number>
                   </nz-form-control>
                 </nz-form-item>
@@ -159,8 +159,8 @@
                   </nz-form-label>
                   <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                     nzErrorTip="The input is not valid status!">
-                    <nz-select [(ngModel)]="form.model.str_status" [ngModelOptions]="{ standalone: true }" name="status"
-                      id="status">
+                    <nz-select disabled [(ngModel)]="form.model.str_status" [ngModelOptions]="{ standalone: true }"
+                      name="status" id="status">
                       <nz-option nzValue="1" nzLabel="{{ 'mxk.users.status.active' | i18n }}"></nz-option>
                       <nz-option nzValue="2" nzLabel="{{ 'mxk.users.status.inactive' | i18n }}"></nz-option>
                       <nz-option nzValue="4" nzLabel="{{ 'mxk.users.status.forbidden' | i18n }}"></nz-option>
@@ -297,8 +297,8 @@
                   </nz-form-label>
                   <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                     nzErrorTip="The input is not valid organization!">
-                    <input [(ngModel)]="form.model.organization" [ngModelOptions]="{ standalone: true }" nz-input
-                      name="organization" id="organization" />
+                    <input disabled [(ngModel)]="form.model.organization" [ngModelOptions]="{ standalone: true }"
+                      nz-input name="organization" id="organization" />
                   </nz-form-control>
                 </nz-form-item>
                 <nz-form-item>
@@ -306,7 +306,7 @@
                   </nz-form-label>
                   <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                     nzErrorTip="The input is not valid division!">
-                    <input [(ngModel)]="form.model.division" [ngModelOptions]="{ standalone: true }" nz-input
+                    <input disabled [(ngModel)]="form.model.division" [ngModelOptions]="{ standalone: true }" nz-input
                       name="division" id="division" />
                   </nz-form-control>
                 </nz-form-item>
@@ -317,8 +317,8 @@
                   </nz-form-label>
                   <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                     nzErrorTip="The input is not valid departmentId!">
-                    <input [(ngModel)]="form.model.departmentId" [ngModelOptions]="{ standalone: true }" nz-input
-                      name="departmentId" id="departmentId" />
+                    <input disabled [(ngModel)]="form.model.departmentId" [ngModelOptions]="{ standalone: true }"
+                      nz-input name="departmentId" id="departmentId" />
                   </nz-form-control>
                 </nz-form-item>
                 <nz-form-item>
@@ -326,7 +326,7 @@
                   </nz-form-label>
                   <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                     nzErrorTip="The input is not valid department!">
-                    <input [(ngModel)]="form.model.department" [ngModelOptions]="{ standalone: true }" nz-input
+                    <input disabled [(ngModel)]="form.model.department" [ngModelOptions]="{ standalone: true }" nz-input
                       name="department" id="department" />
                   </nz-form-control>
                 </nz-form-item>
@@ -337,7 +337,7 @@
                   </nz-form-label>
                   <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                     nzErrorTip="The input is not valid departmentId!">
-                    <input [(ngModel)]="form.model.costCenter" [ngModelOptions]="{ standalone: true }" nz-input
+                    <input disabled [(ngModel)]="form.model.costCenter" [ngModelOptions]="{ standalone: true }" nz-input
                       name="costCenter" id="costCenter" />
                   </nz-form-control>
                 </nz-form-item>
@@ -346,7 +346,7 @@
                   </nz-form-label>
                   <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                     nzErrorTip="The input is not valid jobLevel!">
-                    <input [(ngModel)]="form.model.jobLevel" [ngModelOptions]="{ standalone: true }" nz-input
+                    <input disabled [(ngModel)]="form.model.jobLevel" [ngModelOptions]="{ standalone: true }" nz-input
                       name="jobLevel" id="jobLevel" />
                   </nz-form-control>
                 </nz-form-item>
@@ -357,7 +357,7 @@
                   </nz-form-label>
                   <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                     nzErrorTip="The input is not valid jobTitle!">
-                    <input [(ngModel)]="form.model.jobTitle" [ngModelOptions]="{ standalone: true }" nz-input
+                    <input disabled [(ngModel)]="form.model.jobTitle" [ngModelOptions]="{ standalone: true }" nz-input
                       name="jobTitle" id="jobTitle" />
                   </nz-form-control>
                 </nz-form-item>
@@ -365,7 +365,7 @@
                   <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="manager">{{ 'mxk.users.manager' | i18n }}</nz-form-label>
                   <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                     nzErrorTip="The input is not valid manager!">
-                    <input [(ngModel)]="form.model.manager" [ngModelOptions]="{ standalone: true }" nz-input
+                    <input disabled [(ngModel)]="form.model.manager" [ngModelOptions]="{ standalone: true }" nz-input
                       name="manager" id="manager" />
                   </nz-form-control>
                 </nz-form-item>
@@ -376,7 +376,7 @@
                   </nz-form-label>
                   <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                     nzErrorTip="The input is not valid assistant!">
-                    <input [(ngModel)]="form.model.assistant" [ngModelOptions]="{ standalone: true }" nz-input
+                    <input disabled [(ngModel)]="form.model.assistant" [ngModelOptions]="{ standalone: true }" nz-input
                       name="assistant" id="assistant" />
                   </nz-form-control>
                 </nz-form-item>
@@ -385,8 +385,8 @@
                   </nz-form-label>
                   <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                     nzErrorTip="The input is not valid workOfficeName!">
-                    <input [(ngModel)]="form.model.workOfficeName" [ngModelOptions]="{ standalone: true }" nz-input
-                      name="workOfficeName" id="workOfficeName" />
+                    <input disabled [(ngModel)]="form.model.workOfficeName" [ngModelOptions]="{ standalone: true }"
+                      nz-input name="workOfficeName" id="workOfficeName" />
                   </nz-form-control>
                 </nz-form-item>
               </div>
@@ -396,7 +396,7 @@
                   </nz-form-label>
                   <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                     nzErrorTip="The input is not valid entryDate!">
-                    <input [(ngModel)]="form.model.entryDate" [ngModelOptions]="{ standalone: true }" nz-input
+                    <input disabled [(ngModel)]="form.model.entryDate" [ngModelOptions]="{ standalone: true }" nz-input
                       name="entryDate" id="entryDate" />
                   </nz-form-control>
                 </nz-form-item>
@@ -405,7 +405,7 @@
                   </nz-form-label>
                   <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
                     nzErrorTip="The input is not valid quitDate!">
-                    <input [(ngModel)]="form.model.quitDate" [ngModelOptions]="{ standalone: true }" nz-input
+                    <input disabled [(ngModel)]="form.model.quitDate" [ngModelOptions]="{ standalone: true }" nz-input
                       name="quitDate" id="quitDate" />
                   </nz-form-control>
                 </nz-form-item>

+ 12 - 5
maxkey-web-frontend/maxkey-web-app/src/app/routes/config/profile/profile.component.ts

@@ -14,9 +14,10 @@
  * limitations under the License.
  */
 
-import { Component, ChangeDetectorRef, Input, OnInit } from '@angular/core';
+import { Component, ChangeDetectorRef, Input, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { environment } from '@env/environment';
 import format from 'date-fns/format';
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -95,7 +96,13 @@ export class ProfileComponent implements OnInit {
     }
   }
 
-  constructor(private usersService: UsersService, private fb: FormBuilder, private msg: NzMessageService, private cdr: ChangeDetectorRef) { }
+  constructor(
+    private usersService: UsersService,
+    private fb: FormBuilder,
+    private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
+    private cdr: ChangeDetectorRef
+  ) { }
 
   ngOnInit(): void {
     this.usersService.getProfile().subscribe(res => {
@@ -123,9 +130,9 @@ export class ProfileComponent implements OnInit {
     this.form.model.trans();
     this.usersService.updateProfile(this.form.model).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
       this.form.submitting = false;
       this.cdr.detectChanges();

+ 9 - 8
maxkey-web-frontend/maxkey-web-app/src/app/routes/config/socials-associate/socials-associate.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -92,6 +92,7 @@ export class SocialsAssociateComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -123,10 +124,10 @@ export class SocialsAssociateComponent implements OnInit {
     e.preventDefault();
     this.socialsAssociateService.delete(deleteId).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
       this.cdr.detectChanges();
     });

+ 12 - 10
maxkey-web-frontend/maxkey-web-app/src/app/routes/config/socials-provider/socials-provider.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -26,6 +26,7 @@ import { NzTableQueryParams } from 'ng-zorro-antd/table';
 
 import { SocialsProviderService } from '../../../service/socials-provider.service';
 import { set2String } from '../../../shared/index';
+
 @Component({
   selector: 'app-socials-provider',
   templateUrl: './socials-provider.component.html',
@@ -86,6 +87,7 @@ export class SocialsProviderComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -109,10 +111,10 @@ export class SocialsProviderComponent implements OnInit {
     e.preventDefault();
     this.socialsProviderService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });
@@ -161,10 +163,10 @@ export class SocialsProviderComponent implements OnInit {
     e.preventDefault();
     this.socialsProviderService.delete(deleteId).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });

+ 19 - 0
maxkey-web-frontend/maxkey-web-app/src/assets/i18n/en-US.json

@@ -643,6 +643,25 @@
 			"connector.syncTime": "SyncTime",
 			"connector.result": "Result"
 		},
+		"alert": {
+			"add":{
+				"success":"Add Success!",
+				"error":"Add Error!"
+			},
+			"update":{
+				"success":"Update Success!",
+				"error":"Update Error!"
+			},
+			"delete":{
+				"success":"Delete Success!",
+				"error":"Delete Error!"
+			},
+			"operate":{
+				"success":"Operate Success!",
+				"error":"Operate Error!"
+			}
+			
+		},
 		"text": {
 			"action": "Action",
 			"query": "Query",

+ 18 - 0
maxkey-web-frontend/maxkey-web-app/src/assets/i18n/zh-CN.json

@@ -647,6 +647,24 @@
 			"connector.syncTime": "时间",
 			"connector.result": "结果"
 		},
+		"alert": {
+			"add":{
+				"success":"新增成功!",
+				"error":"新增失败!"
+			},
+			"update":{
+				"success":"更新成功!",
+				"error":"更新失败!"
+			},
+			"delete":{
+				"success":"删除成功!",
+				"error":"删除失败!"
+			},
+			"operate":{
+				"success":"操作成功!",
+				"error":"操作失败!"
+			}
+		},
 		"text": {
 			"action": "操作",
 			"query": "查询",

+ 18 - 0
maxkey-web-frontend/maxkey-web-app/src/assets/i18n/zh-TW.json

@@ -647,6 +647,24 @@
 			"connector.syncTime": "時間",
 			"connector.result": "結果"
 		},
+		"alert": {
+			"add":{
+				"success":"新增成功!",
+				"error":"新增失敗!"
+			},
+			"update":{
+				"success":"更新成功!",
+				"error":"更新失敗!"
+			},
+			"delete":{
+				"success":"删除成功!",
+				"error":"删除失敗!"
+			},
+			"operate":{
+				"success":"操作成功!",
+				"error":"操作失敗!"
+			}
+		},
 		"text": {
 			"action": "操作",
 			"query": "查詢",

+ 2 - 0
maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/BaseEntity.ts

@@ -26,6 +26,8 @@ export class BaseEntity {
 
     constructor() {
         this.status = 1;
+        this.sortIndex = 1;
+        this.switch_status = true;
     }
     init(data: any): void {
         Object.assign(this, data);

+ 9 - 8
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/group-members/group-members-editer/group-members-editer.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ViewContainerRef, Input, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, Input, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -91,6 +91,7 @@ export class GroupMembersEditerComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -176,10 +177,10 @@ export class GroupMembersEditerComponent implements OnInit {
       this.query.submitLoading = false;
       this.query.tableLoading = false;
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
       this.cdr.detectChanges();
     });

+ 8 - 6
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/group-members/group-members.component.ts

@@ -14,10 +14,11 @@
  * limitations under the License.
  */
 
-import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
 import { ActivatedRoute, Router } from '@angular/router';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzContextMenuService, NzDropdownMenuComponent } from 'ng-zorro-antd/dropdown';
@@ -100,6 +101,7 @@ export class GroupMembersComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private route: ActivatedRoute,
     private cdr: ChangeDetectorRef
   ) { }
@@ -134,10 +136,10 @@ export class GroupMembersComponent implements OnInit {
     e.preventDefault();
     this.groupMembersService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });
@@ -206,10 +208,10 @@ export class GroupMembersComponent implements OnInit {
     e.preventDefault();
     this.groupMembersService.delete(deleteId).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });

+ 9 - 8
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/group-members/member-groups-editer/member-groups-editer.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Input } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Input, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -87,6 +87,7 @@ export class MemberGroupsEditerComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -172,10 +173,10 @@ export class MemberGroupsEditerComponent implements OnInit {
       this.query.submitLoading = false;
       this.query.tableLoading = false;
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
       this.cdr.detectChanges();
     });

+ 9 - 8
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/groups/group-editer/group-editer.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { Component, ChangeDetectorRef, Input, OnInit } from '@angular/core';
+import { Component, ChangeDetectorRef, Input, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import format from 'date-fns/format';
 import { NzMessageService } from 'ng-zorro-antd/message';
 import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
@@ -56,6 +56,7 @@ export class GroupEditerComponent implements OnInit {
     private groupsService: GroupsService,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -79,9 +80,9 @@ export class GroupEditerComponent implements OnInit {
     this.form.model.trans();
     (this.isEdit ? this.groupsService.update(this.form.model) : this.groupsService.add(this.form.model)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.success' : 'mxk.alert.add.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.error' : 'mxk.alert.add.error'));
       }
       this.form.submitting = false;
       this.modalRef.destroy({ refresh: true });

+ 11 - 10
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/groups/groups.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -88,6 +88,7 @@ export class GroupsComponent implements OnInit {
     private groupsService: GroupsService,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -111,10 +112,10 @@ export class GroupsComponent implements OnInit {
     e.preventDefault();
     this.groupsService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });
@@ -163,10 +164,10 @@ export class GroupsComponent implements OnInit {
     e.preventDefault();
     this.groupsService.delete(deleteId).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });

+ 9 - 8
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/privileges/privileges-editer/privileges-editer.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ViewContainerRef, Input, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, Input, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -90,6 +90,7 @@ export class PrivilegesEditerComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -175,10 +176,10 @@ export class PrivilegesEditerComponent implements OnInit {
       this.query.submitLoading = false;
       this.query.tableLoading = false;
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.add.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.add.error'));
       }
       this.cdr.detectChanges();
     });

+ 11 - 10
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/privileges/privileges.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzContextMenuService, NzDropdownMenuComponent } from 'ng-zorro-antd/dropdown';
@@ -101,6 +101,7 @@ export class PrivilegesComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef,
     private http: _HttpClient
   ) { }
@@ -127,10 +128,10 @@ export class PrivilegesComponent implements OnInit {
     e.preventDefault();
     this.groupPrivilegesService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });
@@ -180,10 +181,10 @@ export class PrivilegesComponent implements OnInit {
     e.preventDefault();
     this.groupPrivilegesService.delete(deleteId).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });

+ 9 - 8
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/sessions/sessions.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -84,6 +84,7 @@ export class SessionsComponent implements OnInit {
     private fb: FormBuilder,
     private sessionsService: SessionsService,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -108,10 +109,10 @@ export class SessionsComponent implements OnInit {
 
     this.sessionsService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
       this.cdr.detectChanges();
     });

+ 6 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/accounts/account-editer/account-editer.component.ts

@@ -14,9 +14,10 @@
  * limitations under the License.
  */
 
-import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit } from '@angular/core';
+import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import format from 'date-fns/format';
 import { NzMessageService } from 'ng-zorro-antd/message';
 import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
@@ -64,6 +65,7 @@ export class AccountEditerComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -153,9 +155,9 @@ export class AccountEditerComponent implements OnInit {
     this.form.model.trans();
     (this.isEdit ? this.accountsService.update(this.form.model) : this.accountsService.add(this.form.model)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.success' : 'mxk.alert.add.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.error' : 'mxk.alert.add.error'));
       }
       this.form.submitting = false;
       this.modalRef.destroy({ refresh: true });

+ 10 - 8
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/accounts/accounts.component.ts

@@ -14,10 +14,11 @@
  * limitations under the License.
  */
 
-import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
 import { ActivatedRoute, Router } from '@angular/router';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -92,6 +93,7 @@ export class AccountsComponent implements OnInit {
     private accountsService: AccountsService,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private route: ActivatedRoute,
     private cdr: ChangeDetectorRef
   ) { }
@@ -143,10 +145,10 @@ export class AccountsComponent implements OnInit {
     e.preventDefault();
     this.accountsService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });
@@ -196,10 +198,10 @@ export class AccountsComponent implements OnInit {
     e.preventDefault();
     this.accountsService.delete(deleteId).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });
@@ -209,10 +211,10 @@ export class AccountsComponent implements OnInit {
     e.preventDefault();
     this.accountsService.updateStatus({ id: accountId, status: status }).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
       this.cdr.detectChanges();
     });

+ 6 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-basic-details-editer/app-basic-details-editer.component.ts

@@ -14,9 +14,10 @@
  * limitations under the License.
  */
 
-import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit } from '@angular/core';
+import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import format from 'date-fns/format';
 import { NzMessageService } from 'ng-zorro-antd/message';
 import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
@@ -76,6 +77,7 @@ export class AppBasicDetailsEditerComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -162,9 +164,9 @@ export class AppBasicDetailsEditerComponent implements OnInit {
     this.form.model.trans();
     (this.isEdit ? this.appsService.update(this.form.model) : this.appsService.add(this.form.model)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.success' : 'mxk.alert.add.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.error' : 'mxk.alert.add.error'));
       }
       this.form.submitting = false;
       this.modal.destroy({ refresh: true });

+ 6 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-cas-details-editer/app-cas-details-editer.component.ts

@@ -14,9 +14,10 @@
  * limitations under the License.
  */
 
-import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit } from '@angular/core';
+import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import format from 'date-fns/format';
 import { NzMessageService } from 'ng-zorro-antd/message';
 import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
@@ -77,6 +78,7 @@ export class AppCasDetailsEditerComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -163,9 +165,9 @@ export class AppCasDetailsEditerComponent implements OnInit {
     this.form.model.trans();
     (this.isEdit ? this.appsCasDetailsService.update(this.form.model) : this.appsCasDetailsService.add(this.form.model)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.success' : 'mxk.alert.add.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.error' : 'mxk.alert.add.error'));
       }
       this.form.submitting = false;
       this.modal.destroy({ refresh: true });

+ 6 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-extend-api-details-editer/app-extend-api-details-editer.component.ts

@@ -14,9 +14,10 @@
  * limitations under the License.
  */
 
-import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit } from '@angular/core';
+import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import format from 'date-fns/format';
 import { NzMessageService } from 'ng-zorro-antd/message';
 import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
@@ -77,6 +78,7 @@ export class AppExtendApiDetailsEditerComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -162,9 +164,9 @@ export class AppExtendApiDetailsEditerComponent implements OnInit {
       : this.appsExtendApiDetailsService.add(this.form.model)
     ).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.success' : 'mxk.alert.add.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.error' : 'mxk.alert.add.error'));
       }
       this.form.submitting = false;
       this.modalRef.destroy({ refresh: true });

+ 6 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-form-based-details-editer/app-form-based-details-editer.component.ts

@@ -14,9 +14,10 @@
  * limitations under the License.
  */
 
-import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit } from '@angular/core';
+import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import format from 'date-fns/format';
 import { NzMessageService } from 'ng-zorro-antd/message';
 import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
@@ -77,6 +78,7 @@ export class AppFormBasedDetailsEditerComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -162,9 +164,9 @@ export class AppFormBasedDetailsEditerComponent implements OnInit {
       : this.appsFormBasedDetailsService.add(this.form.model)
     ).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.success' : 'mxk.alert.add.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.error' : 'mxk.alert.add.error'));
       }
       this.form.submitting = false;
       this.modalRef.destroy({ refresh: true });

+ 6 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-jwt-details-editer/app-jwt-details-editer.component.ts

@@ -14,9 +14,10 @@
  * limitations under the License.
  */
 
-import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit } from '@angular/core';
+import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import format from 'date-fns/format';
 import { NzMessageService } from 'ng-zorro-antd/message';
 import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
@@ -78,6 +79,7 @@ export class AppJwtDetailsEditerComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -172,9 +174,9 @@ export class AppJwtDetailsEditerComponent implements OnInit {
     this.form.model.trans();
     (this.isEdit ? this.appsJwtDetailsService.update(this.form.model) : this.appsJwtDetailsService.add(this.form.model)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.success' : 'mxk.alert.add.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.error' : 'mxk.alert.add.error'));
       }
       this.form.submitting = false;
       this.modalRef.destroy({ refresh: true });

+ 6 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-oauth20-details-editer/app-oauth20-details-editer.component.ts

@@ -14,9 +14,10 @@
  * limitations under the License.
  */
 
-import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit } from '@angular/core';
+import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import format from 'date-fns/format';
 import { NzMessageService } from 'ng-zorro-antd/message';
 import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
@@ -77,6 +78,7 @@ export class AppOauth20DetailsEditerComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -179,9 +181,9 @@ export class AppOauth20DetailsEditerComponent implements OnInit {
     (this.isEdit ? this.appsOauth20DetailsService.update(this.form.model) : this.appsOauth20DetailsService.add(this.form.model)).subscribe(
       res => {
         if (res.code == 0) {
-          this.msg.success(`提交成功`);
+          this.msg.success(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.success' : 'mxk.alert.add.success'));
         } else {
-          this.msg.success(`提交失败`);
+          this.msg.error(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.error' : 'mxk.alert.add.error'));
         }
         this.form.submitting = false;
         this.modal.destroy({ refresh: true });

+ 6 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-saml20-details-editer/app-saml20-details-editer.component.ts

@@ -14,9 +14,10 @@
  * limitations under the License.
  */
 
-import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit } from '@angular/core';
+import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import format from 'date-fns/format';
 import { NzMessageService } from 'ng-zorro-antd/message';
 import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
@@ -77,6 +78,7 @@ export class AppSaml20DetailsEditerComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -171,9 +173,9 @@ export class AppSaml20DetailsEditerComponent implements OnInit {
     (this.isEdit ? this.appsSamlDetailsService.update(this.form.model) : this.appsSamlDetailsService.add(this.form.model)).subscribe(
       res => {
         if (res.code == 0) {
-          this.msg.success(`提交成功`);
+          this.msg.success(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.success' : 'mxk.alert.add.success'));
         } else {
-          this.msg.success(`提交失败`);
+          this.msg.error(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.error' : 'mxk.alert.add.error'));
         }
         this.form.submitting = false;
         this.modal.destroy({ refresh: true });

+ 6 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-token-based-details-editer/app-token-based-details-editer.component.ts

@@ -14,9 +14,10 @@
  * limitations under the License.
  */
 
-import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit } from '@angular/core';
+import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import format from 'date-fns/format';
 import { NzMessageService } from 'ng-zorro-antd/message';
 import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
@@ -78,6 +79,7 @@ export class AppTokenBasedDetailsEditerComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -171,9 +173,9 @@ export class AppTokenBasedDetailsEditerComponent implements OnInit {
       : this.appsTokenBasedDetailsService.add(this.form.model)
     ).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.success' : 'mxk.alert.add.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.error' : 'mxk.alert.add.error'));
       }
       this.form.submitting = false;
       this.modalRef.destroy({ refresh: true });

+ 11 - 10
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/apps.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -95,6 +95,7 @@ export class AppsComponent implements OnInit {
     private appsService: AppsService,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -118,10 +119,10 @@ export class AppsComponent implements OnInit {
     e.preventDefault();
     this.appsService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });
@@ -221,10 +222,10 @@ export class AppsComponent implements OnInit {
     e.preventDefault();
     this.appsService.delete(deleteId).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });

+ 9 - 8
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/accounts-strategy/accounts-strategy-editer/accounts-strategy-editer.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit } from '@angular/core';
+import { Component, ChangeDetectorRef, ViewContainerRef, Input, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import format from 'date-fns/format';
 import { NzMessageService } from 'ng-zorro-antd/message';
 import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
@@ -59,6 +59,7 @@ export class AccountsStrategyEditerComponent implements OnInit {
     private modalService: NzModalService,
     private viewContainerRef: ViewContainerRef,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -102,9 +103,9 @@ export class AccountsStrategyEditerComponent implements OnInit {
     (this.isEdit ? this.accountsStrategyService.update(this.form.model) : this.accountsStrategyService.add(this.form.model)).subscribe(
       res => {
         if (res.code == 0) {
-          this.msg.success(`提交成功`);
+          this.msg.success(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.success' : 'mxk.alert.add.success'));
         } else {
-          this.msg.success(`提交失败`);
+          this.msg.error(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.error' : 'mxk.alert.add.error'));
         }
         this.form.submitting = false;
         this.modal.destroy({ refresh: true });

+ 12 - 12
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/accounts-strategy/accounts-strategy.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -88,8 +88,8 @@ export class AccountsStrategyComponent implements OnInit {
     private accountsStrategyService: AccountsStrategyService,
     private fb: FormBuilder,
     private msg: NzMessageService,
-    private cdr: ChangeDetectorRef,
-    private http: _HttpClient
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
+    private cdr: ChangeDetectorRef
   ) { }
 
   ngOnInit(): void {
@@ -112,10 +112,10 @@ export class AccountsStrategyComponent implements OnInit {
     e.preventDefault();
     this.accountsStrategyService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });
@@ -164,10 +164,10 @@ export class AccountsStrategyComponent implements OnInit {
     e.preventDefault();
     this.accountsStrategyService.delete(deleteId).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });

+ 12 - 12
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/adapters/adapters.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -88,8 +88,8 @@ export class AdaptersComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
-    private cdr: ChangeDetectorRef,
-    private http: _HttpClient
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
+    private cdr: ChangeDetectorRef
   ) { }
 
   ngOnInit(): void {
@@ -112,10 +112,10 @@ export class AdaptersComponent implements OnInit {
     e.preventDefault();
     this.adaptersService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });
@@ -164,10 +164,10 @@ export class AdaptersComponent implements OnInit {
     e.preventDefault();
     this.adaptersService.delete(deleteId).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });

+ 10 - 10
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/email-senders/email-senders.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { NzMessageService } from 'ng-zorro-antd/message';
 
 import { EmailSenders } from '../../../entity/EmailSenders';
@@ -54,8 +54,8 @@ export class EmailSendersComponent implements OnInit {
     private fb: FormBuilder,
     private emailSendersService: EmailSendersService,
     private msg: NzMessageService,
-    private cdr: ChangeDetectorRef,
-    private http: _HttpClient
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
+    private cdr: ChangeDetectorRef
   ) { }
 
   ngOnInit(): void {
@@ -70,9 +70,9 @@ export class EmailSendersComponent implements OnInit {
     this.form.model.trans();
     this.emailSendersService.update(this.form.model).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
       this.form.submitting = false;
       this.cdr.detectChanges();

+ 9 - 7
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/institutions/institutions.component.ts

@@ -1,22 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { I18NService } from '@core';
+import { ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { NzMessageService } from 'ng-zorro-antd/message';
 
 import { Institutions } from '../../../entity/Institutions';
@@ -53,6 +54,7 @@ export class InstitutionsComponent implements OnInit {
     private fb: FormBuilder,
     private institutionsService: InstitutionsService,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -68,9 +70,9 @@ export class InstitutionsComponent implements OnInit {
     this.form.model.trans();
     this.institutionsService.update(this.form.model).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
       this.form.submitting = false;
       this.cdr.detectChanges();

+ 9 - 8
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/ldap-context/ldap-context.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { NzMessageService } from 'ng-zorro-antd/message';
 
 import { LdapContext } from '../../../entity/LdapContext';
@@ -54,6 +54,7 @@ export class LdapContextComponent implements OnInit {
     private fb: FormBuilder,
     private ldapContextService: LdapContextService,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -69,9 +70,9 @@ export class LdapContextComponent implements OnInit {
     this.form.model.trans();
     this.ldapContextService.update(this.form.model).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
       this.form.submitting = false;
       this.cdr.detectChanges();

+ 9 - 8
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/password-policy/password-policy.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { NzMessageService } from 'ng-zorro-antd/message';
 
 import { PasswordPolicy } from '../../../entity/PasswordPolicy';
@@ -55,6 +55,7 @@ export class PasswordPolicyComponent implements OnInit {
     private fb: FormBuilder,
     private passwordPolicyService: PasswordPolicyService,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -81,9 +82,9 @@ export class PasswordPolicyComponent implements OnInit {
     this.form.model.trans();
     this.passwordPolicyService.update(this.form.model).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
       this.form.submitting = false;
       this.cdr.detectChanges();

+ 9 - 8
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/sms-provider/sms-provider.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { NzMessageService } from 'ng-zorro-antd/message';
 
 import { SmsProvider } from '../../../entity/SmsProvider';
@@ -54,6 +54,7 @@ export class SmsProviderComponent implements OnInit {
     private fb: FormBuilder,
     private smsProviderService: SmsProviderService,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -69,9 +70,9 @@ export class SmsProviderComponent implements OnInit {
     this.form.model.trans();
     this.smsProviderService.update(this.form.model).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
       this.form.submitting = false;
       this.cdr.detectChanges();

+ 9 - 8
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/socials-provider/socials-provider-editer/socials-provider-editer.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { Component, ChangeDetectorRef, Input, OnInit } from '@angular/core';
+import { Component, ChangeDetectorRef, Input, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import format from 'date-fns/format';
 import { NzMessageService } from 'ng-zorro-antd/message';
 import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
@@ -56,6 +56,7 @@ export class SocialsProviderEditerComponent implements OnInit {
     private socialsProviderService: SocialsProviderService,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -80,9 +81,9 @@ export class SocialsProviderEditerComponent implements OnInit {
     (this.isEdit ? this.socialsProviderService.update(this.form.model) : this.socialsProviderService.add(this.form.model)).subscribe(
       res => {
         if (res.code == 0) {
-          this.msg.success(`提交成功`);
+          this.msg.success(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.success' : 'mxk.alert.add.success'));
         } else {
-          this.msg.success(`提交失败`);
+          this.msg.error(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.error' : 'mxk.alert.add.error'));
         }
         this.form.submitting = false;
         this.modalRef.destroy({ refresh: true });

+ 11 - 10
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/socials-provider/socials-provider.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -87,6 +87,7 @@ export class SocialsProviderComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -110,10 +111,10 @@ export class SocialsProviderComponent implements OnInit {
     e.preventDefault();
     this.socialsProviderService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });
@@ -162,10 +163,10 @@ export class SocialsProviderComponent implements OnInit {
     e.preventDefault();
     this.socialsProviderService.delete(deleteId).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });

+ 9 - 8
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/synchronizers/synchronizer-editer/synchronizer-editer.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { Component, ChangeDetectorRef, Input, OnInit } from '@angular/core';
+import { Component, ChangeDetectorRef, Input, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import format from 'date-fns/format';
 import { NzMessageService } from 'ng-zorro-antd/message';
 import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
@@ -56,6 +56,7 @@ export class SynchronizerEditerComponent implements OnInit {
     private synchronizersService: SynchronizersService,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -79,9 +80,9 @@ export class SynchronizerEditerComponent implements OnInit {
     this.form.model.trans();
     (this.isEdit ? this.synchronizersService.update(this.form.model) : this.synchronizersService.add(this.form.model)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.success' : 'mxk.alert.add.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.error' : 'mxk.alert.add.error'));
       }
       this.form.submitting = false;
       this.modalRef.destroy({ refresh: true });

+ 13 - 12
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/synchronizers/synchronizers.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -87,6 +87,7 @@ export class SynchronizersComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -110,10 +111,10 @@ export class SynchronizersComponent implements OnInit {
     e.preventDefault();
     this.synchronizersService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });
@@ -122,9 +123,9 @@ export class SynchronizersComponent implements OnInit {
   onSynchr(e: MouseEvent, synchrId: String): void {
     this.synchronizersService.synchr(synchrId).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
       this.cdr.detectChanges();
     });
@@ -172,10 +173,10 @@ export class SynchronizersComponent implements OnInit {
     e.preventDefault();
     this.synchronizersService.delete(deleteId).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });

+ 14 - 10
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/organizations/organization-editer/organization-editer.component.ts

@@ -1,24 +1,26 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
-
-import { Component, ChangeDetectorRef, Input, OnInit } from '@angular/core';
+import { I18nPluralPipe } from '@angular/common';
+import { LocalizedString } from '@angular/compiler';
+import { Component, ChangeDetectorRef, Input, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import format from 'date-fns/format';
+import { NzI18nService } from 'ng-zorro-antd/i18n';
 import { NzMessageService } from 'ng-zorro-antd/message';
 import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
 import { NzFormatEmitEvent, NzTreeNode, NzTreeNodeOptions } from 'ng-zorro-antd/tree';
@@ -59,6 +61,7 @@ export class OrganizationEditerComponent implements OnInit {
     private orgsService: OrganizationsService,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -70,8 +73,9 @@ export class OrganizationEditerComponent implements OnInit {
       });
     } else {
       if (this.parentNode) {
-        this.form.model.parentCode = this.parentNode?.key;
+        this.form.model.parentId = this.parentNode?.key;
         this.form.model.parentName = this.parentNode?.title;
+        this.cdr.detectChanges();
       }
     }
   }
@@ -88,9 +92,9 @@ export class OrganizationEditerComponent implements OnInit {
 
     (this.isEdit ? this.orgsService.update(this.form.model) : this.orgsService.add(this.form.model)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.success' : 'mxk.alert.add.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.error' : 'mxk.alert.add.error'));
       }
       this.form.submitting = false;
       this.modalRef.destroy({ refresh: true });

+ 11 - 10
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/organizations/organizations.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzContextMenuService, NzDropdownMenuComponent } from 'ng-zorro-antd/dropdown';
@@ -120,6 +120,7 @@ export class OrganizationsComponent implements OnInit {
     private orgsService: OrganizationsService,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -144,10 +145,10 @@ export class OrganizationsComponent implements OnInit {
     e.preventDefault();
     this.orgsService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });
@@ -197,10 +198,10 @@ export class OrganizationsComponent implements OnInit {
     e.preventDefault();
     this.orgsService.delete(deleteId).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });

+ 19 - 8
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/privileges/privileges.component.ts

@@ -1,23 +1,32 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, AfterViewInit, ViewChild } from '@angular/core';
+import {
+  ChangeDetectionStrategy,
+  ViewContainerRef,
+  ChangeDetectorRef,
+  Component,
+  OnInit,
+  AfterViewInit,
+  ViewChild,
+  Inject
+} from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzContextMenuService, NzDropdownMenuComponent } from 'ng-zorro-antd/dropdown';
@@ -102,6 +111,7 @@ export class PrivilegesComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef,
     private http: _HttpClient
   ) { }
@@ -149,9 +159,10 @@ export class PrivilegesComponent implements OnInit {
       this.query.submitLoading = false;
       this.query.tableLoading = false;
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
+        this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
       this.cdr.detectChanges();
     });

+ 9 - 8
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/resources/resource-editer/resource-editer.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { Component, ChangeDetectorRef, Input, OnInit } from '@angular/core';
+import { Component, ChangeDetectorRef, Input, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import format from 'date-fns/format';
 import { NzMessageService } from 'ng-zorro-antd/message';
 import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
@@ -59,6 +59,7 @@ export class ResourceEditerComponent implements OnInit {
     private resourcesService: ResourcesService,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -87,9 +88,9 @@ export class ResourceEditerComponent implements OnInit {
     this.form.model.trans();
     (this.isEdit ? this.resourcesService.update(this.form.model) : this.resourcesService.add(this.form.model)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.success' : 'mxk.alert.add.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.error' : 'mxk.alert.add.error'));
       }
       this.form.submitting = false;
       this.modalRef.destroy({ refresh: true });

+ 8 - 6
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/resources/resources.component.ts

@@ -14,9 +14,10 @@
  * limitations under the License.
  */
 
-import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzContextMenuService, NzDropdownMenuComponent } from 'ng-zorro-antd/dropdown';
@@ -98,6 +99,7 @@ export class ResourcesComponent implements OnInit {
     private resourcesService: ResourcesService,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -121,10 +123,10 @@ export class ResourcesComponent implements OnInit {
     e.preventDefault();
     this.resourcesService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });
@@ -196,10 +198,10 @@ export class ResourcesComponent implements OnInit {
     e.preventDefault();
     this.resourcesService.delete(deleteId).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });

+ 9 - 8
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/role-members/member-roles-editer/member-roles-editer.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Input } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Input, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -86,6 +86,7 @@ export class MemberRolesEditerComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -171,10 +172,10 @@ export class MemberRolesEditerComponent implements OnInit {
       this.query.submitLoading = false;
       this.query.tableLoading = false;
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
       this.cdr.detectChanges();
     });

+ 9 - 8
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/role-members/role-members-editer/role-members-editer.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ViewContainerRef, Input, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, Input, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -91,6 +91,7 @@ export class RoleMembersEditerComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -176,10 +177,10 @@ export class RoleMembersEditerComponent implements OnInit {
       this.query.submitLoading = false;
       this.query.tableLoading = false;
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
       this.cdr.detectChanges();
     });

+ 8 - 6
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/role-members/role-members.component.ts

@@ -14,10 +14,11 @@
  * limitations under the License.
  */
 
-import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
 import { ActivatedRoute, Router } from '@angular/router';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzContextMenuService, NzDropdownMenuComponent } from 'ng-zorro-antd/dropdown';
@@ -102,6 +103,7 @@ export class RoleMembersComponent implements OnInit {
     private viewContainerRef: ViewContainerRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private route: ActivatedRoute,
     private cdr: ChangeDetectorRef
   ) { }
@@ -137,10 +139,10 @@ export class RoleMembersComponent implements OnInit {
     e.preventDefault();
     this.roleMembersService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });
@@ -208,10 +210,10 @@ export class RoleMembersComponent implements OnInit {
     e.preventDefault();
     this.roleMembersService.delete(deleteId).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });

+ 9 - 8
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/roles/role-editer/role-editer.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { Component, ChangeDetectorRef, Input, OnInit } from '@angular/core';
+import { Component, ChangeDetectorRef, Input, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import format from 'date-fns/format';
 import { NzMessageService } from 'ng-zorro-antd/message';
 import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
@@ -55,6 +55,7 @@ export class RoleEditerComponent implements OnInit {
     private rolesService: RolesService,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -78,9 +79,9 @@ export class RoleEditerComponent implements OnInit {
     this.form.model.trans();
     (this.isEdit ? this.rolesService.update(this.form.model) : this.rolesService.add(this.form.model)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.success' : 'mxk.alert.add.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.error' : 'mxk.alert.add.error'));
       }
       this.form.submitting = false;
       this.modalRef.destroy({ refresh: true });

+ 11 - 10
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/roles/roles.component.ts

@@ -1,23 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -88,6 +88,7 @@ export class RolesComponent implements OnInit {
     private rolesService: RolesService,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -111,10 +112,10 @@ export class RolesComponent implements OnInit {
     e.preventDefault();
     this.rolesService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });
@@ -163,10 +164,10 @@ export class RolesComponent implements OnInit {
     e.preventDefault();
     this.rolesService.delete(deleteId).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });

+ 9 - 7
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/password/password.component.ts

@@ -1,22 +1,23 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
-import { Component, ChangeDetectorRef, OnInit, Input } from '@angular/core';
+import { Component, ChangeDetectorRef, OnInit, Input, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { I18NService } from '@core';
+import { ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { NzMessageService } from 'ng-zorro-antd/message';
 import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
 
@@ -52,6 +53,7 @@ export class PasswordComponent implements OnInit {
     private modalRef: NzModalRef,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -81,9 +83,9 @@ export class PasswordComponent implements OnInit {
     this.form.submitting = true;
     this.passwordService.changePassword(this.form.model).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
       this.modalRef.destroy({ refresh: true });
       this.cdr.detectChanges();

+ 6 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/user-editer/user-editer.component.ts

@@ -14,9 +14,10 @@
  * limitations under the License.
  */
 
-import { Component, ChangeDetectorRef, Input, OnInit } from '@angular/core';
+import { Component, ChangeDetectorRef, Input, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { environment } from '@env/environment';
 import format from 'date-fns/format';
 import { NzMessageService } from 'ng-zorro-antd/message';
@@ -101,6 +102,7 @@ export class UserEditerComponent implements OnInit {
     private usersService: UsersService,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
   ) { }
 
@@ -138,9 +140,9 @@ export class UserEditerComponent implements OnInit {
     this.form.model.trans();
     (this.isEdit ? this.usersService.update(this.form.model) : this.usersService.add(this.form.model)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.success' : 'mxk.alert.add.success'));
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi(this.isEdit ? 'mxk.alert.update.error' : 'mxk.alert.add.error'));
       }
       this.form.submitting = false;
       this.modalRef.destroy({ refresh: true });

+ 16 - 5
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/users.component.html

@@ -94,11 +94,21 @@
             <td nzAlign="center"> {{ data.gender == 1 ? ('mxk.users.gender.female' | i18n) : ('mxk.users.gender.male' |
               i18n) }}</td>
             <td nzAlign="center">
-              <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill" style="color: green"> </i>
-              <i *ngIf="data.status == 2" nz-icon nzType="warning" nzTheme="fill" style="color: gray"></i>
-              <i *ngIf="data.status == 4" nz-icon nzType="stop" nzTheme="fill" style="color: gray"></i>
-              <i *ngIf="data.status == 5" nz-icon nzType="lock" nzTheme="fill" style="color: orange"></i>
-              <i *ngIf="data.status == 9" nz-icon nzType="close-circle" nzTheme="fill" style="color: red"></i>
+              <a title="{{ 'mxk.users.status.active' | i18n }}" *ngIf="data.status == 1">
+                <i nz-icon nzType="check-circle" nzTheme="fill" style="color: green"> </i>
+              </a>
+              <a title="{{ 'mxk.users.status.inactive' | i18n }}" *ngIf="data.status == 2">
+                <i nz-icon nzType="warning" nzTheme="fill" style="color: gray"></i>
+              </a>
+              <a title="{{ 'mxk.users.status.forbidden' | i18n }}" *ngIf="data.status == 4">
+                <i nz-icon nzType="stop" nzTheme="fill" style="color: gray"></i>
+              </a>
+              <a title="{{ 'mxk.users.status.lock' | i18n }}" *ngIf="data.status == 5">
+                <i nz-icon nzType="lock" nzTheme="fill" style="color: orange"></i>
+              </a>
+              <a title="{{ 'mxk.users.status.delete' | i18n }}" *ngIf="data.status == 9">
+                <i nz-icon nzType="close-circle" nzTheme="fill" style="color: red"></i>
+              </a>
             </td>
             <td nzAlign="left" nzBreakWord="false">
               <div nz-col>
@@ -115,6 +125,7 @@
                       (click)="onNavToUrl($event, data.id, data.username, 'accounts')">{{
                       'mxk.text.accounts' | i18n
                       }}</li>
+
                     <li nz-menu-item *ngIf="data.status == 1"
                       (click)="onNavToUrl($event, data.id, data.username, 'groups')">{{
                       'mxk.text.groups' | i18n

+ 10 - 8
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/users.component.ts

@@ -14,10 +14,11 @@
  * limitations under the License.
  */
 
-import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
 import { Router } from '@angular/router';
-import { _HttpClient } from '@delon/theme';
+import { I18NService } from '@core';
+import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
 import { format, addDays } from 'date-fns';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';
 import { NzContextMenuService, NzDropdownMenuComponent } from 'ng-zorro-antd/dropdown';
@@ -95,6 +96,7 @@ export class UsersComponent implements OnInit {
     private orgsService: OrganizationsService,
     private fb: FormBuilder,
     private msg: NzMessageService,
+    @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private router: Router,
     private cdr: ChangeDetectorRef
   ) { }
@@ -120,10 +122,10 @@ export class UsersComponent implements OnInit {
     e.preventDefault();
     this.usersService.get(set2String(this.query.tableCheckedId)).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
       }
       this.cdr.detectChanges();
     });
@@ -230,10 +232,10 @@ export class UsersComponent implements OnInit {
     e.preventDefault();
     this.usersService.updateStatus({ id: userId, status: status }).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
       this.cdr.detectChanges();
     });
@@ -243,10 +245,10 @@ export class UsersComponent implements OnInit {
     e.preventDefault();
     this.usersService.delete(deleteId).subscribe(res => {
       if (res.code == 0) {
-        this.msg.success(`提交成功`);
+        this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
         this.fetch();
       } else {
-        this.msg.success(`提交失败`);
+        this.msg.error(this.i18n.fanyi('mxk.alert.operate.error'));
       }
       this.cdr.detectChanges();
     });

+ 19 - 0
maxkey-web-frontend/maxkey-web-mgt-app/src/assets/i18n/en-US.json

@@ -631,6 +631,25 @@
 			"connector.syncTime": "SyncTime",
 			"connector.result": "Result"
 		},
+		"alert": {
+			"add":{
+				"success":"Add Success!",
+				"error":"Add Error!"
+			},
+			"update":{
+				"success":"Update Success!",
+				"error":"Update Error!"
+			},
+			"delete":{
+				"success":"Delete Success!",
+				"error":"Delete Error!"
+			},
+			"operate":{
+				"success":"Operate Success!",
+				"error":"Operate Error!"
+			}
+			
+		},
 		"text": {
 			"action": "Action",
 			"query": "Query",

+ 18 - 0
maxkey-web-frontend/maxkey-web-mgt-app/src/assets/i18n/zh-CN.json

@@ -630,6 +630,24 @@
 			"connector.syncTime": "时间",
 			"connector.result": "结果"
 		},
+		"alert": {
+			"add":{
+				"success":"新增成功!",
+				"error":"新增失败!"
+			},
+			"update":{
+				"success":"更新成功!",
+				"error":"更新失败!"
+			},
+			"delete":{
+				"success":"删除成功!",
+				"error":"删除失败!"
+			},
+			"operate":{
+				"success":"操作成功!",
+				"error":"操作失败!"
+			}
+		},
 		"text": {
 			"action": "操作",
 			"query": "查询",

+ 18 - 0
maxkey-web-frontend/maxkey-web-mgt-app/src/assets/i18n/zh-TW.json

@@ -631,6 +631,24 @@
 			"connector.syncTime": "時間",
 			"connector.result": "結果"
 		},
+		"alert": {
+			"add":{
+				"success":"新增成功!",
+				"error":"新增失敗!"
+			},
+			"update":{
+				"success":"更新成功!",
+				"error":"更新失敗!"
+			},
+			"delete":{
+				"success":"删除成功!",
+				"error":"删除失敗!"
+			},
+			"operate":{
+				"success":"操作成功!",
+				"error":"操作失敗!"
+			}
+		},
 		"text": {
 			"action": "操作",
 			"query": "查詢",