@@ -85,7 +85,7 @@ DIAG_COUNT_DOWN_LOOP =
8585DIAG_UNKNOWN =
8686' 無法推測出類型。'
8787DIAG_DEPRECATED =
88- ' 已廢棄 。'
88+ ' 已棄用 。'
8989DIAG_DIFFERENT_REQUIRES =
9090' 使用了不同的名字 `require` 了同一個檔案。'
9191DIAG_REDUNDANT_RETURN =
@@ -102,8 +102,8 @@ DIAG_CIRCLE_DOC_CLASS =
102102' 循環繼承的類別。'
103103DIAG_DOC_FIELD_NO_CLASS =
104104' 欄位必須定義在類別之後。'
105- DIAG_DUPLICATE_DOC_ALIAS = -- TODO: need translate!
106- ' Duplicate defined alias `{}`.'
105+ DIAG_DUPLICATE_DOC_ALIAS =
106+ ' 重複定義的別名 `{}`.'
107107DIAG_DUPLICATE_DOC_FIELD =
108108' 重複定義的欄位 `{}`。'
109109DIAG_DUPLICATE_DOC_PARAM =
@@ -128,18 +128,18 @@ DIAG_UNKNOWN_CAST_VARIABLE =
128128' 未知的類型轉換變數 `{}`.'
129129DIAG_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
144144MWS_NOT_SUPPORT =
145145' {} 目前還不支援多工作目錄,我可能需要重新啟動才能支援新的工作目錄...'
@@ -957,7 +957,7 @@ local module = require('string.utils')
957957]=]
958958LUADOC_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
990990local x --> integer
991991
992992---@cast x string
993993print(x) --> string
994994```
995- ### Add Type
995+ ### 增加類型
996996```
997997---@type string
998998local x --> string
999999
10001000---@cast x +boolean, +number
10011001print(x) --> string|boolean|number
10021002```
1003- ### Remove Type
1003+ ### 移除類型
10041004```
10051005---@type string|table
10061006local x --> string|table
@@ -1009,5 +1009,5 @@ local x --> string|table
10091009print(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]=]
0 commit comments