summaryrefslogtreecommitdiff
path: root/server/src/method/textDocument
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-28 15:45:31 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-28 15:45:31 +0800
commite7bd33ff213afb6f4d6d666d215107651ab27a1a (patch)
tree70f9d4135ff0aa8e782fa90c1b0c082afd6c70d8 /server/src/method/textDocument
parent266b1d1bae0f45fac30a493e219cb4a5ea779068 (diff)
downloadlua-language-server-e7bd33ff213afb6f4d6d666d215107651ab27a1a.zip
翻译
Diffstat (limited to 'server/src/method/textDocument')
-rw-r--r--server/src/method/textDocument/codeAction.lua20
1 files changed, 11 insertions, 9 deletions
diff --git a/server/src/method/textDocument/codeAction.lua b/server/src/method/textDocument/codeAction.lua
index 80faee51..e2ff2e50 100644
--- a/server/src/method/textDocument/codeAction.lua
+++ b/server/src/method/textDocument/codeAction.lua
@@ -1,9 +1,11 @@
+local lang = require 'language'
+
local function disableDiagnostic(lsp, uri, data, callback)
callback {
- title = ('禁用诊断(%s)'):format(data.code),
+ title = lang.script('ACTION_DISABLE_DIAG', data.code),
kind = 'quickfix',
command = {
- title = '禁用诊断',
+ title = lang.script.COMMAND_DISABLE_DIAG,
command = 'config',
arguments = {
{
@@ -28,10 +30,10 @@ local function solveUndefinedGlobal(lsp, uri, data, callback)
return
end
callback {
- title = ('标记 `%s` 为已定义的全局变量'):format(name),
+ title = lang.script('ACTION_MARK_GLOBAL', name),
kind = 'quickfix',
command = {
- title = '标记全局变量',
+ title = lang.script.COMMAND_MARK_GLOBAL,
command = 'config',
arguments = {
{
@@ -46,10 +48,10 @@ end
local function solveTrailingSpace(lsp, uri, data, callback)
callback {
- title = '清除所有后置空格',
+ title = lang.script.ACTION_REMOVE_SPACE,
kind = 'quickfix',
command = {
- title = '清除所有后置空格',
+ title = lang.script.COMMAND_REMOVE_SPACE,
command = 'removeSpace',
arguments = {
{
@@ -62,7 +64,7 @@ end
local function solveNewlineCall(lsp, uri, data, callback)
callback {
- title = '添加 `;`',
+ title = lang.script.ACTION_ADD_SEMICOLON,
kind = 'quickfix',
edit = {
changes = {
@@ -82,10 +84,10 @@ end
local function solveAmbiguity1(lsp, uri, data, callback)
callback {
- title = '添加括号',
+ title = lang.script.ACTION_ADD_BRACKETS,
kind = 'quickfix',
command = {
- title = '添加括号',
+ title = lang.script.COMMAND_ADD_BRACKETS,
command = 'solve',
arguments = {
{