fix: 国际化问题修改 (#1872)

This commit is contained in:
ssongliu 2023-08-08 14:48:11 +08:00 committed by GitHub
parent fc57256197
commit 075ae253a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 8 deletions

View file

@ -18,16 +18,13 @@ class RequestHttp {
service: AxiosInstance;
public constructor(config: AxiosRequestConfig) {
this.service = axios.create(config);
let language = globalStore.language === 'tw' ? 'zh-Hant' : globalStore.language;
this.service.interceptors.request.use(
(config: AxiosRequestConfig) => {
if (config.method != 'get') {
let language = globalStore.language === 'tw' ? 'zh-Hant' : globalStore.language;
config.headers = {
'X-CSRF-TOKEN': globalStore.csrfToken,
'Accept-Language': language,
...config.headers,
};
}
return {
...config,
};

View file

@ -667,6 +667,8 @@ const message = {
startIn: ' to start',
},
cronjob: {
create: 'Create Cronjob',
edit: 'Edit Cronjob',
cronTask: 'Cronjob',
changeStatus: 'Change status',
disableMsg: