【本地化】服务器发送的错误消息未翻译修复

dev_chengFeng
gaoxin 2021-02-01 19:50:38 +08:00
parent 19d241f44e
commit f2ceeca55d
2 changed files with 3 additions and 3 deletions

View File

@ -225,9 +225,9 @@ function Network:ReceiveErrorInfo(buffer)
local errorCfg = ConfigManager.TryGetConfigData(ConfigName.ErrorCodeHint, msg.errCode)
if errorCfg then
if errorCfg.ShowType == 1 then --tips
PopupTipPanel.ShowTip(string.format(errorCfg.Desc, unpack(msg.errParams)))
PopupTipPanel.ShowTip(string.format(GetLanguageStrById(errorCfg.Desc), unpack(msg.errParams)))
elseif errorCfg.ShowType == 2 then --弹窗
local contexts = string.split(errorCfg.Desc, "#") --标题#内容
local contexts = string.split(GetLanguageStrById(errorCfg.Desc), "#") --标题#内容
MsgPanel.ShowOne(string.format(contexts[2], unpack(msg.errParams)), nil, nil, contexts[1])
else
PopupTipPanel.ShowTip(msg.errMsg)

View File

@ -44,7 +44,7 @@ function PopupTipPanel.ShowTip(str)
go.transform:SetParent(PopupTipPanel.transform)
go.transform.localScale = Vector3.one
go.transform.localPosition=Vector3.zero
Util.GetGameObject (go, "Text"):GetComponent("Text").text = str
Util.GetGameObject (go, "Text"):GetComponent("Text").text = GetLanguageStrById(str)
PlayUIAnim(go, function ()
go.transform:SetParent(PopupTipPanel.cache.transform)
itemListPrefab:Push(go)