mirror of
https://github.com/CCLeonOS/LeonOS.git
synced 2026-03-03 15:17:01 +00:00
docs(example-pkg): 将注释和用户界面文本从中文翻译为英文
将示例包的注释和用户界面文本从中文翻译为英文,以提高国际兼容性。修改包括命令补全描述、程序标题格式和用户指南文本。
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
local shell = require('shell')
|
||||
local completion = require('completion')
|
||||
|
||||
-- 为example命令设置补全
|
||||
-- Set up completion for example command
|
||||
shell.setCompletionFunction('example', completion.build({
|
||||
-- 这里可以添加example命令的补全逻辑
|
||||
completion.choice{'--help', '-h'}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
-- 示例包程序
|
||||
-- Example Package Program
|
||||
local colors = require('colors')
|
||||
local term = require('term')
|
||||
|
||||
function drawTopBar()
|
||||
local w, h = term.getSize()
|
||||
@@ -7,7 +8,7 @@ function drawTopBar()
|
||||
term.setTextColor(colors.white)
|
||||
term.setCursorPos(1, 1)
|
||||
term.clearLine()
|
||||
local title = "Example Package v1.0.0"
|
||||
local title = "=== Example Package v1.0.0 ==="
|
||||
local pos = math.floor((w - #title) / 2) + 1
|
||||
term.setCursorPos(pos, 1)
|
||||
term.write(title)
|
||||
@@ -17,12 +18,12 @@ function drawTopBar()
|
||||
end
|
||||
|
||||
drawTopBar()
|
||||
print("\n这是一个示例包,展示了LeonOS包管理器的功能。")
|
||||
print("\n使用方法:")
|
||||
print(" pkg install example-pkg - 安装此包")
|
||||
print(" pkg remove example-pkg - 卸载此包")
|
||||
print(" pkg list - 列出已安装的包")
|
||||
print("\n按任意键退出...")
|
||||
print("\nThis is an example package that demonstrates the features of LeonOS package manager.")
|
||||
print("\nUsage:")
|
||||
print(" pkg install example-pkg - Install this package")
|
||||
print(" pkg remove example-pkg - Uninstall this package")
|
||||
print(" pkg list - List installed packages")
|
||||
print("\nPress any key to exit...")
|
||||
os.pullEvent("key")
|
||||
term.clear()
|
||||
term.setCursorPos(1, 1)
|
||||
Reference in New Issue
Block a user