Renamed interests

This commit is contained in:
Insality 2020-04-18 01:40:38 +03:00
parent 49e915d78b
commit b9b67c55d6
2 changed files with 10 additions and 6 deletions

View File

@ -15,7 +15,7 @@ local const = require("druid.const")
local settings = require("druid.system.settings")
local component = require("druid.component")
local M = component.create("lang_text", { const.ON_CHANGE_LANGUAGE })
local M = component.create("lang_text", { const.ON_LANGUAGE_CHANGE })
--- Component init function
@ -35,7 +35,7 @@ function M.init(self, node, locale_id, no_adjust)
end
function M.on_change_language(self)
function M.on_language_change(self)
if self.last_locale then
M.translate(self)
end

View File

@ -27,8 +27,10 @@ M.ON_MESSAGE = hash("on_message")
M.ON_UPDATE = hash("on_update")
M.ON_INPUT_HIGH = hash("on_input_high")
M.ON_INPUT = hash("on_input")
M.ON_CHANGE_LANGUAGE = hash("on_change_language")
M.ON_LAYOUT_CHANGED = hash("on_layout_changed")
M.ON_LANGUAGE_CHANGE = hash("on_language_change")
M.ON_LAYOUT_CHANGE = hash("on_layout_change")
M.ON_FOCUS_LOST = hash("on_focus_lost")
M.ON_FOCUS_GAINED = hash("on_focus_gained")
M.PIVOTS = {
@ -45,8 +47,10 @@ M.PIVOTS = {
M.SPECIFIC_UI_MESSAGES = {
[M.ON_CHANGE_LANGUAGE] = "on_change_language",
[M.ON_LAYOUT_CHANGED] = "on_layout_changed"
[M.ON_LANGUAGE_CHANGE] = "on_language_change",
[M.ON_LAYOUT_CHANGE] = "on_layout_change",
[M.ON_FOCUS_LOST] = "on_focus_lost",
[M.ON_FOCUS_GAINED] = "on_focus_gained",
}