mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-11-10 11:40:53 +08:00
fix: 国际化问题修改 (#1872)
This commit is contained in:
parent
fc57256197
commit
075ae253a1
2 changed files with 7 additions and 8 deletions
|
|
@ -18,16 +18,13 @@ class RequestHttp {
|
||||||
service: AxiosInstance;
|
service: AxiosInstance;
|
||||||
public constructor(config: AxiosRequestConfig) {
|
public constructor(config: AxiosRequestConfig) {
|
||||||
this.service = axios.create(config);
|
this.service = axios.create(config);
|
||||||
let language = globalStore.language === 'tw' ? 'zh-Hant' : globalStore.language;
|
|
||||||
this.service.interceptors.request.use(
|
this.service.interceptors.request.use(
|
||||||
(config: AxiosRequestConfig) => {
|
(config: AxiosRequestConfig) => {
|
||||||
if (config.method != 'get') {
|
let language = globalStore.language === 'tw' ? 'zh-Hant' : globalStore.language;
|
||||||
config.headers = {
|
config.headers = {
|
||||||
'X-CSRF-TOKEN': globalStore.csrfToken,
|
|
||||||
'Accept-Language': language,
|
'Accept-Language': language,
|
||||||
...config.headers,
|
...config.headers,
|
||||||
};
|
};
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
...config,
|
...config,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -667,6 +667,8 @@ const message = {
|
||||||
startIn: ' to start',
|
startIn: ' to start',
|
||||||
},
|
},
|
||||||
cronjob: {
|
cronjob: {
|
||||||
|
create: 'Create Cronjob',
|
||||||
|
edit: 'Edit Cronjob',
|
||||||
cronTask: 'Cronjob',
|
cronTask: 'Cronjob',
|
||||||
changeStatus: 'Change status',
|
changeStatus: 'Change status',
|
||||||
disableMsg:
|
disableMsg:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue