Skip to content

Commit df8d04b

Browse files
committed
add tip
1 parent 227ad46 commit df8d04b

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

locale/en-us/script.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,13 @@ WINDOW_LUA_STATUS_CACHED_FILES =
457457
'Cached files: {ast}/{max}'
458458
WINDOW_LUA_STATUS_MEMORY_COUNT =
459459
'Memory usage: {mem:.f}M'
460+
WINDOW_LUA_STATUS_TIP =
461+
[[
462+
463+
This icon is a cat,
464+
Not a dog nor a fox!
465+
↓↓↓
466+
]]
460467
WINDOW_APPLY_SETTING =
461468
'Apply setting'
462469
WINDOW_CHECK_SEMANTIC =

locale/zh-cn/script.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,13 @@ WINDOW_LUA_STATUS_CACHED_FILES =
456456
'已缓存文件:{ast}/{max}'
457457
WINDOW_LUA_STATUS_MEMORY_COUNT =
458458
'内存占用:{mem:.f}M'
459+
WINDOW_LUA_STATUS_TIP =
460+
[[
461+
462+
这个图标是猫,
463+
不是狗也不是狐狸!
464+
↓↓↓
465+
]]
459466
WINDOW_APPLY_SETTING =
460467
'应用设置'
461468
WINDOW_CHECK_SEMANTIC =

script/service/service.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ function m.eventLoop()
197197
end
198198
end
199199

200+
local showStatusTip = math.random(100) == 1
201+
200202
function m.reportStatus()
201203
local info = {}
202204
if m.workingClock and time.monotonic() - m.workingClock > 100 then
@@ -218,6 +220,9 @@ function m.reportStatus()
218220
end
219221
tooltips[#tooltips+1] = lang.script('WINDOW_LUA_STATUS_CACHED_FILES', params)
220222
tooltips[#tooltips+1] = lang.script('WINDOW_LUA_STATUS_MEMORY_COUNT', params)
223+
if showStatusTip then
224+
tooltips[#tooltips+1] = lang.script('WINDOW_LUA_STATUS_TIP')
225+
end
221226

222227
info.tooltip = table.concat(tooltips, '\n')
223228
if util.equal(m.lastInfo, info) then

0 commit comments

Comments
 (0)