diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-01-24 07:03:40 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-01-24 07:03:40 +0800 |
| commit | 3fa56b997b44caba630a5dbc67687923978c5c7d (patch) | |
| tree | b1f62fe31f88fb666e810637df8ca7a60265a3ee /resources | |
| parent | 92f2cdd3dfa378cfcfb9085fedd601b27e499ee7 (diff) | |
Add command aliases, error handling improvements, and flag aliases
- Add aliases for status command: sign, sheet, sheet.add, drop, drop.cat
- Improve error handling with detailed localized messages for prepare,
execute, and render phases
- Add flag aliases: -L for --lang and -R for --renderer
- Implement similar command suggestions using Levenshtein distance
- Fix command matching logic to avoid ambiguous prefix issues
Diffstat (limited to 'resources')
| -rw-r--r-- | resources/locales/jvn/en.yml | 86 | ||||
| -rw-r--r-- | resources/locales/jvn/zh-CN.yml | 84 |
2 files changed, 145 insertions, 25 deletions
diff --git a/resources/locales/jvn/en.yml b/resources/locales/jvn/en.yml index 525d8c5..d7dead3 100644 --- a/resources/locales/jvn/en.yml +++ b/resources/locales/jvn/en.yml @@ -1,19 +1,16 @@ -process_error: - prepare_error: | - [[YELLOW]]Preparation Phase Error:[[/]] - %{error} - execute_error: | - [[RED]]Execution Phase Error:[[/]] - %{error} - render_error: | - [[YELLOW]]Rendering Phase Error:[[/]] - %{error} - - Tip: If you need to ignore error output, - please append the `--no-error-logs` parameter to the command. +help: | + NO +process_error: no_matching_command: | No matching command found! + Use `jv -h` to get help + + no_matching_command_but_similar: | + No matching command found, but similar commands were found: + jv %{similars} + + Use `jv -h` to get help ambiguous_command: | Multiple commands found, unable to determine which one you want: @@ -33,3 +30,66 @@ process_error: other: | %{error} + +prepare_error: + io: | + I/O error in preparation phase! + Error: %{error} + + error: | + Unknown error in preparation phase! + Error: %{error} + + local_workspace_not_found: | + Local workspace not found! + Create or enter a workspace directory first. + + local_config_not_found: | + Failed to read workspace config. File may not exist or format mismatch. + Use `jv update` and try again. + + latest_info_not_found: | + Unable to read latest upstream info! + Use `jv update` and try again. + + latest_file_data_not_exist: | + Unable to read latest file info for member `%{member_id}`! + Use `jv update` and try again. + + cached_sheet_not_found: | + Unable to read cached upstream sheet `%{sheet_name}`! + Use `jv update` and try again. + + local_sheet_not_found: | + Unable to read local sheet `%{sheet_name}` for member `%{member_id}`. + + local_status_analyze_failed: | + Failed to analyze local workspace! + + no_sheet_in_use: | + No sheet in use. Use `jv use <structure_sheet_name>`. + +execute_error: + io: | + I/O error in execution phase! + Error: %{error} + + error: | + Error in execution phase! + Error: %{error} + +render_error: + io: | + I/O error in rendering phase! + Error: %{error} + + error: | + Error in rendering phase! + Error: %{error} + + serialize_failed: | + Data serialization error! + Error: %{error} + + renderer_not_found: | + Renderer `%{renderer_name}` not found! diff --git a/resources/locales/jvn/zh-CN.yml b/resources/locales/jvn/zh-CN.yml index ffb033c..194bddd 100644 --- a/resources/locales/jvn/zh-CN.yml +++ b/resources/locales/jvn/zh-CN.yml @@ -1,18 +1,15 @@ +help: | + NO + process_error: - prepare_error: | - [[YELLOW]]准备阶段错误:[[/]] - %{error} - execute_error: | - [[RED]]执行阶段错误:[[/]] - %{error} - render_error: | - [[YELLOW]]渲染阶段错误:[[/]] - %{error} + no_matching_command: | + 无法匹配该命令,使用 `jv -h` 查看帮助 - 提示:若您需要忽略错误输出,请在命令后追加 `--no-error-logs` 参数 + no_matching_command_but_similar: | + 无法找到匹配的命令,但找到相似命令: + jv %{similars} - no_matching_command: | - 无法找到匹配的命令! + 使用 `jv -h` 查看帮助 ambiguous_command: | 找到多个命令,无法确定您想要哪一个: @@ -32,3 +29,66 @@ process_error: other: | %{error} + +prepare_error: + io: | + 命令在准备阶段发生了 I/O 错误! + 错误信息:%{error} + + error: | + 命令在准备阶段发生未知错误! + 错误信息:%{error} + + local_workspace_not_found: | + 无法找到本地工作区! + 请先创建或进入本地工作区目录 + + local_config_not_found: | + 读取本地工作区配置文件失败,它可能不存在或格式不匹配 + 请使用 `jv update` 更新工作区信息后再尝试 + + latest_info_not_found: | + 无法找到或读取最新上游信息! + 请使用 `jv update` 更新工作区信息后再尝试 + + latest_file_data_not_exist: | + 无法找到或读取成员 `%{member_id}` 的最新文件信息! + 请使用 `jv update` 更新工作区信息后再尝试 + + cached_sheet_not_found: | + 无法找到或读取上游结构表 `%{sheet_name}` 的缓存信息! + 请使用 `jv update` 更新工作区信息后再尝试 + + local_sheet_not_found: | + 无法找到或读取成员 `%{member_id}` 的本地结构表 `%{sheet_name}` + + local_status_analyze_failed: | + 分析本地工作区失败! + + no_sheet_in_use: | + 当前没有在使用表,请使用 `jv use <结构表名称>` 使用一张结构表 + +execute_error: + io: | + 命令在运行阶段发生了 I/O 错误! + 错误信息:%{error} + + error: | + 命令在运行阶段发生错误! + 错误信息:%{error} + +render_error: + io: | + 命令在渲染阶段发生了 I/O 错误! + 错误信息:%{error} + + error: | + 命令在渲染阶段发生错误! + 错误信息:%{error} + + serialize_failed: | + 数据在序列化时发生了错误! + 错误信息:%{error} + + renderer_not_found: | + 无法找到渲染器 `%{renderer_name}`! |
