Skip to content

Commit 0919070

Browse files
authored
Merge pull request #85 from ErnestChen1/master
【添加】中文软件包描述说明
2 parents b166a36 + f9b0d80 commit 0919070

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cmds/cmd_package.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -886,9 +886,10 @@ def package_wizard():
886886
print ('\033[1;31;40mError: you must input a package name. Try again.\033[0m')
887887
name = raw_input()
888888

889-
default_description = 'a ' + name + ' package for rt-thread'
889+
default_description = 'Please add description of ' + name + ' in English.'
890890
#description = user_input('menuconfig option name,default:\n',default_description)
891891
description = default_description
892+
description_zh = "请添加软件包 " + name +" 的中文描述。"
892893

893894
#second step
894895
ver = user_input('\033[5;33;40m\n2.Please input this package version, default :\033[0m', '1.0.0')
@@ -962,7 +963,7 @@ def package_wizard():
962963
f.close()
963964

964965
s = Template(Package_json_file)
965-
package = s.substitute(name=name, pkgsclass=pkgsclass,authorname=authorname,authoremail=authoremail, description=description, version=ver, keyword=keyword,license=license, repository=repository)
966+
package = s.substitute(name=name, pkgsclass=pkgsclass,authorname=authorname,authoremail=authoremail, description=description, description_zh=description_zh,version=ver, keyword=keyword,license=license, repository=repository)
966967
f = file(os.path.join(pkg_path, 'package.json'), 'wb')
967968
f.write(package)
968969
f.close()

package.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
Package_json_file = '''{
8484
"name": "${name}",
8585
"description": "${description}",
86+
"description_zh": "${description_zh}",
8687
"keywords": [
8788
"${keyword}"
8889
],

0 commit comments

Comments
 (0)