fix(plugins): cover indexed code names and translate rename refusals (#2209)

The refusal added for indexed-only renames missed code names in Go, Ruby and PHP, ran without the rename cancellation, and was English only. It now covers those node kinds, honours cancellation, and translates the hint.
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-09 07:15:13 +08:00
1 джерело 9a76d1766d
коміт 75565927d8
5 files changed
+122 -30

No files matched your search

+10
Переглянути файл
@@ -162,6 +162,16 @@ describe("t / locales", () => {
expect(txTemplate("Retry failed")).toBe(`${tx("Retry")}失败`);
expect(txTemplate("Sync with OS")).toBe("与操作系统同步");
expect(txTemplate("Something else entirely")).toBe("Something else entirely");
expect(
txTemplate(
"The PHP language server can't rename this symbol; renaming only the plugin's indexed names would leave it half renamed",
),
).toBe("语言服务器无法重命名此符号(PHP);仅重命名插件索引的名称会导致重命名不完整");
expect(
txTemplate(
"The Ruby language server can't rename this symbol; renaming only the plugin's indexed names would leave it half renamed",
),
).toBe("语言服务器无法重命名此符号(Ruby 语言);仅重命名插件索引的名称会导致重命名不完整");
});
it("translates text built by the tx tag, again after the locale changes", async () => {
+1
Переглянути файл
@@ -52,6 +52,7 @@
"Select Python Environment Folder": "Select Python Environment Folder",
"Checking interpreter": "Checking interpreter",
"Cannot run this Python interpreter. Select a working Python executable or virtualenv folder.": "Cannot run this Python interpreter. Select a working Python executable or virtualenv folder.",
"The {language} language server can't rename this symbol; renaming only the plugin's indexed names would leave it half renamed": "The {language} language server can't rename this symbol; renaming only the plugin's indexed names would leave it half renamed",
"Native server declined rename": "Native server declined rename",
"document is too large or is not a regular file": "document is too large or is not a regular file",
"document is too large": "document is too large",
+1
Переглянути файл
@@ -39,6 +39,7 @@
"Select Python Environment Folder": "选择 Python 环境文件夹",
"Checking interpreter": "正在检查解释器",
"Cannot run this Python interpreter. Select a working Python executable or virtualenv folder.": "无法运行此 Python 解释器。请选择可用的 Python 可执行文件或虚拟环境文件夹。",
"The {language} language server can't rename this symbol; renaming only the plugin's indexed names would leave it half renamed": "语言服务器无法重命名此符号({language});仅重命名插件索引的名称会导致重命名不完整",
"Native server declined rename": "语言服务器拒绝重命名",
"document is too large or is not a regular file": "文档过大或不是普通文件",
"document is too large": "文档过大",