From 63c2e8ea930d1a004e48f849542c595788fc8e3e Mon Sep 17 00:00:00 2001 From: Mozok Evgen Date: Sat, 24 Aug 2024 20:42:11 +0300 Subject: [PATCH 1/7] Fix new_ annotations --- druid/annotations.lua | 82 ++++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/druid/annotations.lua b/druid/annotations.lua index 2d4d340..46c76b3 100644 --- a/druid/annotations.lua +++ b/druid/annotations.lua @@ -6,7 +6,7 @@ local druid = {} --- Create a new Druid instance for creating GUI components. ---@param context table The Druid context. Usually, this is the self of the gui_script. It is passed into all Druid callbacks. ----@param style table The Druid style table to override style parameters for this Druid instance. +---@param style? table The Druid style table to override style parameters for this Druid instance. ---@return druid_instance The Druid instance @{DruidInstance}. function druid.new(context, style) end @@ -307,6 +307,7 @@ function druid__checkbox_group.init(self, nodes, callback, click_nodes) end ---@param is_instant boolean If instant state change function druid__checkbox_group.set_state(self, indexes, is_instant) end +---@alias Grid druid.static_grid|druid.dynamic_grid ---@class druid.data_list : druid.base_component ---@field grid druid.static_grid|druid.dynamic_grid The Druid Grid component @@ -1445,40 +1446,40 @@ function druid_instance.new(self, component, ...) end --- Create @{BackHandler} component ---@param self druid_instance ----@param callback callback On back button +---@param callback function On back button ---@param params any Callback argument ---@return druid.back_handler @{BackHandler} component function druid_instance.new_back_handler(self, callback, params) end --- Create @{Blocker} component ---@param self druid_instance ----@param node node Gui node +---@param node node|string Gui node (or node id) ---@return druid.blocker @{Blocker} component function druid_instance.new_blocker(self, node) end --- Create @{Button} component ---@param self druid_instance ----@param node node GUI node +---@param node node|string GUI node (or node id) ---@param callback function Button callback ----@param params table Button callback params ----@param anim_node node Button anim node (node, if not provided) +---@param params? table Button callback params +---@param anim_node? node|string Button anim node (node, if not provided) ---@return druid.button @{Button} component function druid_instance.new_button(self, node, callback, params, anim_node) end --- Create @{Checkbox} component ---@param self druid_instance ----@param node node Gui node +---@param node node|string Gui node (or node id) ---@param callback function Checkbox callback ----@param click_node node Trigger node, by default equals to node ----@param initial_state boolean The initial state of checkbox, default - false +---@param click_node? node Trigger node, by default equals to node +---@param initial_state? boolean The initial state of checkbox, default - false ---@return druid.checkbox @{Checkbox} component function druid_instance.new_checkbox(self, node, callback, click_node, initial_state) end --- Create @{CheckboxGroup} component ---@param self druid_instance ----@param nodes node[] Array of gui node +---@param nodes (node | string)[] Array of gui node (or node id) ---@param callback function Checkbox callback ----@param click_nodes node[] Array of trigger nodes, by default equals to nodes +---@param click_nodes? (node | string)[] Array of trigger nodes (or node id), by default equals to nodes ---@return druid.checkbox_group @{CheckboxGroup} component function druid_instance.new_checkbox_group(self, nodes, callback, click_nodes) end @@ -1492,14 +1493,14 @@ function druid_instance.new_data_list(self, druid_scroll, druid_grid, create_fun --- Create @{Drag} component ---@param self druid_instance ----@param node node GUI node to detect dragging +---@param node node|string GUI node (or node id) to detect dragging ---@param on_drag_callback function Callback for on_drag_event(self, dx, dy) ---@return druid.drag @{Drag} component function druid_instance.new_drag(self, node, on_drag_callback) end --- Create @{DynamicGrid} component ---@param self druid_instance ----@param parent node The gui node parent, where items will be placed +---@param parent node|string The gui node (or node id) parent, where items will be placed ---@return druid.dynamic_grid @{DynamicGrid} component function druid_instance.new_dynamic_grid(self, parent) end @@ -1507,53 +1508,54 @@ function druid_instance.new_dynamic_grid(self, parent) end ---@param self druid_instance ---@param keys_array string|string[] Keys for trigger action. Should contains one action key and any amount of modificator keys ---@param callback function Button callback ----@param params value Button callback params +---@param params? value Button callback params ---@return druid.hotkey @{Hotkey} component function druid_instance.new_hotkey(self, keys_array, callback, params) end --- Create @{Hover} component ---@param self druid_instance ----@param node node Gui node +---@param node node|string Gui node (or node id) ---@param on_hover_callback function Hover callback ---@return druid.hover @{Hover} component function druid_instance.new_hover(self, node, on_hover_callback) end --- Create @{Input} component ---@param self druid_instance ----@param click_node node Button node to enabled input component ----@param text_node node Text node what will be changed on user input ----@param keyboard_type number Gui keyboard type for input field +---@param click_node node|string Button node (or node id) to enabled input component +---@param text_node node|string|druid.text Text node what will be changed on user input +---@param keyboard_type? number Gui keyboard type for input field ---@return druid.input @{Input} component function druid_instance.new_input(self, click_node, text_node, keyboard_type) end --- Create @{LangText} component ---@param self druid_instance ----@param node node The text node ----@param locale_id string Default locale id ----@param no_adjust bool If true, will not correct text size +---@param node node|string The text node (or node id) +---@param locale_id? string Default locale id +---@param no_adjust? bool If true, will not correct text size ---@return druid.lang_text @{LangText} component function druid_instance.new_lang_text(self, node, locale_id, no_adjust) end --- Create @{Layout} component ---@param self druid_instance ----@param node string|node Layout node +---@param node string|node Layout node (or node id) ---@param mode string The layout mode +---@param on_size_changed_callback? function The callback on window resize ---@return druid.layout @{Layout} component -function druid_instance.new_layout(self, node, mode) end +function druid_instance.new_layout(self, node, mode, on_size_changed_callback) end --- Create @{Progress} component ---@param self druid_instance ---@param node string|node Progress bar fill node or node name ---@param key string Progress bar direction: const.SIDE.X or const.SIDE.Y ----@param init_value number Initial value of progress bar +---@param init_value? number Initial value of progress bar ---@return druid.progress @{Progress} component function druid_instance.new_progress(self, node, key, init_value) end --- Create @{RadioGroup} component ---@param self druid_instance ----@param nodes node[] Array of gui node +---@param nodes (node | string)[] Array of gui node (or node id) ---@param callback function Radio callback ----@param click_nodes node[] Array of trigger nodes, by default equals to nodes +---@param click_nodes? (node | string)[] Array of trigger nodes (or node id), by default equals to nodes ---@return druid.radio_group @{RadioGroup} component function druid_instance.new_radio_group(self, nodes, callback, click_nodes) end @@ -1567,48 +1569,48 @@ function druid_instance.new_rich_text(self, template, nodes) end --- Create @{Scroll} component ---@param self druid_instance ----@param view_node node GUI view scroll node ----@param content_node node GUI content scroll node +---@param view_node node|string GUI view scroll node (or node id) +---@param content_node node|string GUI content scroll node (or node id) ---@return druid.scroll @{Scroll} component function druid_instance.new_scroll(self, view_node, content_node) end --- Create @{Slider} component ---@param self druid_instance ----@param node node Gui pin node +---@param node node|string Gui pin node (or node id) ---@param end_pos vector3 The end position of slider ----@param callback function On slider change callback +---@param callback? function On slider change callback ---@return druid.slider @{Slider} component function druid_instance.new_slider(self, node, end_pos, callback) end --- Create @{StaticGrid} component ---@param self druid_instance ----@param parent node The gui node parent, where items will be placed ----@param element node Element prefab. Need to get it size ----@param in_row number How many nodes in row can be placed +---@param parent node|string The gui node (or node id) parent, where items will be placed +---@param element node|string Element prefab (or prefab id). Need to get it size +---@param in_row? number How many nodes in row can be placed ---@return druid.static_grid @{StaticGrid} component function druid_instance.new_static_grid(self, parent, element, in_row) end --- Create @{Swipe} component ---@param self druid_instance ----@param node node Gui node +---@param node node|string Gui node (or node id) ---@param on_swipe_callback function Swipe callback for on_swipe_end event ---@return druid.swipe @{Swipe} component function druid_instance.new_swipe(self, node, on_swipe_callback) end --- Create @{Text} component ---@param self druid_instance ----@param node node Gui text node ----@param value string Initial text. Default value is node text from GUI scene. ----@param no_adjust bool If true, text will be not auto-adjust size +---@param node node|string Gui text node (or node id) +---@param value? string Initial text. Default value is node text from GUI scene. +---@param no_adjust? bool If true, text will be not auto-adjust size ---@return druid.text @{Text} component function druid_instance.new_text(self, node, value, no_adjust) end --- Create @{Timer} component ---@param self druid_instance ----@param node node Gui text node +---@param node node|string Gui text node (or node id) ---@param seconds_from number Start timer value in seconds ----@param seconds_to number End timer value in seconds ----@param callback function Function on timer end +---@param seconds_to? number End timer value in seconds +---@param callback? function Function on timer end ---@return druid.timer @{Timer} component function druid_instance.new_timer(self, node, seconds_from, seconds_to, callback) end From 8a3cff17ab50e702dbc952ba04877e93a32e299f Mon Sep 17 00:00:00 2001 From: Mozok Evgen Date: Sat, 24 Aug 2024 20:59:55 +0300 Subject: [PATCH 2/7] Fix "node" type annotation to lowercase --- druid/annotations.lua | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/druid/annotations.lua b/druid/annotations.lua index 46c76b3..840d23c 100644 --- a/druid/annotations.lua +++ b/druid/annotations.lua @@ -171,7 +171,7 @@ function druid__blocker.set_enabled(self, state) end ---@field anim_node node Button animation node. ---@field click_zone node Additional button click area, defined by another GUI Node ---@field hover druid.hover The @{Hover}: Button Hover component ----@field node Node Button trigger node +---@field node node Button trigger node ---@field node_id hash The GUI node id from button node ---@field on_click druid.event The @{DruidEvent}: Event on successful release action over button. ---@field on_click_outside druid.event The @{DruidEvent}: Event calls if click event was outside of button. @@ -191,10 +191,10 @@ function druid__button.get_key_trigger(self) end --- The @{Button} constructor ---@param self druid.button @{Button} ----@param node string|Node Node name or GUI Node itself +---@param node string|node Node name or GUI Node itself ---@param callback function On click button callback ---@param custom_args any Button events custom arguments ----@param anim_node string|Node Node to animate instead of trigger node. +---@param anim_node string|node Node to animate instead of trigger node. function druid__button.init(self, node, callback, custom_args, anim_node) end --- Get button enabled state. @@ -331,7 +331,7 @@ function druid__data_list.get_created_components(self) end --- Return all currenly created nodes in DataList ---@param self druid.data_list @{DataList} ----@return Node[] List of created nodes +---@return node[] List of created nodes function druid__data_list.get_created_nodes(self) end --- Return current data from DataList component @@ -757,7 +757,7 @@ local druid__layout = {} --- Set node for layout node to fit inside it. --- Pass nil to reset ---@param self druid.layout @{Layout} ----@param node Node +---@param node node ---@return druid.layout @{Layout} function druid__layout.fit_into_node(self, node) end @@ -1149,7 +1149,7 @@ function druid__slider.set(self, value, is_silent) end --- Set input zone for slider. --- User can touch any place of node, pin instantly will move at this position and node drag will start. This function require the Defold version 1.3.0+ ---@param self druid.slider @{Slider} ----@param input_node Node +---@param input_node node ---@return druid.slider @{Slider} function druid__slider.set_input_node(self, input_node) end @@ -1232,7 +1232,7 @@ function druid__static_grid.get_size(self) end --- The @{StaticGrid} constructor ---@param self druid.static_grid @{StaticGrid} ----@param parent string|Node The GUI Node container, where grid's items will be placed +---@param parent string|node The GUI Node container, where grid's items will be placed ---@param element node Element prefab. Need to get it size ---@param in_row number How many nodes in row can be placed function druid__static_grid.init(self, parent, element, in_row) end @@ -1243,7 +1243,7 @@ function druid__static_grid.init(self, parent, element, in_row) end ---@param index number The grid node index to remove ---@param shift_policy number How shift nodes, if required. See const.SHIFT ---@param is_instant boolean If true, update node positions instantly ----@return Node The deleted gui node from grid +---@return node The deleted gui node from grid function druid__static_grid.remove(self, index, shift_policy, is_instant) end --- Set grid anchor. @@ -1737,7 +1737,7 @@ function helper.get_scene_scale(node, include_passed_node_scale) end function helper.get_screen_aspect_koef() end --- Get text metric from GUI node. ----@param text_node Node +---@param text_node node ---@return GUITextMetrics function helper.get_text_metrics_from_node(text_node) end @@ -1817,7 +1817,7 @@ function helper.table_to_string(t) end ---@field lines table ---@class druid.rich_text.word ----@field node Node +---@field node node ---@field relative_scale number ---@field color vector4 ---@field position vector3 @@ -1843,7 +1843,7 @@ function helper.table_to_string(t) end ---@field height number ---@class druid.rich_text.settings ----@field parent Node +---@field parent node ---@field size number ---@field fonts table ---@field color vector4 @@ -1853,8 +1853,8 @@ function helper.table_to_string(t) end ---@field image_pixel_grid_snap boolean ---@field combine_words boolean ---@field default_animation string ----@field node_prefab Node ----@field text_prefab Node +---@field node_prefab node +---@field text_prefab node ---@class GUITextMetrics ---@field width number From c4a4221841806d02ac2e46d1458341f29d2798d7 Mon Sep 17 00:00:00 2001 From: Mozok Evgen Date: Sat, 24 Aug 2024 21:12:26 +0300 Subject: [PATCH 3/7] Fix Grid methods annotations --- druid/annotations.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/druid/annotations.lua b/druid/annotations.lua index 840d23c..dc4758b 100644 --- a/druid/annotations.lua +++ b/druid/annotations.lua @@ -448,9 +448,9 @@ function druid__dynamic_grid._get_side_vector(self, side, is_forward) end --- Add new node to the grid ---@param self druid.dynamic_grid @{DynamicGrid} ---@param node node Gui node ----@param index number The node position. By default add as last node ----@param shift_policy number How shift nodes, if required. See const.SHIFT ----@param is_instant boolean If true, update node positions instantly +---@param index? number The node position. By default add as last node +---@param shift_policy? number How shift nodes, if required. See const.SHIFT +---@param is_instant? boolean If true, update node positions instantly function druid__dynamic_grid.add(self, node, index, shift_policy, is_instant) end --- Clear grid nodes array. @@ -484,7 +484,7 @@ function druid__dynamic_grid.get_offset(self) end ---@param self druid.dynamic_grid @{DynamicGrid} ---@param index number The grid element index ---@param node node The node to be placed ----@param origin_index number Index of nearby node +---@param origin_index? number Index of nearby node ---@return vector3 Node position function druid__dynamic_grid.get_pos(self, index, node, origin_index) end @@ -503,8 +503,8 @@ function druid__dynamic_grid.init(self, parent) end --- Note that gui node will be not deleted ---@param self druid.dynamic_grid @{DynamicGrid} ---@param index number The grid node index to remove ----@param shift_policy number How shift nodes, if required. See const.SHIFT ----@param is_instant boolean If true, update node positions instantly +---@param shift_policy? number How shift nodes, if required. See const.SHIFT +---@param is_instant? boolean If true, update node positions instantly ---@return node The deleted gui node from grid function druid__dynamic_grid.remove(self, index, shift_policy, is_instant) end @@ -1181,9 +1181,9 @@ local druid__static_grid = {} --- Add new item to the grid ---@param self druid.static_grid @{StaticGrid} ---@param item node Gui node ----@param index number The item position. By default add as last item ----@param shift_policy number How shift nodes, if required. See const.SHIFT ----@param is_instant boolean If true, update node positions instantly +---@param index? number The item position. By default add as last item +---@param shift_policy? number How shift nodes, if required. See const.SHIFT +---@param is_instant? boolean If true, update node positions instantly function druid__static_grid.add(self, item, index, shift_policy, is_instant) end --- Clear grid nodes array. @@ -1234,15 +1234,15 @@ function druid__static_grid.get_size(self) end ---@param self druid.static_grid @{StaticGrid} ---@param parent string|node The GUI Node container, where grid's items will be placed ---@param element node Element prefab. Need to get it size ----@param in_row number How many nodes in row can be placed +---@param in_row? number How many nodes in row can be placed function druid__static_grid.init(self, parent, element, in_row) end --- Remove the item from the grid. --- Note that gui node will be not deleted ---@param self druid.static_grid @{StaticGrid} ---@param index number The grid node index to remove ----@param shift_policy number How shift nodes, if required. See const.SHIFT ----@param is_instant boolean If true, update node positions instantly +---@param shift_policy? number How shift nodes, if required. See const.SHIFT +---@param is_instant? boolean If true, update node positions instantly ---@return node The deleted gui node from grid function druid__static_grid.remove(self, index, shift_policy, is_instant) end From 32aa7603861cbf1c4e062042bf2c71691435f1a8 Mon Sep 17 00:00:00 2001 From: Mozok Evgen Date: Sat, 24 Aug 2024 21:15:55 +0300 Subject: [PATCH 4/7] Fix "any" type annotation to lowercase --- druid/annotations.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/druid/annotations.lua b/druid/annotations.lua index dc4758b..e2b93f3 100644 --- a/druid/annotations.lua +++ b/druid/annotations.lua @@ -536,18 +536,18 @@ function druid__event.is_exist(self) end --- Subscribe callback on event ---@param self druid.event @{DruidEvent} ---@param callback function Callback itself ----@param context Any Additional context as first param to callback call, usually it's self +---@param context any Additional context as first param to callback call, usually it's self function druid__event.subscribe(self, callback, context) end --- Trigger the event and call all subscribed callbacks ---@param self druid.event @{DruidEvent} ----@param ... Any All event params +---@param ... any All event params function druid__event.trigger(self, ...) end --- Unsubscribe callback on event ---@param self druid.event @{DruidEvent} ---@param callback function Callback itself ----@param context Any Additional context as first param to callback call +---@param context any Additional context as first param to callback call function druid__event.unsubscribe(self, callback, context) end From 2cef65ed4081e3ba13e300091a4d020ba60d7c4e Mon Sep 17 00:00:00 2001 From: Mozok Evgen Date: Sat, 24 Aug 2024 21:22:34 +0300 Subject: [PATCH 5/7] Fix scroll annotations --- druid/annotations.lua | 10 +++++----- druid/base/scroll.lua | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/druid/annotations.lua b/druid/annotations.lua index e2b93f3..8ff350f 100644 --- a/druid/annotations.lua +++ b/druid/annotations.lua @@ -1042,25 +1042,25 @@ function druid__scroll.is_node_in_view(self, node) end --- Start scroll to target point. ---@param self druid.scroll @{Scroll} ---@param point vector3 Target point ----@param is_instant bool Instant scroll flag +---@param is_instant? bool Instant scroll flag function druid__scroll.scroll_to(self, point, is_instant) end --- Scroll to item in scroll by point index. ---@param self druid.scroll @{Scroll} ---@param index number Point index ----@param skip_cb bool If true, skip the point callback +---@param skip_cb? bool If true, skip the point callback function druid__scroll.scroll_to_index(self, index, skip_cb) end --- Start scroll to target scroll percent ---@param self druid.scroll @{Scroll} ---@param percent vector3 target percent ----@param is_instant bool instant scroll flag +---@param is_instant? bool instant scroll flag function druid__scroll.scroll_to_percent(self, percent, is_instant) end --- Strict drag scroll area. --- Useful for restrict events outside stencil node ---@param self druid.drag ----@param node node Gui node +---@param node node|string Gui node (or node id) function druid__scroll.set_click_zone(self, node) end --- Set extra size for scroll stretching. @@ -1094,7 +1094,7 @@ function druid__scroll.set_points(self, points) end --- It will change content gui node size ---@param self druid.scroll @{Scroll} ---@param size vector3 The new size for content node ----@param offset vector3 Offset value to set, where content is starts +---@param offset? vector3 Offset value to set, where content is starts ---@return druid.scroll Current scroll instance function druid__scroll.set_size(self, size, offset) end diff --git a/druid/base/scroll.lua b/druid/base/scroll.lua index a7b510a..1b42953 100755 --- a/druid/base/scroll.lua +++ b/druid/base/scroll.lua @@ -325,7 +325,7 @@ end -- It will change content gui node size -- @tparam Scroll self @{Scroll} -- @tparam vector3 size The new size for content node --- @tparam vector3 offset Offset value to set, where content is starts +-- @tparam[opt] vector3 offset Offset value to set, where content is starts -- @treturn druid.scroll Current scroll instance function Scroll.set_size(self, size, offset) if offset then From f54347ef6c71be65f0ffa23524cb88bad2395613 Mon Sep 17 00:00:00 2001 From: Mozok Evgen Date: Sat, 24 Aug 2024 21:27:59 +0300 Subject: [PATCH 6/7] Fix Slider annotations --- druid/annotations.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/druid/annotations.lua b/druid/annotations.lua index 8ff350f..7d4737e 100644 --- a/druid/annotations.lua +++ b/druid/annotations.lua @@ -1137,19 +1137,19 @@ local druid__slider = {} ---@param self druid.slider @{Slider} ---@param node node Gui pin node ---@param end_pos vector3 The end position of slider ----@param callback function On slider change callback +---@param callback? function On slider change callback function druid__slider.init(self, node, end_pos, callback) end --- Set value for slider ---@param self druid.slider @{Slider} ---@param value number Value from 0 to 1 ----@param is_silent bool Don't trigger event if true +---@param is_silent? bool Don't trigger event if true function druid__slider.set(self, value, is_silent) end --- Set input zone for slider. --- User can touch any place of node, pin instantly will move at this position and node drag will start. This function require the Defold version 1.3.0+ ---@param self druid.slider @{Slider} ----@param input_node node +---@param input_node node|string ---@return druid.slider @{Slider} function druid__slider.set_input_node(self, input_node) end From 15a24504378aee1064549e08ea880e9ed0856558 Mon Sep 17 00:00:00 2001 From: Mozok Evgen Date: Sat, 24 Aug 2024 21:35:48 +0300 Subject: [PATCH 7/7] Fix LangText annotations --- druid/annotations.lua | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/druid/annotations.lua b/druid/annotations.lua index 7d4737e..330f748 100644 --- a/druid/annotations.lua +++ b/druid/annotations.lua @@ -711,21 +711,21 @@ local druid__lang_text = {} --- Format string with new text params on localized text ---@param self druid.lang_text @{LangText} ----@param a string Optional param to string.format ----@param b string Optional param to string.format ----@param c string Optional param to string.format ----@param d string Optional param to string.format ----@param e string Optional param to string.format ----@param f string Optional param to string.format ----@param g string Optional param to string.format +---@param a? string Optional param to string.format +---@param b? string Optional param to string.format +---@param c? string Optional param to string.format +---@param d? string Optional param to string.format +---@param e? string Optional param to string.format +---@param f? string Optional param to string.format +---@param g? string Optional param to string.format ---@return druid.lang_text Current instance function druid__lang_text.format(self, a, b, c, d, e, f, g) end --- The @{LangText} constructor ---@param self druid.lang_text @{LangText} ---@param node string|node Node name or GUI Text Node itself ----@param locale_id string Default locale id or text from node as default ----@param adjust_type string Adjust type for text. By default is DOWNSCALE. Look const.TEXT_ADJUST for reference +---@param locale_id? string Default locale id or text from node as default +---@param adjust_type? string Adjust type for text. By default is DOWNSCALE. Look const.TEXT_ADJUST for reference function druid__lang_text.init(self, node, locale_id, adjust_type) end --- Setup raw text to lang_text component @@ -737,13 +737,13 @@ function druid__lang_text.set_to(self, text) end --- Translate the text by locale_id ---@param self druid.lang_text @{LangText} ---@param locale_id string Locale id ----@param a string Optional param to string.format ----@param b string Optional param to string.format ----@param c string Optional param to string.format ----@param d string Optional param to string.format ----@param e string Optional param to string.format ----@param f string Optional param to string.format ----@param g string Optional param to string.format +---@param a? string Optional param to string.format +---@param b? string Optional param to string.format +---@param c? string Optional param to string.format +---@param d? string Optional param to string.format +---@param e? string Optional param to string.format +---@param f? string Optional param to string.format +---@param g? string Optional param to string.format ---@return druid.lang_text Current instance function druid__lang_text.translate(self, locale_id, a, b, c, d, e, f, g) end