Skip to content

Commit 392e0c7

Browse files
committed
multilingual prompt msg
1 parent db001db commit 392e0c7

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/EIDEProjectExplorer.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ import {
8989
remove_this_item,
9090
view_str$prompt$filesOptionsComment,
9191
view_str$virual_doc_provider_banner,
92-
view_str$missed_stubs_added
92+
view_str$missed_stubs_added,
93+
view_str$keil_export_path_warning
9394
} from './StringTable';
9495
import { CodeBuilder, BuildOptions } from './CodeBuilder';
9596
import { ExceptionToMessage, newMessage } from './Message';
@@ -4236,8 +4237,9 @@ export class ProjectExplorer implements CustomConfigurationProvider {
42364237
const saveDrive = NodePath.parse(uri.fsPath).root.toLowerCase();
42374238
const prjDrive = NodePath.parse(prj.GetRootDir().path).root.toLowerCase();
42384239
if (saveDrive !== prjDrive) {
4239-
GlobalEvent.emit('msg', newMessage('Warning',
4240-
`导出路径 (${saveDrive}) 与项目根目录 (${prjDrive}) 不在同一驱动器,此行为可能导致移动或复制项目后 Keil 无法正确识别文件。`));
4240+
GlobalEvent.emit('msg', newMessage('Warning', view_str$keil_export_path_warning
4241+
.replace('{0}', saveDrive)
4242+
.replace('{1}', prjDrive)));
42414243
}
42424244

42434245
const xmlFile = prj.ExportToKeilProject(new File(uri.fsPath));

src/StringTable.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,11 @@ export const view_str$env_desc$py3_cmd = [
459459

460460
//---------------Other---------------
461461

462+
export const view_str$keil_export_path_warning = [
463+
'导出路径 ({0}) 与项目根目录 ({1}) 不在同一驱动器,此行为可能导致移动或复制项目后 Keil 无法正确识别文件。',
464+
'The export path ({0}) is not on the same drive as the project root directory ({1}). This behavior may cause Keil to fail to correctly recognize files after moving or copying the project.',
465+
][langIndex];
466+
462467
export const view_str$missed_stubs_added = [
463468
'桩函数源文件 {} 已经添加到项目。',
464469
'The stubs file "{}" has been added to the project.'

0 commit comments

Comments
 (0)