diff options
-rw-r--r-- | locale/en-us/script.lua | 2 | ||||
-rw-r--r-- | locale/pt-br/script.lua | 2 | ||||
-rw-r--r-- | locale/zh-cn/script.lua | 2 | ||||
-rw-r--r-- | locale/zh-tw/script.lua | 2 | ||||
-rw-r--r-- | script/provider/build-meta.lua | 15 | ||||
-rw-r--r-- | script/provider/provider.lua | 2 |
6 files changed, 20 insertions, 5 deletions
diff --git a/locale/en-us/script.lua b/locale/en-us/script.lua index fdaa1428..6f1a2bc6 100644 --- a/locale/en-us/script.lua +++ b/locale/en-us/script.lua @@ -476,6 +476,8 @@ WINDOW_PROCESSING_SEMANTIC_RANGE = 'Processing incremental semantic tokens...' WINDOW_PROCESSING_HINT = 'Processing inline hint...' +WINDOW_PROCESSING_BUILD_META = +'Processing build meta...' WINDOW_INCREASE_UPPER_LIMIT = 'Increase upper limit' WINDOW_CLOSE = diff --git a/locale/pt-br/script.lua b/locale/pt-br/script.lua index f7ac6d3d..b9cf0f7d 100644 --- a/locale/pt-br/script.lua +++ b/locale/pt-br/script.lua @@ -476,6 +476,8 @@ WINDOW_PROCESSING_SEMANTIC_RANGE = 'Processando tokens semânticas incrementais...' WINDOW_PROCESSING_HINT = 'Processando dicas de lina...' +WINDOW_PROCESSING_BUILD_META = -- TODO: need translate! +'Processing build meta...' WINDOW_INCREASE_UPPER_LIMIT = 'Aumente o limite superior' WINDOW_CLOSE = diff --git a/locale/zh-cn/script.lua b/locale/zh-cn/script.lua index f50d4b7b..ed7ff951 100644 --- a/locale/zh-cn/script.lua +++ b/locale/zh-cn/script.lua @@ -476,6 +476,8 @@ WINDOW_PROCESSING_SEMANTIC_RANGE = '正在处理差量语义着色...' WINDOW_PROCESSING_HINT = '正在处理内联提示...' +WINDOW_PROCESSING_BUILD_META = +'正在处理编译器元数据...' WINDOW_INCREASE_UPPER_LIMIT = '增加上限' WINDOW_CLOSE = diff --git a/locale/zh-tw/script.lua b/locale/zh-tw/script.lua index 80733139..885d9dfc 100644 --- a/locale/zh-tw/script.lua +++ b/locale/zh-tw/script.lua @@ -476,6 +476,8 @@ WINDOW_PROCESSING_SEMANTIC_RANGE = '正在處理差量語義著色...' WINDOW_PROCESSING_HINT = '正在處理內嵌提示...' +WINDOW_PROCESSING_BUILD_META = -- TODO: need translate! +'Processing build meta...' WINDOW_INCREASE_UPPER_LIMIT = '增加上限' WINDOW_CLOSE = diff --git a/script/provider/build-meta.lua b/script/provider/build-meta.lua index a1900e5e..21390411 100644 --- a/script/provider/build-meta.lua +++ b/script/provider/build-meta.lua @@ -1,7 +1,9 @@ -local fs = require 'bee.filesystem' -local config = require 'config' -local util = require 'utility' -local await = require 'await' +local fs = require 'bee.filesystem' +local config = require 'config' +local util = require 'utility' +local await = require 'await' +local progress = require 'progress' +local lang = require 'language' local m = {} @@ -136,8 +138,11 @@ function m.build(name, api) files[api.root][#files[api.root]+1] = buildRootText(api) - for _, class in ipairs(api.classes) do + local proc <close> = progress.create(nil, lang.script.WINDOW_PROCESSING_BUILD_META, 0.5) + for i, class in ipairs(api.classes) do local space = class.namespace ~= '' and class.namespace or api.root + proc:setMessage(space) + proc:setPercentage(i / #api.classes * 100) local text = buildText(api.root, class) files[space][#files[space]+1] = text await.delay() diff --git a/script/provider/provider.lua b/script/provider/provider.lua index 26c0a777..a5255f44 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -1342,6 +1342,8 @@ m.register '$/api/report' { ---@async function (params) local buildMeta = require 'provider.build-meta' + await.close 'api/report' + await.setID 'api/report' local dir = buildMeta.build('default', params) client.setConfig { { |