🚩 优化翻译

This commit is contained in:
xtaodada 2020-04-04 23:02:09 +08:00
parent 885ad5b6ab
commit a3aa7d8b05
No known key found for this signature in database
GPG Key ID: 39EFACA711DF5D8C
2 changed files with 10 additions and 10 deletions

View File

@ -65,11 +65,11 @@ async def tty(context):
@listener(outgoing=True, command="status", @listener(outgoing=True, command="status",
description="输出 PagerMaid-Modify 的状态。") description="输出 PagerMaid-Modify 的运行状态。")
async def status(context): async def status(context):
database = "Connected" if redis_status() else "Disconnected" database = "Connected" if redis_status() else "Disconnected"
await context.edit( await context.edit(
f"**PagerMaid-Modify 状态** \n" f"**PagerMaid-Modify 运行状态** \n"
f"主机名: `{uname().node}` \n" f"主机名: `{uname().node}` \n"
f"主机平台: `{platform}` \n" f"主机平台: `{platform}` \n"
f"Kernel 版本: `{uname().release}` \n" f"Kernel 版本: `{uname().release}` \n"
@ -100,7 +100,7 @@ async def speedtest(context):
@listener(outgoing=True, command="connection", @listener(outgoing=True, command="connection",
description="显示 PagerMaid-Modify 和 Telegram 之间的连接信息。") description="显示运行 PagerMaid-Modify 的服务器和 Telegram 服务器之间的连接信息。")
async def connection(context): async def connection(context):
""" Displays connection information between PagerMaid and Telegram. """ """ Displays connection information between PagerMaid and Telegram. """
datacenter = await context.client(functions.help.GetNearestDcRequest()) datacenter = await context.client(functions.help.GetNearestDcRequest())
@ -113,7 +113,7 @@ async def connection(context):
@listener(outgoing=True, command="ping", @listener(outgoing=True, command="ping",
description="计算 PagerMaid-Modify 和 Telegram 之间的延迟。") description="计算运行 PagerMaid-Modify 的服务器和 Telegram 服务器之间的延迟。")
async def ping(context): async def ping(context):
""" Calculates latency between PagerMaid and Telegram. """ """ Calculates latency between PagerMaid and Telegram. """
start = datetime.now() start = datetime.now()
@ -124,7 +124,7 @@ async def ping(context):
@listener(outgoing=True, command="topcloud", @listener(outgoing=True, command="topcloud",
description="生成资源占用的词云。") description="生成一张资源占用的词云图片")
async def topcloud(context): async def topcloud(context):
""" Generates a word cloud of resource-hungry processes. """ """ Generates a word cloud of resource-hungry processes. """
await context.edit("生成图片中 . . .") await context.edit("生成图片中 . . .")
@ -182,7 +182,7 @@ async def topcloud(context):
).generate_from_frequencies(resource_dict) ).generate_from_frequencies(resource_dict)
cloud.to_file("cloud.png") cloud.to_file("cloud.png")
await context.edit("上传图片中 . . .") await context.edit("正在上传图片中 . . .")
await context.client.send_file( await context.client.send_file(
context.chat_id, context.chat_id,
"cloud.png", "cloud.png",
@ -191,7 +191,7 @@ async def topcloud(context):
) )
remove("cloud.png") remove("cloud.png")
await context.delete() await context.delete()
await log("生成了一张资源占用的词云") await log("生成了一张资源占用的词云图片")
def unit_convert(byte): def unit_convert(byte):

View File

@ -11,8 +11,8 @@ from pagermaid.listener import listener
@listener(outgoing=True, command="sticker", @listener(outgoing=True, command="sticker",
description="收集图像/贴纸作为贴纸,指定表情符号以设置自定义表情符号", description="收集回复的图像/贴纸作为贴纸,通过参数指定 emoji 以设置非默认的 emoji",
parameters="<表情>") parameters="<emoji>")
async def sticker(context): async def sticker(context):
""" Fetches images/stickers and add them to your pack. """ """ Fetches images/stickers and add them to your pack. """
user = await bot.get_me() user = await bot.get_me()
@ -22,7 +22,7 @@ async def sticker(context):
custom_emoji = False custom_emoji = False
animated = False animated = False
emoji = "" emoji = ""
await context.edit("收集贴纸中 . . .") await context.edit("收集图像/贴纸中 . . .")
if message and message.media: if message and message.media:
if isinstance(message.media, MessageMediaPhoto): if isinstance(message.media, MessageMediaPhoto):
photo = BytesIO() photo = BytesIO()