pymud 0.21.1__py3-none-any.whl → 0.21.2a2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pymud/__init__.py +16 -16
- pymud/__main__.py +3 -3
- pymud/decorators.py +234 -234
- pymud/dialogs.py +166 -166
- pymud/extras.py +932 -918
- pymud/i18n.py +62 -62
- pymud/lang/i18n_chs.py +226 -226
- pymud/lang/i18n_eng.py +850 -850
- pymud/logger.py +167 -167
- pymud/main.py +220 -220
- pymud/modules.py +285 -285
- pymud/objects.py +1032 -1032
- pymud/pkuxkx.py +280 -280
- pymud/protocol.py +1010 -1010
- pymud/pymud.py +1295 -1286
- pymud/session.py +3584 -3578
- pymud/settings.py +196 -196
- {pymud-0.21.1.dist-info → pymud-0.21.2a2.dist-info}/METADATA +477 -476
- pymud-0.21.2a2.dist-info/RECORD +23 -0
- {pymud-0.21.1.dist-info → pymud-0.21.2a2.dist-info}/WHEEL +1 -1
- {pymud-0.21.1.dist-info → pymud-0.21.2a2.dist-info}/licenses/LICENSE.txt +674 -674
- pymud-0.21.1.dist-info/RECORD +0 -23
- {pymud-0.21.1.dist-info → pymud-0.21.2a2.dist-info}/entry_points.txt +0 -0
- {pymud-0.21.1.dist-info → pymud-0.21.2a2.dist-info}/top_level.txt +0 -0
pymud/i18n.py
CHANGED
@@ -1,63 +1,63 @@
|
|
1
|
-
# internationalization (i18n)
|
2
|
-
import os, importlib
|
3
|
-
|
4
|
-
def i18n_ListAvailableLanguages():
|
5
|
-
"""
|
6
|
-
List all available languages.
|
7
|
-
|
8
|
-
This function checks all files in the `lang` directory for files starting with `i18n.` and ending with `.py`.
|
9
|
-
These files represent internationalization configurations for different languages. The default language is Simplified Chinese ("chs").
|
10
|
-
|
11
|
-
Returns:
|
12
|
-
list: A list containing all available language codes.
|
13
|
-
"""
|
14
|
-
# Define the default language list, here the default language is Simplified Chinese
|
15
|
-
languages = []
|
16
|
-
# Define the directory where the language files are located
|
17
|
-
lang_dir = os.path.join(os.path.dirname(__file__), "lang")
|
18
|
-
|
19
|
-
# Check if the language directory exists. If it doesn't, return the default language list directly
|
20
|
-
if os.path.exists(lang_dir):
|
21
|
-
# Iterate through all files in the language directory
|
22
|
-
for filename in os.listdir(lang_dir):
|
23
|
-
# Check if the file starts with "i18n.", ends with ".py", and is not the default Simplified Chinese file
|
24
|
-
if filename.startswith("i18n_") and filename.endswith(".py"):
|
25
|
-
# Extract the language code from the filename, removing "i18n." and ".py"
|
26
|
-
language = filename[5:-3]
|
27
|
-
# Add the extracted language code to the list of available languages
|
28
|
-
languages.append(language)
|
29
|
-
|
30
|
-
if not languages:
|
31
|
-
languages.append("chs")
|
32
|
-
|
33
|
-
return languages
|
34
|
-
|
35
|
-
def i18n_LoadLanguage(lang: str):
|
36
|
-
lang_file = os.path.join(os.path.dirname(__file__), "lang", f"i18n_{lang}.py")
|
37
|
-
if os.path.exists(lang_file):
|
38
|
-
modLang = importlib.import_module(f"pymud.lang.i18n_{lang}")
|
39
|
-
TRANS = modLang.__dict__["TRANSLATION"]
|
40
|
-
if isinstance(TRANS, dict):
|
41
|
-
from .settings import Settings
|
42
|
-
Settings.text.update(TRANS["text"])
|
43
|
-
|
44
|
-
if "docstring" in TRANS.keys():
|
45
|
-
docstring = TRANS["docstring"]
|
46
|
-
if isinstance(docstring, dict):
|
47
|
-
if "Session" in docstring.keys():
|
48
|
-
from .session import Session
|
49
|
-
docstring_class_session = docstring["Session"]
|
50
|
-
if isinstance(docstring_class_session, dict):
|
51
|
-
for key, newdoc in docstring_class_session.items():
|
52
|
-
if hasattr(Session, key):
|
53
|
-
obj = getattr(Session, key)
|
54
|
-
obj.__doc__ = newdoc
|
55
|
-
|
56
|
-
if "PyMudApp" in docstring.keys():
|
57
|
-
from .pymud import PyMudApp
|
58
|
-
docstring_class_pymudapp = docstring["PyMudApp"]
|
59
|
-
if isinstance(docstring_class_pymudapp, dict):
|
60
|
-
for key, newdoc in docstring_class_pymudapp.items():
|
61
|
-
if hasattr(PyMudApp, key):
|
62
|
-
obj = getattr(PyMudApp, key)
|
1
|
+
# internationalization (i18n)
|
2
|
+
import os, importlib
|
3
|
+
|
4
|
+
def i18n_ListAvailableLanguages():
|
5
|
+
"""
|
6
|
+
List all available languages.
|
7
|
+
|
8
|
+
This function checks all files in the `lang` directory for files starting with `i18n.` and ending with `.py`.
|
9
|
+
These files represent internationalization configurations for different languages. The default language is Simplified Chinese ("chs").
|
10
|
+
|
11
|
+
Returns:
|
12
|
+
list: A list containing all available language codes.
|
13
|
+
"""
|
14
|
+
# Define the default language list, here the default language is Simplified Chinese
|
15
|
+
languages = []
|
16
|
+
# Define the directory where the language files are located
|
17
|
+
lang_dir = os.path.join(os.path.dirname(__file__), "lang")
|
18
|
+
|
19
|
+
# Check if the language directory exists. If it doesn't, return the default language list directly
|
20
|
+
if os.path.exists(lang_dir):
|
21
|
+
# Iterate through all files in the language directory
|
22
|
+
for filename in os.listdir(lang_dir):
|
23
|
+
# Check if the file starts with "i18n.", ends with ".py", and is not the default Simplified Chinese file
|
24
|
+
if filename.startswith("i18n_") and filename.endswith(".py"):
|
25
|
+
# Extract the language code from the filename, removing "i18n." and ".py"
|
26
|
+
language = filename[5:-3]
|
27
|
+
# Add the extracted language code to the list of available languages
|
28
|
+
languages.append(language)
|
29
|
+
|
30
|
+
if not languages:
|
31
|
+
languages.append("chs")
|
32
|
+
|
33
|
+
return languages
|
34
|
+
|
35
|
+
def i18n_LoadLanguage(lang: str):
|
36
|
+
lang_file = os.path.join(os.path.dirname(__file__), "lang", f"i18n_{lang}.py")
|
37
|
+
if os.path.exists(lang_file):
|
38
|
+
modLang = importlib.import_module(f"pymud.lang.i18n_{lang}")
|
39
|
+
TRANS = modLang.__dict__["TRANSLATION"]
|
40
|
+
if isinstance(TRANS, dict):
|
41
|
+
from .settings import Settings
|
42
|
+
Settings.text.update(TRANS["text"])
|
43
|
+
|
44
|
+
if "docstring" in TRANS.keys():
|
45
|
+
docstring = TRANS["docstring"]
|
46
|
+
if isinstance(docstring, dict):
|
47
|
+
if "Session" in docstring.keys():
|
48
|
+
from .session import Session
|
49
|
+
docstring_class_session = docstring["Session"]
|
50
|
+
if isinstance(docstring_class_session, dict):
|
51
|
+
for key, newdoc in docstring_class_session.items():
|
52
|
+
if hasattr(Session, key):
|
53
|
+
obj = getattr(Session, key)
|
54
|
+
obj.__doc__ = newdoc
|
55
|
+
|
56
|
+
if "PyMudApp" in docstring.keys():
|
57
|
+
from .pymud import PyMudApp
|
58
|
+
docstring_class_pymudapp = docstring["PyMudApp"]
|
59
|
+
if isinstance(docstring_class_pymudapp, dict):
|
60
|
+
for key, newdoc in docstring_class_pymudapp.items():
|
61
|
+
if hasattr(PyMudApp, key):
|
62
|
+
obj = getattr(PyMudApp, key)
|
63
63
|
obj.__doc__ = newdoc
|
pymud/lang/i18n_chs.py
CHANGED
@@ -1,227 +1,227 @@
|
|
1
|
-
TRANSLATION = {
|
2
|
-
"text" : {
|
3
|
-
"welcome" : "欢迎使用PYMUD客户端 - 北大侠客行,最好的中文MUD游戏", # the welcome text shown in the statusbar when pymud start
|
4
|
-
|
5
|
-
# text in pymud.py
|
6
|
-
"world" : "世界", # the display text of menu "world"
|
7
|
-
"new_session" : "创建新会话", # the display text of sub-menu "new_session"
|
8
|
-
"show_log" : "显示记录信息", # the display text of sub-menu "show_log"
|
9
|
-
"exit" : "退出", # the display text of sub-menu "exit"
|
10
|
-
"session" : "会话", # the display text of menu "session"
|
11
|
-
"connect" : "连接/重新连接", # the display text of sub-menu "connect"
|
12
|
-
"disconnect" : "断开连接", # the display text of sub-menu "disconnect"
|
13
|
-
"beautify" : "打开/关闭美化显示", # the display text of sub-menu "toggle beautify"
|
14
|
-
"echoinput" : "显示/隐藏输入指令", # the display text of sub-menu "toggle echo input"
|
15
|
-
"nosplit" : "取消分屏", # the display text of sub-menu "no split"
|
16
|
-
"copy" : "复制(纯文本)", # the display text of sub-menu "copy (pure text)"
|
17
|
-
"copyraw" : "复制(ANSI)", # the display text of sub-menu "copy (raw infomation)"
|
18
|
-
"clearsession" : "清空会话内容", # the display text of sub-menu "clear session buffer"
|
19
|
-
"closesession" : "关闭当前页面", # the display text of sub-menu "close current session"
|
20
|
-
"autoreconnect" : "打开/关闭自动重连", # the display text of sub-menu "toggle auto reconnect"
|
21
|
-
"loadconfig" : "加载脚本配置", # the display text of sub-menu "load config"
|
22
|
-
"reloadconfig" : "重新加载脚本配置", # the display text of sub-menu "reload config"
|
23
|
-
"layout" : "布局", # the display text of menu "layout" (not used now)
|
24
|
-
"hide" : "隐藏状态窗口", # the display text of sub-menu "hide status window" (not used now)
|
25
|
-
"horizon" : "下方状态窗口", # the display text of sub-menu "horizon layout" (not used now)
|
26
|
-
"vertical" : "右侧状态窗口", # the display text of sub-menu "vertical layout" (not used now)
|
27
|
-
"help" : "帮助", # the display text of menu "help"
|
28
|
-
"about" : "关于", # the display text of menu "about"
|
29
|
-
|
30
|
-
"session_changed" : "已成功切换到会话: {0}",
|
31
|
-
"input_prompt" : '<prompt><b>命令:</b></prompt>',
|
32
|
-
"msg_copy" : "已复制:{0}",
|
33
|
-
"msg_copylines" : "已复制:行数{0}",
|
34
|
-
"msg_no_selection" : "未选中任何内容...",
|
35
|
-
"msg_session_exists" : "错误!已存在一个名为 {0} 的会话,请更换名称再试.",
|
36
|
-
|
37
|
-
"logfile_name" : "记录文件名",
|
38
|
-
"logfile_size" : "文件大小",
|
39
|
-
"logfile_modified" : "最后修改时间",
|
40
|
-
|
41
|
-
"warning" : "警告",
|
42
|
-
"warning_exit" : "程序退出警告",
|
43
|
-
"session_close_prompt" : "当前会话 {0} 还处于连接状态,确认要关闭?",
|
44
|
-
"app_exit_prompt" : "尚有 {0} 个会话 {1} 还处于连接状态,确认要关闭?",
|
45
|
-
|
46
|
-
"msg_beautify" : "显示美化已",
|
47
|
-
"msg_echoinput" : "回显输入命令被设置为:",
|
48
|
-
"msg_autoreconnect" : "自动重连被设置为:",
|
49
|
-
"msg_open" : "打开",
|
50
|
-
"msg_close" : "关闭",
|
51
|
-
|
52
|
-
"msg_cmd_session_error" : '通过单一参数快速创建会话时,要使用 group.name 形式,如 #session pkuxkx.newstart',
|
53
|
-
"msg_cmdline_input" : "命令行键入:",
|
54
|
-
"msg_no_session" : "当前没有正在运行的session.",
|
55
|
-
"msg_invalid_plugins" : "文件: {0} 不是一个合法的插件文件,加载错误,信息为: {1}",
|
56
|
-
|
57
|
-
"status_nobeautify" : "美化已关闭",
|
58
|
-
"status_mouseinh" : "鼠标已禁用",
|
59
|
-
"status_ignore" : "全局禁用",
|
60
|
-
"status_notconnect" : "未连接",
|
61
|
-
"status_connected" : "已连接",
|
62
|
-
|
63
|
-
# text in dialogs.py
|
64
|
-
"basic_dialog" : "基础对话框",
|
65
|
-
"ok" : "确定",
|
66
|
-
"cancel" : "取消",
|
67
|
-
"visit" : "访问",
|
68
|
-
"displayhelp" : "以查看最新帮助文档",
|
69
|
-
"appinfo" : '<b fg="red">PYMUD {0}</b> - a MUD Client Written in Python',
|
70
|
-
"author" : '作者: <b>{0}</b> <b>E-mail</b>: <u>{1}</u>',
|
71
|
-
"sysversion" : '系统:{} {} Python版本:{}',
|
72
|
-
"sessionname" : "会话名称",
|
73
|
-
"host" : "服务器地址",
|
74
|
-
"port" : "端口",
|
75
|
-
"encoding" : "编码",
|
76
|
-
"nolog" : "无记录",
|
77
|
-
"chooselog" : "选择查看的记录",
|
78
|
-
|
79
|
-
# text in modules.py
|
80
|
-
"configuration_created" : "配置对象 {0}.{1} 创建成功.",
|
81
|
-
"configuration_recreated" : "配置对象 {0}.{1} 重新创建成功.",
|
82
|
-
"configuration_fail" : "配置对象 {0}.{1} 创建失败. 错误信息为: {}",
|
83
|
-
"entity_module" : "主配置模块",
|
84
|
-
"non_entity_module" : "从配置模块",
|
85
|
-
"load_ok" : "加载完成",
|
86
|
-
"load_fail" : "加载失败",
|
87
|
-
"unload_ok" : "卸载完成",
|
88
|
-
"reload_ok" : "重新加载完成",
|
89
|
-
"msg_plugin_unloaded" : "本会话中插件 {0} 已停用。",
|
90
|
-
"msg_plugin_loaded" : "本会话中插件 {0} 已启用。",
|
91
|
-
|
92
|
-
# text in objects.py
|
93
|
-
"excpetion_brace_not_matched" : "错误的代码块,大括号数量不匹配",
|
94
|
-
"exception_quote_not_matched" : "引号的数量不匹配",
|
95
|
-
"exception_forced_async" : "该命令中同时存在强制同步命令和强制异步命令,将使用异步执行,同步命令将失效。",
|
96
|
-
"exception_session_type_fail" : "session 必须是 Session 类型对象的实例!",
|
97
|
-
"exception_message" : "异常信息: <{}> {}",
|
98
|
-
"exception_traceback" : '脚本执行异常, 异常位于文件"{}"中的第{}行的"{}"函数中。',
|
99
|
-
"script_error" : "脚本错误",
|
100
|
-
|
101
|
-
|
102
|
-
# text display in session.py
|
103
|
-
"msg_var_autoload_success" : "自动从 {0} 中加载保存变量成功。",
|
104
|
-
"msg_var_autoload_fail" : "自动从 {0} 中加载变量失败,错误消息为: {1}。",
|
105
|
-
"msg_auto_script" : "即将自动加载以下模块: {0}",
|
106
|
-
"msg_connection_fail" : "创建连接过程中发生错误, 错误发生时刻 {0}, 错误信息为 {1}。",
|
107
|
-
"msg_auto_reconnect" : "{0} 秒之后将自动重新连接...",
|
108
|
-
"msg_connected" : "{0}: 已成功连接到服务器。",
|
109
|
-
"msg_disconnected" : "{0}: 与服务器连接已断开。",
|
110
|
-
"msg_duplicate_logname" : "其它会话中已存在一个名为 {0} 的记录器,将直接返回该记录器。",
|
111
|
-
"msg_default_statuswindow" : "这是一个默认的状态窗口信息\n会话: {0} 连接状态: {1}",
|
112
|
-
"msg_mxp_not_support" : "MXP支持尚未开发,请暂时不要打开MXP支持设置!",
|
113
|
-
"msg_no_session" : "不存在名称为{0}的会话。",
|
114
|
-
"msg_num_positive" : "#{num} {cmd}只能支持正整数!",
|
115
|
-
"msg_cmd_not_recognized" : "未识别的命令: {0}",
|
116
|
-
"msg_id_not_consistent" : "对象 {0} 字典键值 {1} 与其id {2} 不一致,将丢弃键值,以其id添加到会话中...",
|
117
|
-
"msg_shall_be_string" : "{0}必须为字符串类型",
|
118
|
-
"msg_shall_be_list_or_tuple" : "{0}命名应为元组或列表,不接受其他类型",
|
119
|
-
"msg_names_and_values" : "names与values应不为空,且长度相等",
|
120
|
-
"msg_not_null" : "{0}不能为空",
|
121
|
-
"msg_topic_not_found" : "未找到主题{0}, 请确认输入是否正确。",
|
122
|
-
"Day" : "天",
|
123
|
-
"Hour" : "小时",
|
124
|
-
"Minute" : "分",
|
125
|
-
"Second" : "秒",
|
126
|
-
"msg_connection_duration" : "已经与服务器连接了: {0}",
|
127
|
-
"msg_no_object" : "当前会话中不存在名称为 {0} 的{1}。",
|
128
|
-
"msg_no_global_object" : "全局空间中不存在名称为 {0} 的{1}。",
|
129
|
-
"msg_object_value_setted" : "成功设置{0} {1} 值为 {2}。",
|
130
|
-
"variable" : "变量",
|
131
|
-
"globalvar" : "全局变量",
|
132
|
-
"msg_object_not_exists" : "当前会话中不存在key为 {0} 的 {1}, 请确认后重试。",
|
133
|
-
"msg_object_enabled" : "对象 {0} 的使能状态已打开。",
|
134
|
-
"msg_object_disabled" : "对象 {0} 的使能状态已关闭。",
|
135
|
-
"msg_object_deleted" : "对象 {0} 已从会话中被删除。",
|
136
|
-
"msg_group_objects_enabled" : "组 {0} 中的 {1} 个 {2} 对象均已使能。",
|
137
|
-
"msg_group_objects_disabled" : "组 {0} 中的 {1} 个 {2} 对象均已禁用。",
|
138
|
-
"msg_group_objects_deleted" : "组 {0} 中的 {1} 个 {2} 对象均已从会话中被删除。",
|
139
|
-
"msg_object_param_invalid" : "#{0}命令的第二个参数仅能接受on/off/del",
|
140
|
-
"msg_ignore_on" : "所有触发器使能已全局禁用。",
|
141
|
-
"msg_ignore_off" : "不再全局禁用所有触发器使能。",
|
142
|
-
"msg_T_plus_incorrect" : "#T+使能组使用不正确,正确使用示例: #t+ mygroup \n请使用#help ignore进行查询。",
|
143
|
-
"msg_T_minus_incorrect" : "#T-禁用组使用不正确,正确使用示例: #t- mygroup \n请使用#help ignore进行查询。",
|
144
|
-
"msg_group_enabled" : "组 {0} 中的 {1} 个别名,{2} 个触发器,{3} 个命令,{4} 个定时器,{5} 个GMCP触发器均已使能。",
|
145
|
-
"msg_group_disabled" : "组 {0} 中的 {1} 个别名,{2} 个触发器,{3} 个命令,{4} 个定时器,{5} 个GMCP触发器均已禁用。",
|
146
|
-
"msg_repeat_invalid" : "当前会话没有连接或没有键入过指令, repeat无效",
|
147
|
-
"msg_window_title" : "来自会话 {0} 的消息",
|
148
|
-
"msg_module_load_fail" : "模块 {0} 加载失败,异常为 {1}, 类型为 {2}。",
|
149
|
-
"msg_exception_traceback" : "异常追踪为: {0}",
|
150
|
-
"msg_module_not_loaded" : "指定模块名称 {0} 并未加载。",
|
151
|
-
"msg_all_module_reloaded" : "所有配置模块全部重新加载完成。",
|
152
|
-
"msg_plugins_reloaded" : "插件 {0} 重新加载完成。",
|
153
|
-
"msg_name_not_found" : "指定名称 {0} 既未找到模块,也未找到插件,重新加载失败...",
|
154
|
-
"msg_no_module" : "当前会话并未加载任何模块。",
|
155
|
-
"msg_module_list" : "当前会话已加载 {0} 个模块,包括(按加载顺序排列): {1}。",
|
156
|
-
"msg_module_configurations" : "模块 {0} 中包含的配置包括: {1}。",
|
157
|
-
"msg_submodule_no_config" : "模块 {0} 为子模块,不包含配置。",
|
158
|
-
"msg_module_not_loaded" : "本会话中不存在指定名称 {0} 的模块,可能是尚未加载到本会话中。",
|
159
|
-
"msg_variables_saved" : "会话变量信息已保存到 {0}。",
|
160
|
-
"msg_alias_created" : "创建Alias {0} 成功: {1}",
|
161
|
-
"msg_trigger_created" : "创建Trigger {0} 成功: {1}",
|
162
|
-
"msg_timer_created" : "创建Timer {0} 成功: {1}",
|
163
|
-
|
164
|
-
"msg_tri_triggered" : " {0} 正常触发。",
|
165
|
-
"msg_tri_wildcards" : " 捕获:{0}",
|
166
|
-
"msg_tri_prevent" : " {0}该触发器未开启keepEval, 会阻止后续触发器。{1}",
|
167
|
-
"msg_tri_ignore" : " {1}{0} 可以触发,但由于优先级与keepEval设定,触发器不会触发。{2}",
|
168
|
-
"msg_tri_matched" : " {0} 可以匹配触发。",
|
169
|
-
"msg_enabled_summary_0" : "{0} 使能的触发器中,没有可以触发的。",
|
170
|
-
"msg_enabled_summary_1" : "{0} 使能的触发器中,共有 {1} 个可以触发,实际触发 {2} 个,另有 {3} 个由于 keepEval 原因实际不会触发。",
|
171
|
-
"msg_enabled_summary_2" : "{0} 使能的触发器中,共有 {1} 个全部可以被正常触发。",
|
172
|
-
"msg_disabled_summary_0" : "{0} 未使能的触发器中,共有 {1} 个可以匹配。",
|
173
|
-
"msg_disabled_summary_1" : "{0} 未使能触发器,没有可以匹配的。",
|
174
|
-
"msg_test_summary_0" : " 测试内容: {0}",
|
175
|
-
"msg_test_summary_1" : " 测试结果: 没有可以匹配的触发器。",
|
176
|
-
"msg_test_summary_2" : " 测试结果: 有{0}个触发器可以被正常触发,一共有{1}个满足匹配触发要求。",
|
177
|
-
"msg_test_title" : "触发器测试 - {0}",
|
178
|
-
"msg_triggered_mode" : "'响应模式'",
|
179
|
-
"msg_matched_mode" : "'测试模式'",
|
180
|
-
|
181
|
-
"msg_no_plugins" : "PYMUD当前并未加载任何插件。",
|
182
|
-
"msg_plugins_list" : "PYMUD当前已加载 {0} 个插件,分别为:",
|
183
|
-
"msg_plugins_info" : "作者 {2} 版本 {1} 发布日期 {3}\n 简介: {0}",
|
184
|
-
|
185
|
-
"msg_py_exception" : "Python执行错误:{0}",
|
186
|
-
|
187
|
-
"title_msg" : "消息",
|
188
|
-
"title_warning" : "警告",
|
189
|
-
"title_error" : "错误",
|
190
|
-
"title_info" : "提示",
|
191
|
-
|
192
|
-
"msg_log_title" : "本会话中的记录器情况:",
|
193
|
-
"msg_log_title2" : "本应用其他会话中的记录器情况:",
|
194
|
-
"logger" : "记录器",
|
195
|
-
"enabled" : "开启",
|
196
|
-
"disabled" : "关闭",
|
197
|
-
"logger_status" : "当前状态",
|
198
|
-
"file_mode" : "文件模式",
|
199
|
-
"logger_mode" : "记录模式",
|
200
|
-
"ANSI" : "ANSI",
|
201
|
-
"plain_text" : "纯文本",
|
202
|
-
|
203
|
-
"filemode_new" : "新建",
|
204
|
-
"filemode_append" : "追加",
|
205
|
-
"filemode_overwrite" : "覆写",
|
206
|
-
|
207
|
-
"msg_logger_enabled" : "{0}: 记录器{1}以{2}文件模式以及{3}记录模式开启。",
|
208
|
-
"msg_logger_disabled" : "{0}: 记录器{1}记录已关闭。",
|
209
|
-
"msg_logfile_not_exists" : "指定的记录文件 {0} 不存在。",
|
210
|
-
|
211
|
-
"exception_logmode_error" : "错误的记录模式: {0}",
|
212
|
-
"exception_plugin_file_not_found" : "指定的插件文件 {0} 不存在或者格式不正确。",
|
213
|
-
},
|
214
|
-
|
215
|
-
"docstring" : {
|
216
|
-
"Session": {
|
217
|
-
"handle_clear" :
|
218
|
-
'''
|
219
|
-
嵌入命令 #clear / #cls 的执行函数,清空当前会话缓冲与显示。
|
220
|
-
该函数不应该在代码中直接调用。
|
221
|
-
|
222
|
-
使用:
|
223
|
-
- #cls: 清空当前会话缓冲及显示
|
224
|
-
''',
|
225
|
-
}
|
226
|
-
}
|
1
|
+
TRANSLATION = {
|
2
|
+
"text" : {
|
3
|
+
"welcome" : "欢迎使用PYMUD客户端 - 北大侠客行,最好的中文MUD游戏", # the welcome text shown in the statusbar when pymud start
|
4
|
+
|
5
|
+
# text in pymud.py
|
6
|
+
"world" : "世界", # the display text of menu "world"
|
7
|
+
"new_session" : "创建新会话", # the display text of sub-menu "new_session"
|
8
|
+
"show_log" : "显示记录信息", # the display text of sub-menu "show_log"
|
9
|
+
"exit" : "退出", # the display text of sub-menu "exit"
|
10
|
+
"session" : "会话", # the display text of menu "session"
|
11
|
+
"connect" : "连接/重新连接", # the display text of sub-menu "connect"
|
12
|
+
"disconnect" : "断开连接", # the display text of sub-menu "disconnect"
|
13
|
+
"beautify" : "打开/关闭美化显示", # the display text of sub-menu "toggle beautify"
|
14
|
+
"echoinput" : "显示/隐藏输入指令", # the display text of sub-menu "toggle echo input"
|
15
|
+
"nosplit" : "取消分屏", # the display text of sub-menu "no split"
|
16
|
+
"copy" : "复制(纯文本)", # the display text of sub-menu "copy (pure text)"
|
17
|
+
"copyraw" : "复制(ANSI)", # the display text of sub-menu "copy (raw infomation)"
|
18
|
+
"clearsession" : "清空会话内容", # the display text of sub-menu "clear session buffer"
|
19
|
+
"closesession" : "关闭当前页面", # the display text of sub-menu "close current session"
|
20
|
+
"autoreconnect" : "打开/关闭自动重连", # the display text of sub-menu "toggle auto reconnect"
|
21
|
+
"loadconfig" : "加载脚本配置", # the display text of sub-menu "load config"
|
22
|
+
"reloadconfig" : "重新加载脚本配置", # the display text of sub-menu "reload config"
|
23
|
+
"layout" : "布局", # the display text of menu "layout" (not used now)
|
24
|
+
"hide" : "隐藏状态窗口", # the display text of sub-menu "hide status window" (not used now)
|
25
|
+
"horizon" : "下方状态窗口", # the display text of sub-menu "horizon layout" (not used now)
|
26
|
+
"vertical" : "右侧状态窗口", # the display text of sub-menu "vertical layout" (not used now)
|
27
|
+
"help" : "帮助", # the display text of menu "help"
|
28
|
+
"about" : "关于", # the display text of menu "about"
|
29
|
+
|
30
|
+
"session_changed" : "已成功切换到会话: {0}",
|
31
|
+
"input_prompt" : '<prompt><b>命令:</b></prompt>',
|
32
|
+
"msg_copy" : "已复制:{0}",
|
33
|
+
"msg_copylines" : "已复制:行数{0}",
|
34
|
+
"msg_no_selection" : "未选中任何内容...",
|
35
|
+
"msg_session_exists" : "错误!已存在一个名为 {0} 的会话,请更换名称再试.",
|
36
|
+
|
37
|
+
"logfile_name" : "记录文件名",
|
38
|
+
"logfile_size" : "文件大小",
|
39
|
+
"logfile_modified" : "最后修改时间",
|
40
|
+
|
41
|
+
"warning" : "警告",
|
42
|
+
"warning_exit" : "程序退出警告",
|
43
|
+
"session_close_prompt" : "当前会话 {0} 还处于连接状态,确认要关闭?",
|
44
|
+
"app_exit_prompt" : "尚有 {0} 个会话 {1} 还处于连接状态,确认要关闭?",
|
45
|
+
|
46
|
+
"msg_beautify" : "显示美化已",
|
47
|
+
"msg_echoinput" : "回显输入命令被设置为:",
|
48
|
+
"msg_autoreconnect" : "自动重连被设置为:",
|
49
|
+
"msg_open" : "打开",
|
50
|
+
"msg_close" : "关闭",
|
51
|
+
|
52
|
+
"msg_cmd_session_error" : '通过单一参数快速创建会话时,要使用 group.name 形式,如 #session pkuxkx.newstart',
|
53
|
+
"msg_cmdline_input" : "命令行键入:",
|
54
|
+
"msg_no_session" : "当前没有正在运行的session.",
|
55
|
+
"msg_invalid_plugins" : "文件: {0} 不是一个合法的插件文件,加载错误,信息为: {1}",
|
56
|
+
|
57
|
+
"status_nobeautify" : "美化已关闭",
|
58
|
+
"status_mouseinh" : "鼠标已禁用",
|
59
|
+
"status_ignore" : "全局禁用",
|
60
|
+
"status_notconnect" : "未连接",
|
61
|
+
"status_connected" : "已连接",
|
62
|
+
|
63
|
+
# text in dialogs.py
|
64
|
+
"basic_dialog" : "基础对话框",
|
65
|
+
"ok" : "确定",
|
66
|
+
"cancel" : "取消",
|
67
|
+
"visit" : "访问",
|
68
|
+
"displayhelp" : "以查看最新帮助文档",
|
69
|
+
"appinfo" : '<b fg="red">PYMUD {0}</b> - a MUD Client Written in Python',
|
70
|
+
"author" : '作者: <b>{0}</b> <b>E-mail</b>: <u>{1}</u>',
|
71
|
+
"sysversion" : '系统:{} {} Python版本:{}',
|
72
|
+
"sessionname" : "会话名称",
|
73
|
+
"host" : "服务器地址",
|
74
|
+
"port" : "端口",
|
75
|
+
"encoding" : "编码",
|
76
|
+
"nolog" : "无记录",
|
77
|
+
"chooselog" : "选择查看的记录",
|
78
|
+
|
79
|
+
# text in modules.py
|
80
|
+
"configuration_created" : "配置对象 {0}.{1} 创建成功.",
|
81
|
+
"configuration_recreated" : "配置对象 {0}.{1} 重新创建成功.",
|
82
|
+
"configuration_fail" : "配置对象 {0}.{1} 创建失败. 错误信息为: {}",
|
83
|
+
"entity_module" : "主配置模块",
|
84
|
+
"non_entity_module" : "从配置模块",
|
85
|
+
"load_ok" : "加载完成",
|
86
|
+
"load_fail" : "加载失败",
|
87
|
+
"unload_ok" : "卸载完成",
|
88
|
+
"reload_ok" : "重新加载完成",
|
89
|
+
"msg_plugin_unloaded" : "本会话中插件 {0} 已停用。",
|
90
|
+
"msg_plugin_loaded" : "本会话中插件 {0} 已启用。",
|
91
|
+
|
92
|
+
# text in objects.py
|
93
|
+
"excpetion_brace_not_matched" : "错误的代码块,大括号数量不匹配",
|
94
|
+
"exception_quote_not_matched" : "引号的数量不匹配",
|
95
|
+
"exception_forced_async" : "该命令中同时存在强制同步命令和强制异步命令,将使用异步执行,同步命令将失效。",
|
96
|
+
"exception_session_type_fail" : "session 必须是 Session 类型对象的实例!",
|
97
|
+
"exception_message" : "异常信息: <{}> {}",
|
98
|
+
"exception_traceback" : '脚本执行异常, 异常位于文件"{}"中的第{}行的"{}"函数中。',
|
99
|
+
"script_error" : "脚本错误",
|
100
|
+
|
101
|
+
|
102
|
+
# text display in session.py
|
103
|
+
"msg_var_autoload_success" : "自动从 {0} 中加载保存变量成功。",
|
104
|
+
"msg_var_autoload_fail" : "自动从 {0} 中加载变量失败,错误消息为: {1}。",
|
105
|
+
"msg_auto_script" : "即将自动加载以下模块: {0}",
|
106
|
+
"msg_connection_fail" : "创建连接过程中发生错误, 错误发生时刻 {0}, 错误信息为 {1}。",
|
107
|
+
"msg_auto_reconnect" : "{0} 秒之后将自动重新连接...",
|
108
|
+
"msg_connected" : "{0}: 已成功连接到服务器。",
|
109
|
+
"msg_disconnected" : "{0}: 与服务器连接已断开。",
|
110
|
+
"msg_duplicate_logname" : "其它会话中已存在一个名为 {0} 的记录器,将直接返回该记录器。",
|
111
|
+
"msg_default_statuswindow" : "这是一个默认的状态窗口信息\n会话: {0} 连接状态: {1}",
|
112
|
+
"msg_mxp_not_support" : "MXP支持尚未开发,请暂时不要打开MXP支持设置!",
|
113
|
+
"msg_no_session" : "不存在名称为{0}的会话。",
|
114
|
+
"msg_num_positive" : "#{num} {cmd}只能支持正整数!",
|
115
|
+
"msg_cmd_not_recognized" : "未识别的命令: {0}",
|
116
|
+
"msg_id_not_consistent" : "对象 {0} 字典键值 {1} 与其id {2} 不一致,将丢弃键值,以其id添加到会话中...",
|
117
|
+
"msg_shall_be_string" : "{0}必须为字符串类型",
|
118
|
+
"msg_shall_be_list_or_tuple" : "{0}命名应为元组或列表,不接受其他类型",
|
119
|
+
"msg_names_and_values" : "names与values应不为空,且长度相等",
|
120
|
+
"msg_not_null" : "{0}不能为空",
|
121
|
+
"msg_topic_not_found" : "未找到主题{0}, 请确认输入是否正确。",
|
122
|
+
"Day" : "天",
|
123
|
+
"Hour" : "小时",
|
124
|
+
"Minute" : "分",
|
125
|
+
"Second" : "秒",
|
126
|
+
"msg_connection_duration" : "已经与服务器连接了: {0}",
|
127
|
+
"msg_no_object" : "当前会话中不存在名称为 {0} 的{1}。",
|
128
|
+
"msg_no_global_object" : "全局空间中不存在名称为 {0} 的{1}。",
|
129
|
+
"msg_object_value_setted" : "成功设置{0} {1} 值为 {2}。",
|
130
|
+
"variable" : "变量",
|
131
|
+
"globalvar" : "全局变量",
|
132
|
+
"msg_object_not_exists" : "当前会话中不存在key为 {0} 的 {1}, 请确认后重试。",
|
133
|
+
"msg_object_enabled" : "对象 {0} 的使能状态已打开。",
|
134
|
+
"msg_object_disabled" : "对象 {0} 的使能状态已关闭。",
|
135
|
+
"msg_object_deleted" : "对象 {0} 已从会话中被删除。",
|
136
|
+
"msg_group_objects_enabled" : "组 {0} 中的 {1} 个 {2} 对象均已使能。",
|
137
|
+
"msg_group_objects_disabled" : "组 {0} 中的 {1} 个 {2} 对象均已禁用。",
|
138
|
+
"msg_group_objects_deleted" : "组 {0} 中的 {1} 个 {2} 对象均已从会话中被删除。",
|
139
|
+
"msg_object_param_invalid" : "#{0}命令的第二个参数仅能接受on/off/del",
|
140
|
+
"msg_ignore_on" : "所有触发器使能已全局禁用。",
|
141
|
+
"msg_ignore_off" : "不再全局禁用所有触发器使能。",
|
142
|
+
"msg_T_plus_incorrect" : "#T+使能组使用不正确,正确使用示例: #t+ mygroup \n请使用#help ignore进行查询。",
|
143
|
+
"msg_T_minus_incorrect" : "#T-禁用组使用不正确,正确使用示例: #t- mygroup \n请使用#help ignore进行查询。",
|
144
|
+
"msg_group_enabled" : "组 {0} 中的 {1} 个别名,{2} 个触发器,{3} 个命令,{4} 个定时器,{5} 个GMCP触发器均已使能。",
|
145
|
+
"msg_group_disabled" : "组 {0} 中的 {1} 个别名,{2} 个触发器,{3} 个命令,{4} 个定时器,{5} 个GMCP触发器均已禁用。",
|
146
|
+
"msg_repeat_invalid" : "当前会话没有连接或没有键入过指令, repeat无效",
|
147
|
+
"msg_window_title" : "来自会话 {0} 的消息",
|
148
|
+
"msg_module_load_fail" : "模块 {0} 加载失败,异常为 {1}, 类型为 {2}。",
|
149
|
+
"msg_exception_traceback" : "异常追踪为: {0}",
|
150
|
+
"msg_module_not_loaded" : "指定模块名称 {0} 并未加载。",
|
151
|
+
"msg_all_module_reloaded" : "所有配置模块全部重新加载完成。",
|
152
|
+
"msg_plugins_reloaded" : "插件 {0} 重新加载完成。",
|
153
|
+
"msg_name_not_found" : "指定名称 {0} 既未找到模块,也未找到插件,重新加载失败...",
|
154
|
+
"msg_no_module" : "当前会话并未加载任何模块。",
|
155
|
+
"msg_module_list" : "当前会话已加载 {0} 个模块,包括(按加载顺序排列): {1}。",
|
156
|
+
"msg_module_configurations" : "模块 {0} 中包含的配置包括: {1}。",
|
157
|
+
"msg_submodule_no_config" : "模块 {0} 为子模块,不包含配置。",
|
158
|
+
"msg_module_not_loaded" : "本会话中不存在指定名称 {0} 的模块,可能是尚未加载到本会话中。",
|
159
|
+
"msg_variables_saved" : "会话变量信息已保存到 {0}。",
|
160
|
+
"msg_alias_created" : "创建Alias {0} 成功: {1}",
|
161
|
+
"msg_trigger_created" : "创建Trigger {0} 成功: {1}",
|
162
|
+
"msg_timer_created" : "创建Timer {0} 成功: {1}",
|
163
|
+
|
164
|
+
"msg_tri_triggered" : " {0} 正常触发。",
|
165
|
+
"msg_tri_wildcards" : " 捕获:{0}",
|
166
|
+
"msg_tri_prevent" : " {0}该触发器未开启keepEval, 会阻止后续触发器。{1}",
|
167
|
+
"msg_tri_ignore" : " {1}{0} 可以触发,但由于优先级与keepEval设定,触发器不会触发。{2}",
|
168
|
+
"msg_tri_matched" : " {0} 可以匹配触发。",
|
169
|
+
"msg_enabled_summary_0" : "{0} 使能的触发器中,没有可以触发的。",
|
170
|
+
"msg_enabled_summary_1" : "{0} 使能的触发器中,共有 {1} 个可以触发,实际触发 {2} 个,另有 {3} 个由于 keepEval 原因实际不会触发。",
|
171
|
+
"msg_enabled_summary_2" : "{0} 使能的触发器中,共有 {1} 个全部可以被正常触发。",
|
172
|
+
"msg_disabled_summary_0" : "{0} 未使能的触发器中,共有 {1} 个可以匹配。",
|
173
|
+
"msg_disabled_summary_1" : "{0} 未使能触发器,没有可以匹配的。",
|
174
|
+
"msg_test_summary_0" : " 测试内容: {0}",
|
175
|
+
"msg_test_summary_1" : " 测试结果: 没有可以匹配的触发器。",
|
176
|
+
"msg_test_summary_2" : " 测试结果: 有{0}个触发器可以被正常触发,一共有{1}个满足匹配触发要求。",
|
177
|
+
"msg_test_title" : "触发器测试 - {0}",
|
178
|
+
"msg_triggered_mode" : "'响应模式'",
|
179
|
+
"msg_matched_mode" : "'测试模式'",
|
180
|
+
|
181
|
+
"msg_no_plugins" : "PYMUD当前并未加载任何插件。",
|
182
|
+
"msg_plugins_list" : "PYMUD当前已加载 {0} 个插件,分别为:",
|
183
|
+
"msg_plugins_info" : "作者 {2} 版本 {1} 发布日期 {3}\n 简介: {0}",
|
184
|
+
|
185
|
+
"msg_py_exception" : "Python执行错误:{0}",
|
186
|
+
|
187
|
+
"title_msg" : "消息",
|
188
|
+
"title_warning" : "警告",
|
189
|
+
"title_error" : "错误",
|
190
|
+
"title_info" : "提示",
|
191
|
+
|
192
|
+
"msg_log_title" : "本会话中的记录器情况:",
|
193
|
+
"msg_log_title2" : "本应用其他会话中的记录器情况:",
|
194
|
+
"logger" : "记录器",
|
195
|
+
"enabled" : "开启",
|
196
|
+
"disabled" : "关闭",
|
197
|
+
"logger_status" : "当前状态",
|
198
|
+
"file_mode" : "文件模式",
|
199
|
+
"logger_mode" : "记录模式",
|
200
|
+
"ANSI" : "ANSI",
|
201
|
+
"plain_text" : "纯文本",
|
202
|
+
|
203
|
+
"filemode_new" : "新建",
|
204
|
+
"filemode_append" : "追加",
|
205
|
+
"filemode_overwrite" : "覆写",
|
206
|
+
|
207
|
+
"msg_logger_enabled" : "{0}: 记录器{1}以{2}文件模式以及{3}记录模式开启。",
|
208
|
+
"msg_logger_disabled" : "{0}: 记录器{1}记录已关闭。",
|
209
|
+
"msg_logfile_not_exists" : "指定的记录文件 {0} 不存在。",
|
210
|
+
|
211
|
+
"exception_logmode_error" : "错误的记录模式: {0}",
|
212
|
+
"exception_plugin_file_not_found" : "指定的插件文件 {0} 不存在或者格式不正确。",
|
213
|
+
},
|
214
|
+
|
215
|
+
"docstring" : {
|
216
|
+
"Session": {
|
217
|
+
"handle_clear" :
|
218
|
+
'''
|
219
|
+
嵌入命令 #clear / #cls 的执行函数,清空当前会话缓冲与显示。
|
220
|
+
该函数不应该在代码中直接调用。
|
221
|
+
|
222
|
+
使用:
|
223
|
+
- #cls: 清空当前会话缓冲及显示
|
224
|
+
''',
|
225
|
+
}
|
226
|
+
}
|
227
227
|
}
|