Skip to content

Commit

Permalink
[web-app] fix administrator i18n not change detect error (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsun28 authored Oct 30, 2022
1 parent 3066b25 commit d62cd3b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web-app/src/app/layout/basic/basic.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import { CONSTS } from 'src/app/shared/consts';
<nz-avatar class="alain-default__aside-user-avatar" [nzSrc]="avatar"></nz-avatar>
<div class="alain-default__aside-user-info">
<strong>{{ user.name }}</strong>
<p class="mb0">{{ user.email }}</p>
<p class="mb0">{{ 'app.role.admin' | i18n }}</p>
</div>
</div>
</ng-template>
Expand Down
3 changes: 1 addition & 2 deletions web-app/src/app/routes/passport/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export class UserLoginComponent implements OnDestroy {
@Inject(ReuseTabService)
private reuseTabService: ReuseTabService,
@Inject(DA_SERVICE_TOKEN) private tokenService: ITokenService,
@Inject(ALAIN_I18N_TOKEN) private i18nSvc: I18NService,
private startupSrv: StartupService,
private http: _HttpClient,
private cdr: ChangeDetectorRef,
Expand Down Expand Up @@ -126,7 +125,7 @@ export class UserLoginComponent implements OnDestroy {
let user: User = {
name: this.userName.value,
avatar: './assets/img/avatar.svg',
email: this.i18nSvc.fanyi('app.role.admin')
email: 'administrator'
};
this.settingsService.setUser(user);
// 重新获取 StartupService 内容,我们始终认为应用信息一般都会受当前用户授权范围而影响
Expand Down
2 changes: 1 addition & 1 deletion web-app/src/assets/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@
"app.theme.default": "Light Theme",
"app.theme.dark": "Dark Theme",
"app.theme.compact": "Compact Theme",
"app.role.admin": "Administrator",
"app.role.admin": "administrator",
"app.lock": "Lock",
"app.lock.placeholder": "Enter Any To Unlock",
"app.passport.desc": "An open-source real-time monitoring system",
Expand Down

0 comments on commit d62cd3b

Please sign in to comment.