From 67301c33eafa7a46a8b6e05fec8aac27539f4a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 19 Jul 2022 11:22:56 +0800 Subject: build locale --- locale/pt-br/script.lua | 57 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) (limited to 'locale/pt-br/script.lua') 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 [(input_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 ` + +## 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) +``` +]=] -- cgit v1.2.3