【本地化】服务器发送的错误消息未翻译修复
parent
19d241f44e
commit
f2ceeca55d
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue