Skip to content

Commit ae21afa

Browse files
committed
【完善】:修改新手常遇到问题的提示信息为中文提示
1 parent 4cf42ce commit ae21afa

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

cmds/cmd_menuconfig.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,21 +163,19 @@ def cmd(args):
163163

164164
if not os.getenv("RTT_ROOT"):
165165
if get_rtt_name != 'rt-thread':
166-
print ("menuconfig command should be used in a bsp root path with a Kconfig file, you should check if there is a Kconfig file in your bsp root first.")
167-
print (
168-
'And then you can check Kconfig file and modify the default option below to your rtthread root path.\n')
166+
print("\nmenuconfig 命令应当在一个 BSP 的根目录下被执行,请确保当前目录为 BSP 根目录,并且根目录中有 Kconfig 文件。")
167+
print("接下来你可以按照如下方式修改 Kconfig 文件:\n")
169168

170169
print ('config $RTT_DIR')
171170
print ('string')
172171
print ('option env="RTT_ROOT"')
173172
print ('default "../.."\n')
174-
print ('example: default "F:/git_repositories/rt-thread" \n')
173+
print ('修改 default 这一项为 rt-thread 所在路径: default "F:/git_repositories/rt-thread"')
175174

176-
print (
177-
"using command 'set RTT_ROOT=your_rtthread_root_path' to set RTT_ROOT is ok too.\n")
178-
print ("you can ignore debug messages below.")
179-
# if not args.menuconfig_easy:
180-
# return
175+
print ('如果 scons 编译找不到 RTT_ROOT ,你可以使 <set RTT_ROOT=your_rtthread_root_path> 来设置 RTT_ROOT。')
176+
177+
if not args.menuconfig_easy:
178+
return
181179

182180
fn = '.config'
183181

cmds/cmd_package.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ def pre_package_update():
491491
bsp_root = Import('bsp_root')
492492

493493
if not os.path.exists('.config'):
494-
print ("当前路径下没有发现 .config 文件,请确保当前目录为 BSP 根目录。")
494+
print ("\n当前路径下没有发现 .config 文件,请确保当前目录为 BSP 根目录。")
495495
print ("如果确定当前目录为 BSP 根目录,请先使用 <menuconfig> 命令来生成 .config 文件。")
496496
return False
497497

@@ -639,7 +639,6 @@ def get_package_remove_path(pkg, bsp_packages_path):
639639
if dirpath[0] == '/' or dirpath[0] == '\\':
640640
dirpath = dirpath[1:]
641641
dirpath = os.path.basename(dirpath.replace('/', '\\'))
642-
# print "basename:",os.path.basename(dirpath)
643642
removepath = os.path.join(bsp_packages_path, dirpath)
644643

645644
# Handles the deletion of git repository folders with version Numbers

0 commit comments

Comments
 (0)