更新多语言

This commit is contained in:
whyour
2023-08-05 12:33:43 +08:00
parent 0bf28e9ab3
commit b1a242c8ee
30 changed files with 186 additions and 109 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ const { Option } = Select;
const LangMap: any = {
'.py': 'python',
'.js': 'javascript',
'.mjs': 'javascript',
'.mjs': 'typescript',
'.sh': 'shell',
'.ts': 'typescript',
};
+3 -3
View File
@@ -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);
};
+1 -1
View File
@@ -29,7 +29,7 @@ const RenameModal = ({
);
if (code === 200) {
message.success('更新名称成功');
message.success(intl.get('更新名称成功'));
handleCancel();
}
setLoading(false);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);