From 81103c096c6709937b430c53d32f91b9a73c6355 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Wed, 5 Nov 2025 16:43:03 +0800 Subject: Add sheet drop functionality and improve sheet listing - Implement `jv sheet drop` command with confirmation and error handling - Add restore confirmation when creating sheets that already exist as orphaned sheets - Enhance `jv sheet list` with --others and --all flags to show different sheet views - Update help text and localization files for new functionality --- locales/help_docs/en.yml | 44 +++++++++++++++++++++++++++++++++++++++++--- locales/help_docs/zh-CN.yml | 44 +++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 82 insertions(+), 6 deletions(-) (limited to 'locales/help_docs') diff --git a/locales/help_docs/en.yml b/locales/help_docs/en.yml index b899cdf..9bc5806 100644 --- a/locales/help_docs/en.yml +++ b/locales/help_docs/en.yml @@ -371,6 +371,16 @@ jv: direct: | Do you want to direct the current local workspace to the upstream vault %{upstream}? + sheet: + make: + restore: | + Sheet `%{sheet_name}` is no holder. Take ownership? + If not, use a different name to create a sheet. + + drop: | + Are you sure you want to drop sheet `%{sheet_name}`? + After this, you will not be able to work in the sheet! + fail: path_not_found: | The directory `%{path}` cannot be found! @@ -393,6 +403,7 @@ jv: remove: Failed to remove account `%{account}`, please check if the account exists. list: Failed to get account list! not_found: Cannot find account `%{account}`! + as: Failed to set current account, please ensure the current sheet has been exited init_create_dir_not_empty: | The current directory is not empty! @@ -457,10 +468,9 @@ jv: other_sheet_item_no_holder: | %{number}. %{name} (NO HOLDER) tip_has_sheet: | - You can use `jv use ` to start working + You are not on any sheet, you can use `jv use ` to use a sheet tip_no_sheet: | - **YOU HAVE NO SHEETS** - You can use `jv sheet make ` to create a new sheet + You don't have any sheets, you can use `jv make ` to create a new sheet result: common: @@ -496,7 +506,35 @@ jv: success: | Successfully created sheet `%{name}`! Upstream changed,use `jv update` to get the latest information + + success_restore: | + Successfully restored sheet `%{name}`! + Upstream changed,use `jv update` to get the latest information + sheet_already_exists: | Sheet `%{name}` already exists! + sheet_creation_failed: | Sheet creation failed: `%{error}` + + drop: + success: | + Successfully dropped sheet `%{name}`! + Upstream changed, use `jv update` to sync to latest information + **Tip**: You can use `jv make %{name}` to restore this sheet + + sheet_in_use: | + Sheet `%{name}` is in use, cannot drop! + **Tip**: Please use `jv exit` to exit current sheet first + + sheet_not_exists: | + Sheet `%{name}` does not exist! + + sheet_drop_failed: | + Failed to drop sheet: %{err} + + no_holder: | + Sheet `%{name}` has no holder! + + not_owner: | + You are not the holder of sheet `%{name}`, cannot drop it! diff --git a/locales/help_docs/zh-CN.yml b/locales/help_docs/zh-CN.yml index effad0b..7b6c653 100644 --- a/locales/help_docs/zh-CN.yml +++ b/locales/help_docs/zh-CN.yml @@ -378,6 +378,15 @@ jv: direct: | 是否需要将当前本地工作区定向到上游库 %{upstream}? + sheet: + make: + restore: | + 似乎 `%{sheet_name}` 是一张无人认领的表,是否拿到它的所有权? + 如果您不想拿到该表,请使用别的名称建立表 + + drop: | + 是否要放弃表 `%{sheet_name}` 的所有权,此后,您将无法在表中工作! + fail: path_not_found: | 您给出的目录 `%{path}` 无法找到! @@ -401,6 +410,7 @@ jv: list: 获取账户列表失败! move_key: 将该私钥移动至账户目录失败! not_found: 无法找到账户 `%{account}`! + as: 设置当前账户失败,请确保当前表已退出 init_create_dir_not_empty: | 当前目录并不是空的! @@ -453,7 +463,7 @@ jv: sheet: list: your_sheet: | - **你的表**: + **您的表**: your_sheet_item: | %{number}. %{name} your_sheet_item_use: | @@ -465,10 +475,10 @@ jv: other_sheet_item_no_holder: | %{number}. %{name}(无人认领) tip_has_sheet: | - 你可以使用 `jv use <表名>` 开始工作 + 您不在任何一张表,可使用 `jv use <表名>` 使用一张表 tip_no_sheet: | **没有可以编辑的表!** - 你可以使用 `jv sheet make <表名>` 创建一张新表 + 您没有任何一张表,可使用 `jv make <表名>` 创建一张新表 result: common: @@ -503,7 +513,35 @@ jv: success: | 成功创建表 `%{name}`! 上游信息已变更,请使用 `jv update` 同步至最新信息 + + success_restore: | + 成功恢复表 `%{name}` 的所有权! + 上游信息已变更,请使用 `jv update` 同步至最新信息 + sheet_already_exists: | 表 `%{name}` 已存在! + sheet_creation_failed: | 表创建失败:`%{err}` + + drop: + success: | + 成功放弃表 `%{name}` 的所有权! + 上游信息已变更,请使用 `jv update` 同步至最新信息 + **提示**:您可以使用 `jv make %{name}` 赎回该表 + + sheet_in_use: | + 表 `%{name}` 正在被使用中,无法放弃! + **提示**:请先 `jv exit` 退出当前表,再尝试该操作! + + sheet_not_exists: | + 表 `%{name}` 不存在! + + sheet_drop_failed: | + 放弃表失败:%{err} + + no_holder: | + 表 `%{name}` 没有持有人! + + not_owner: | + 您不是表 `%{name}` 的持有人,无法放弃该表! -- cgit