Skip to content

Commit 49de63c

Browse files
committed
fix locale
1 parent 442da6b commit 49de63c

File tree

7 files changed

+12
-17
lines changed

7 files changed

+12
-17
lines changed

locale/en-us/script.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ DIAG_REDUNDANT_RETURN_VALUE_RANGE =
139139
DIAG_MISSING_RETURN =
140140
'Return value is required here.'
141141
DIAG_RETURN_TYPE_MISMATCH =
142-
'The type of the {index} return value is `{def}`, but the actual return is `{ref}`.\n{err}'
142+
'The type of the {index} return value is `{def}`, but the actual return is `{ref}`.'
143143
DIAG_UNKNOWN_OPERATOR =
144144
'Unknown operator `{}`.'
145145
DIAG_UNREACHABLE_CODE =

locale/zh-cn/script.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,17 +117,17 @@ DIAG_UNDEFINED_DOC_PARAM =
117117
DIAG_UNKNOWN_DIAG_CODE =
118118
'未知的诊断代号 `{}`。'
119119
DIAG_CAST_LOCAL_TYPE =
120-
'已显式定义变量的类型为 `{def}` ,不能再将其类型转换为 `{ref}`。\n{err}'
120+
'已显式定义变量的类型为 `{def}` ,不能再将其类型转换为 `{ref}`。'
121121
DIAG_CAST_FIELD_TYPE =
122-
'已显式定义字段的类型为 `{def}` ,不能再将其类型转换为 `{ref}`。\n{err}'
122+
'已显式定义字段的类型为 `{def}` ,不能再将其类型转换为 `{ref}`。'
123123
DIAG_ASSIGN_TYPE_MISMATCH =
124-
'不能将 `{ref}` 赋值给 `{def}`。\n{err}'
124+
'不能将 `{ref}` 赋值给 `{def}`。'
125125
DIAG_PARAM_TYPE_MISMATCH =
126-
'不能将 `{ref}` 赋给参数 `{def}`。\n{err}'
126+
'不能将 `{ref}` 赋给参数 `{def}`。'
127127
DIAG_UNKNOWN_CAST_VARIABLE =
128128
'未知的类型转换变量 `{}`。'
129129
DIAG_CAST_TYPE_MISMATCH =
130-
'不能将 `{def}` 转换为 `{ref}`。\n{err}'
130+
'不能将 `{def}` 转换为 `{ref}`。'
131131
DIAG_MISSING_RETURN_VALUE =
132132
'至少需要 {min} 个返回值,但此处只返回 {rmax} 个值。'
133133
DIAG_MISSING_RETURN_VALUE_RANGE =
@@ -139,7 +139,7 @@ DIAG_REDUNDANT_RETURN_VALUE_RANGE =
139139
DIAG_MISSING_RETURN =
140140
'此处需要返回值。'
141141
DIAG_RETURN_TYPE_MISMATCH =
142-
'第 {index} 个返回值的类型为 `{def}` ,但实际返回的是 `{ref}`。\n{err}'
142+
'第 {index} 个返回值的类型为 `{def}` ,但实际返回的是 `{ref}`。'
143143
DIAG_UNKNOWN_OPERATOR =
144144
'未知的运算符 `{}`。'
145145
DIAG_UNREACHABLE_CODE =

script/core/diagnostics/assign-type-mismatch.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ return function (uri, callback)
114114
message = lang.script('DIAG_ASSIGN_TYPE_MISMATCH', {
115115
def = vm.getInfer(varNode):view(uri),
116116
ref = vm.getInfer(valueNode):view(uri),
117-
err = vm.viewTypeErrorMessage(uri, errs),
118-
}),
117+
}) .. '\n' .. vm.viewTypeErrorMessage(uri, errs),
119118
}
120119
end)
121120
end

script/core/diagnostics/cast-local-type.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ return function (uri, callback)
4242
message = lang.script('DIAG_CAST_LOCAL_TYPE', {
4343
def = vm.getInfer(locNode):view(uri),
4444
ref = vm.getInfer(refNode):view(uri),
45-
err = vm.viewTypeErrorMessage(uri, errs),
46-
}),
45+
}) .. '\n' .. vm.viewTypeErrorMessage(uri, errs),
4746
}
4847
end
4948
end

script/core/diagnostics/cast-type-mismatch.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ return function (uri, callback)
3535
message = lang.script('DIAG_CAST_TYPE_MISMATCH', {
3636
def = vm.getInfer(defNode):view(uri),
3737
ref = vm.getInfer(refNode):view(uri),
38-
err = vm.viewTypeErrorMessage(uri, errs),
39-
})
38+
}) .. '\n' .. vm.viewTypeErrorMessage(uri, errs),
4039
}
4140
end
4241
end

script/core/diagnostics/param-type-mismatch.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ return function (uri, callback)
110110
message = lang.script('DIAG_PARAM_TYPE_MISMATCH', {
111111
def = vm.getInfer(rawDefNode):view(uri),
112112
ref = vm.getInfer(refNode):view(uri),
113-
err = vm.viewTypeErrorMessage(uri, errs),
114-
})
113+
}) .. '\n' .. vm.viewTypeErrorMessage(uri, errs),
115114
}
116115
end
117116
::CONTINUE::

script/core/diagnostics/return-type-mismatch.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,8 @@ return function (uri, callback)
6969
message = lang.script('DIAG_RETURN_TYPE_MISMATCH', {
7070
def = vm.getInfer(docRet):view(uri),
7171
ref = vm.getInfer(retNode):view(uri),
72-
err = vm.viewTypeErrorMessage(uri, errs),
7372
index = i,
74-
}),
73+
}) .. '\n' .. vm.viewTypeErrorMessage(uri, errs),
7574
}
7675
end
7776
end

0 commit comments

Comments
 (0)