Skip to content

Commit

Permalink
exterior界面增加语言比对功能(按住ctrl再切换语言)
Browse files Browse the repository at this point in the history
框架跟进
  • Loading branch information
MrZ626 committed Oct 31, 2024
1 parent 47adedd commit 0623890
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Zenitha
Submodule Zenitha updated 1 files
+38 −2 tableExtend.lua
22 changes: 21 additions & 1 deletion assets/scene/lang_out.lua
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,27 @@ local function _setLang(lid)
duration=1.26,
}
if SETTINGS.system.locale~=lid then
SETTINGS.system.locale=lid
if isCtrlPressed() then
local oldText=TABLE.copyAll(Text)
local oldLocale=SETTINGS.system.locale:upper()
SETTINGS.system.locale=lid
local newText=TABLE.copyAll(Text)
local newLocale=SETTINGS.system.locale:upper()
TABLE.flatten(oldText,6.26)
TABLE.flatten(newText,6.26)
for entry in next,newText do
if not oldText[entry] then
MSG.new('warn',("[$1] Missing '$2'"):repD(oldLocale,entry),26)
end
end
for entry in next,oldText do
if not newText[entry] then
MSG.new('warn',("[$1] Missing '$2'"):repD(newLocale,entry),26)
end
end
else
SETTINGS.system.locale=lid
end
changed=true
WIDGET._reset()
end
Expand Down

0 comments on commit 0623890

Please sign in to comment.