mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-21 20:44:31 +08:00
更新多语言
This commit is contained in:
@@ -14,7 +14,7 @@ const { Option } = Select;
|
||||
const LangMap: any = {
|
||||
'.py': 'python',
|
||||
'.js': 'javascript',
|
||||
'.mjs': 'javascript',
|
||||
'.mjs': 'typescript',
|
||||
'.sh': 'shell',
|
||||
'.ts': 'typescript',
|
||||
};
|
||||
|
||||
@@ -49,7 +49,7 @@ const { Text } = Typography;
|
||||
const LangMap: any = {
|
||||
'.py': 'python',
|
||||
'.js': 'javascript',
|
||||
'.mjs': 'javascript',
|
||||
'.mjs': 'typescript',
|
||||
'.sh': 'shell',
|
||||
'.ts': 'typescript',
|
||||
};
|
||||
@@ -136,7 +136,7 @@ const Script = () => {
|
||||
|
||||
const newMode = value ? LangMap[value.slice(-3)] : '';
|
||||
setMode(isPhone && newMode === 'typescript' ? 'javascript' : newMode);
|
||||
setValue('加载中...');
|
||||
setValue(intl.get('加载中...'));
|
||||
getDetail(node);
|
||||
};
|
||||
|
||||
@@ -202,7 +202,7 @@ const Script = () => {
|
||||
|
||||
const cancelEdit = () => {
|
||||
setIsEditing(false);
|
||||
setValue('加载中...');
|
||||
setValue(intl.get('加载中...'));
|
||||
getDetail(currentNode);
|
||||
};
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ const RenameModal = ({
|
||||
);
|
||||
|
||||
if (code === 200) {
|
||||
message.success('更新名称成功');
|
||||
message.success(intl.get('更新名称成功'));
|
||||
handleCancel();
|
||||
}
|
||||
setLoading(false);
|
||||
|
||||
@@ -23,7 +23,7 @@ const SaveModal = ({
|
||||
.post(`${config.apiPrefix}scripts`, payload)
|
||||
.then(({ code, data }) => {
|
||||
if (code === 200) {
|
||||
message.success('保存文件成功');
|
||||
message.success(intl.get('保存文件成功'));
|
||||
handleCancel(data);
|
||||
}
|
||||
setLoading(false);
|
||||
|
||||
@@ -23,7 +23,7 @@ const SettingModal = ({
|
||||
.post(`${config.apiPrefix}scripts`, payload)
|
||||
.then(({ code, data }) => {
|
||||
if (code === 200) {
|
||||
message.success('保存文件成功');
|
||||
message.success(intl.get('保存文件成功'));
|
||||
handleCancel(data);
|
||||
}
|
||||
setLoading(false);
|
||||
|
||||
Reference in New Issue
Block a user