Skip to content

Commit cab40a0

Browse files
authored
Merge pull request #1247 from AlexCai2019/master
繁體中文翻譯
2 parents 2548e6d + b6f9aa8 commit cab40a0

File tree

4 files changed

+41
-41
lines changed

4 files changed

+41
-41
lines changed

doc/zh-tw/config.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,7 @@ null
14191419

14201420
# type.castNumberToInteger
14211421

1422-
Allowed to assign the `number` type to the `integer` type.
1422+
允許將 `number` 類型賦值給 `integer` 類型。
14231423

14241424
## type
14251425

@@ -1435,9 +1435,9 @@ false
14351435

14361436
# type.weakUnionCheck
14371437

1438-
Once one subtype of a union type meets the condition, the union type also meets the condition.
1438+
同位類型中只要有一個子類型滿足條件,則同位類型也滿足條件。
14391439

1440-
When this setting is `false`, the `number|boolean` type cannot be assigned to the `number` type. It can be with `true`.
1440+
此設定為 `false` 時,`number|boolean` 類型無法賦給 `number` 類型;為 `true` 時則可以。
14411441

14421442

14431443
## type

locale/zh-tw/meta.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ debug.getuservalue['>5.4']=
281281
'回傳關聯在 `u` 上的第 `n` 個 `Lua` 值,以及一個布林, `false` 表示值不存在。'
282282
debug.setcstacklimit =
283283
[[
284-
### **已在 `Lua 5.4.2` 中廢棄**
284+
### **已在 `Lua 5.4.2` 中棄用**
285285
286286
設定新的C堆疊限制。該限制控制Lua中巢狀呼叫的深度,以避免堆疊溢出。
287287

locale/zh-tw/script.lua

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ DIAG_COUNT_DOWN_LOOP =
8585
DIAG_UNKNOWN =
8686
'無法推測出類型。'
8787
DIAG_DEPRECATED =
88-
'已廢棄'
88+
'已棄用'
8989
DIAG_DIFFERENT_REQUIRES =
9090
'使用了不同的名字 `require` 了同一個檔案。'
9191
DIAG_REDUNDANT_RETURN =
@@ -102,8 +102,8 @@ DIAG_CIRCLE_DOC_CLASS =
102102
'循環繼承的類別。'
103103
DIAG_DOC_FIELD_NO_CLASS =
104104
'欄位必須定義在類別之後。'
105-
DIAG_DUPLICATE_DOC_ALIAS = -- TODO: need translate!
106-
'Duplicate defined alias `{}`.'
105+
DIAG_DUPLICATE_DOC_ALIAS =
106+
'重複定義的別名 `{}`.'
107107
DIAG_DUPLICATE_DOC_FIELD =
108108
'重複定義的欄位 `{}`。'
109109
DIAG_DUPLICATE_DOC_PARAM =
@@ -128,18 +128,18 @@ DIAG_UNKNOWN_CAST_VARIABLE =
128128
'未知的類型轉換變數 `{}`.'
129129
DIAG_CAST_TYPE_MISMATCH =
130130
'不能將 `{ref}` 轉換為 `{def}`。'
131-
DIAG_MISSING_RETURN_VALUE = -- TODO: need translate!
132-
'At least {min} return values are required, but here only {rmax} values are returned.'
133-
DIAG_MISSING_RETURN_VALUE_RANGE = -- TODO: need translate!
134-
'At least {min} return values are required, but here only {rmin} to {rmax} values are returned.'
135-
DIAG_REDUNDANT_RETURN_VALUE = -- TODO: need translate!
136-
'At most {max} values returned, but the {rmax}th value was returned here.'
137-
DIAG_REDUNDANT_RETURN_VALUE_RANGE = -- TODO: need translate!
138-
'At most {max} values returned, but {rmin}th to {rmax}th values were returned here.'
139-
DIAG_MISSING_RETURN = -- TODO: need translate!
140-
'Return value is required here.'
141-
DIAG_RETURN_TYPE_MISMATCH = -- TODO: need translate!
142-
'The type of the {index} return value is `{def}`, but the actual return is `{ref}`.'
131+
DIAG_MISSING_RETURN_VALUE =
132+
'至少需要 {min} 個回傳值,但此處只回傳 {rmax} 個值。'
133+
DIAG_MISSING_RETURN_VALUE_RANGE =
134+
'至少需要 {min} 個回傳值,但此處只回傳 {rmin} {rmax} 個值。'
135+
DIAG_REDUNDANT_RETURN_VALUE =
136+
'最多只有 {max} 個回傳值,但此處回傳了第 {rmax} 個值。'
137+
DIAG_REDUNDANT_RETURN_VALUE_RANGE =
138+
'最多只有 {max} 個回傳值,但此處回傳了第 {rmin} 到第 {rmax} 個值。'
139+
DIAG_MISSING_RETURN =
140+
'此處需要回傳值。'
141+
DIAG_RETURN_TYPE_MISMATCH =
142+
'{index} 個回傳值的類型為 `{def}` ,但實際回傳的是 `{ref}`'
143143

144144
MWS_NOT_SUPPORT =
145145
'{} 目前還不支援多工作目錄,我可能需要重新啟動才能支援新的工作目錄...'
@@ -957,7 +957,7 @@ local module = require('string.utils')
957957
]=]
958958
LUADOC_DESC_ASYNC =
959959
[=[
960-
將函式標記為非同步
960+
將函式標記為非同步
961961
962962
## 語法
963963
`---@async`
@@ -976,31 +976,31 @@ LUADOC_DESC_NODISCARD =
976976
---
977977
[檢視文件](https://github.com/sumneko/lua-language-server/wiki/EmmyLua-Annotations#nodiscard)
978978
]=]
979-
LUADOC_DESC_CAST = -- TODO: need translate!
979+
LUADOC_DESC_CAST =
980980
[=[
981-
Allows type casting (type conversion).
981+
允許轉型(類型轉換)。
982982
983-
## Syntax
983+
## 語法
984984
`@cast <variable> <[+|-]type>[, <[+|-]type>]...`
985985
986-
## Usage
987-
### Overwrite type
986+
## 用法
987+
### 覆蓋類型
988988
```
989989
---@type integer
990990
local x --> integer
991991
992992
---@cast x string
993993
print(x) --> string
994994
```
995-
### Add Type
995+
### 增加類型
996996
```
997997
---@type string
998998
local x --> string
999999
10001000
---@cast x +boolean, +number
10011001
print(x) --> string|boolean|number
10021002
```
1003-
### Remove Type
1003+
### 移除類型
10041004
```
10051005
---@type string|table
10061006
local x --> string|table
@@ -1009,5 +1009,5 @@ local x --> string|table
10091009
print(x) --> table
10101010
```
10111011
---
1012-
[View Wiki](https://github.com/sumneko/lua-language-server/wiki/EmmyLua-Annotations#cast)
1012+
[檢視文件](https://github.com/sumneko/lua-language-server/wiki/EmmyLua-Annotations#cast)
10131013
]=]

locale/zh-tw/setting.lua

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,14 @@ config.hint.arrayIndex.Disable =
235235
'停用陣列索引提示。'
236236
config.hint.await =
237237
'如果呼叫的函數被標記為了 `---@async`,則在呼叫處提示 `await`。'
238-
config.hint.semicolon = -- TODO: need translate!
239-
'If there is no semicolon at the end of the statement, display a virtual semicolon.'
240-
config.hint.semicolon.All = -- TODO: need translate!
241-
'All statements display virtual semicolons.'
242-
config.hint.semicolon.SameLine = -- TODO: need translate!
243-
'When two statements are on the same line, display a semicolon between them.'
244-
config.hint.semicolon.Disable = -- TODO: need translate!
245-
'Disable virtual semicolons.'
238+
config.hint.semicolon =
239+
'若陳述式尾部沒有分號,則顯示虛擬分號。'
240+
config.hint.semicolon.All =
241+
'所有陳述式都顯示虛擬分號。'
242+
config.hint.semicolon.SameLine =
243+
'兩個陳述式在同一行時,在它們之間顯示分號。'
244+
config.hint.semicolon.Disable =
245+
'停用虛擬分號。'
246246
config.format.enable =
247247
'啟用程式碼格式化程式。'
248248
config.format.defaultConfig =
@@ -266,13 +266,13 @@ config.IntelliSense.traceBeSetted =
266266
'請查閱[文件](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features)瞭解用法。'
267267
config.IntelliSense.traceFieldInject =
268268
'請查閱[文件](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features)瞭解用法。'
269-
config.type.castNumberToInteger = -- TODO: need translate!
270-
'Allowed to assign the `number` type to the `integer` type.'
271-
config.type.weakUnionCheck = -- TODO: need translate!
269+
config.type.castNumberToInteger =
270+
'允許將 `number` 類型賦值給 `integer` 類型。'
271+
config.type.weakUnionCheck =
272272
[[
273-
Once one subtype of a union type meets the condition, the union type also meets the condition.
273+
同位類型中只要有一個子類型滿足條件,則同位類型也滿足條件。
274274
275-
When this setting is `false`, the `number|boolean` type cannot be assigned to the `number` type. It can be with `true`.
275+
此設定為 `false` 時,`number|boolean` 類型無法賦給 `number` 類型;為 `true` 時則可以。
276276
]]
277277
config.diagnostics['unused-local'] =
278278
'未使用的區域變數'

0 commit comments

Comments
 (0)