Skip to content

Commit

Permalink
feat(info): ✨ use rtr instead of tr for multilang
Browse files Browse the repository at this point in the history
Release-As: 0.1.0
  • Loading branch information
AnzhiZhang committed Jun 30, 2022
1 parent ac0d25e commit 1d052aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions info/info/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

import psutil

from mcdreforged.api.types import ServerInterface, \
PluginServerInterface
from mcdreforged.api.types import ServerInterface, PluginServerInterface
from mcdreforged.api.rtext import *
from mcdreforged.api.command import *
from mcdreforged.api.utils import Serializable
Expand Down Expand Up @@ -65,11 +64,11 @@ def get_dir_size(dir_name):

return RTextList(
f'§7============ §6{server.tr("info.title")} §7============\n',
f'§7{server.tr("info.systemVersion")}:§6 {platform.platform()}\n',
f'§7{server.tr("info.pythonVersion")}:§6 {platform.python_version()}\n',
f'§7{server.tr("info.cpuUsed")}:§6 {get_cpu_use()}\n',
f'§7{server.tr("info.memoryUsed")}:§6 {get_memory_use()}\n',
f'§7{server.tr("info.worldSize")}:§6 {get_world_size()}'
f'§7{server.rtr("info.systemVersion")}:§6 {platform.platform()}\n',
f'§7{server.rtr("info.pythonVersion")}:§6 {platform.python_version()}\n',
f'§7{server.rtr("info.cpuUsed")}:§6 {get_cpu_use()}\n',
f'§7{server.rtr("info.memoryUsed")}:§6 {get_memory_use()}\n',
f'§7{server.rtr("info.worldSize")}:§6 {get_world_size()}'
)


Expand Down
2 changes: 1 addition & 1 deletion info/mcdreforged.plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "info",
"version": "0.0.2",
"version": "0.1.0",
"name": "Info",
"description": {
"en_us": "Get server info",
Expand Down

0 comments on commit 1d052aa

Please sign in to comment.