diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-19 11:22:56 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-19 11:22:56 +0800 |
commit | 67301c33eafa7a46a8b6e05fec8aac27539f4a05 (patch) | |
tree | 362ec6773488cd1a3893e003bd720cb1c071474c | |
parent | ac76b0c5013874038e19628988742b75253a8be2 (diff) | |
download | lua-language-server-67301c33eafa7a46a8b6e05fec8aac27539f4a05.zip |
build locale
-rw-r--r-- | locale/pt-br/script.lua | 57 | ||||
-rw-r--r-- | locale/zh-cn/script.lua | 57 | ||||
-rw-r--r-- | locale/zh-tw/script.lua | 57 |
3 files changed, 171 insertions, 0 deletions
diff --git a/locale/pt-br/script.lua b/locale/pt-br/script.lua index b9cf0f7d..4804a646 100644 --- a/locale/pt-br/script.lua +++ b/locale/pt-br/script.lua @@ -1022,3 +1022,60 @@ print(x) --> table --- [View Wiki](https://github.com/sumneko/lua-language-server/wiki/EmmyLua-Annotations#cast) ]=] +LUADOC_DESC_OPERATOR = -- TODO: need translate! +[=[ +Provide type declaration for [operator metamethods](http://lua-users.org/wiki/MetatableEvents). + +## Syntax +`@operator <operation>[(input_type)]:<resulting_type>` + +## Usage +### Vector Add Metamethod +``` +---@class Vector +---@operation add(Vector):Vector + +vA = Vector.new(1, 2, 3) +vB = Vector.new(10, 20, 30) + +vC = vA + vB +--> Vector +``` +### Unary Minus +``` +---@class Passcode +---@operation unm:integer + +pA = Passcode.new(1234) +pB = -pA +--> integer +``` +[View Request](https://github.com/sumneko/lua-language-server/issues/599) +]=] +LUADOC_DESC_ENUM = -- TODO: need translate! +[=[ +Mark a table as an enum. If you want an enum but can't define it as a Lua +table, take a look at the [`@alias`](https://github.com/sumneko/lua-language-server/wiki/EmmyLua-Annotations#alias) +tag. + +## Syntax +`@enum <name>` + +## Usage +``` +---@enum colors +local colors = { + white = 0, + orange = 2, + yellow = 4, + green = 8, + black = 16, +} + +---@param color colors +local function setColor(color) end + +-- Completion and hover is provided for the below param +setColor(colors.green) +``` +]=] diff --git a/locale/zh-cn/script.lua b/locale/zh-cn/script.lua index ed7ff951..72c0d5bf 100644 --- a/locale/zh-cn/script.lua +++ b/locale/zh-cn/script.lua @@ -1022,3 +1022,60 @@ print(x) --> table --- [View Wiki](https://github.com/sumneko/lua-language-server/wiki/EmmyLua-Annotations#cast) ]=] +LUADOC_DESC_OPERATOR = -- TODO: need translate! +[=[ +Provide type declaration for [operator metamethods](http://lua-users.org/wiki/MetatableEvents). + +## Syntax +`@operator <operation>[(input_type)]:<resulting_type>` + +## Usage +### Vector Add Metamethod +``` +---@class Vector +---@operation add(Vector):Vector + +vA = Vector.new(1, 2, 3) +vB = Vector.new(10, 20, 30) + +vC = vA + vB +--> Vector +``` +### Unary Minus +``` +---@class Passcode +---@operation unm:integer + +pA = Passcode.new(1234) +pB = -pA +--> integer +``` +[View Request](https://github.com/sumneko/lua-language-server/issues/599) +]=] +LUADOC_DESC_ENUM = -- TODO: need translate! +[=[ +Mark a table as an enum. If you want an enum but can't define it as a Lua +table, take a look at the [`@alias`](https://github.com/sumneko/lua-language-server/wiki/EmmyLua-Annotations#alias) +tag. + +## Syntax +`@enum <name>` + +## Usage +``` +---@enum colors +local colors = { + white = 0, + orange = 2, + yellow = 4, + green = 8, + black = 16, +} + +---@param color colors +local function setColor(color) end + +-- Completion and hover is provided for the below param +setColor(colors.green) +``` +]=] diff --git a/locale/zh-tw/script.lua b/locale/zh-tw/script.lua index 885d9dfc..fea37bed 100644 --- a/locale/zh-tw/script.lua +++ b/locale/zh-tw/script.lua @@ -1017,3 +1017,60 @@ print(x) --> table --- [檢視文件](https://github.com/sumneko/lua-language-server/wiki/EmmyLua-Annotations#cast) ]=] +LUADOC_DESC_OPERATOR = -- TODO: need translate! +[=[ +Provide type declaration for [operator metamethods](http://lua-users.org/wiki/MetatableEvents). + +## Syntax +`@operator <operation>[(input_type)]:<resulting_type>` + +## Usage +### Vector Add Metamethod +``` +---@class Vector +---@operation add(Vector):Vector + +vA = Vector.new(1, 2, 3) +vB = Vector.new(10, 20, 30) + +vC = vA + vB +--> Vector +``` +### Unary Minus +``` +---@class Passcode +---@operation unm:integer + +pA = Passcode.new(1234) +pB = -pA +--> integer +``` +[View Request](https://github.com/sumneko/lua-language-server/issues/599) +]=] +LUADOC_DESC_ENUM = -- TODO: need translate! +[=[ +Mark a table as an enum. If you want an enum but can't define it as a Lua +table, take a look at the [`@alias`](https://github.com/sumneko/lua-language-server/wiki/EmmyLua-Annotations#alias) +tag. + +## Syntax +`@enum <name>` + +## Usage +``` +---@enum colors +local colors = { + white = 0, + orange = 2, + yellow = 4, + green = 8, + black = 16, +} + +---@param color colors +local function setColor(color) end + +-- Completion and hover is provided for the below param +setColor(colors.green) +``` +]=] |