Skip to content

Commit

Permalink
fix: add missing i18n key
Browse files Browse the repository at this point in the history
  • Loading branch information
401U committed Feb 23, 2023
1 parent 6875e03 commit f4feaa9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
5 changes: 5 additions & 0 deletions lang/en_us.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ mount:
normal: "Click to mount{server_name}"
occupied: "This server is already occupied by {occupied_by}"
uncheck: "Unchecked mountable config, please contact server admin for help"
error_btn:
hover: "Unknow server status, please contact server admin for help"
error:
is_current_mount: "Already mounted to this path!"
unknown_mount_path: "Unknown mount path, please checkout the mount list!"
Expand All @@ -34,6 +36,9 @@ mount:
unchecked_path: "Unchecked mountable config, please contact server admin for help!"
operation_conflict: "Operation conflict with current: {curr}"
perm_deny: "Permission denied!"
reset:
invalid_path: "Invalid reset path"
invalid_type: "Invalid reset type"
info:
mount_request: "Received request to mount {server_path}, "
reset_request: "Received request to reset world form {reset_path}, "
Expand Down
5 changes: 5 additions & 0 deletions lang/zh_cn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ mount:
normal: "点击以挂载{server_name}"
occupied: "已被{occupied_by}占用"
uncheck: "槽位信息未确认, 请联系管理员进行操作"
error_btn:
hover: "槽位状态异常, 请联系管理员进行操作"
error:
is_current_mount: "已经挂载到此槽位"
unknown_mount_path: "未知的挂载目标, 请检查挂载列表"
Expand All @@ -34,6 +36,9 @@ mount:
unchecked_path: "未确认的挂载路径, 请联系管理员进行操作!"
operation_conflict: "操作冲突, 当前正在{curr}中"
perm_deny: "权限不足"
reset:
invalid_path: "无效的重置路径"
invalid_type: "无效的重置类型, 请使用 full 或 region"
info:
mount_request: "将要挂载到{server_path}, "
reset_request: "将要从 {reset_path} 重置地图, "
Expand Down
2 changes: 1 addition & 1 deletion mount/MountManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def set_config(self, src: CommandSource, config_key, config_value):
assert hasattr(self._config, config_key)
self._config.__setattr__(name=config_key, value=config_value)
self._config.save()
src.reply(rtr("info.setup_config", config_key, config_value))
src.reply(rtr("config.set_value", config_key, config_value))

@staticmethod
def list_path_config(src: CommandSource, path: str):
Expand Down
6 changes: 3 additions & 3 deletions mount/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ def as_list_entry(self, name: str, server_path: str, mount_name: str, current_mo

def get_button() -> RTextBase:
error_button = RText("[?]", color=RColor.red).h(
rtr("button.error.hover"))
rtr("list.error_btn.hover"))
mount_button = RText("[▷]")
reset_button = RText("[↻]", color=RColor.yellow).h(rtr("button.reset.hover")).c(RAction.suggest_command,
COMMAND_PREFIX + " --reset")
reset_button = RText("[↻]", color=RColor.yellow).c(RAction.suggest_command,
COMMAND_PREFIX + " --reset")
if server_path == current_mount and mount_name == self.occupied_by:
if self.reset_path in ["", None, '.']:
reset_button.set_color(RColor.gray).h(
Expand Down

0 comments on commit f4feaa9

Please sign in to comment.