mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-03 04:10:25 +08:00
修复多语言消息无法读取参数的问题
This commit is contained in:
@@ -90,7 +90,12 @@ func (this *Manager) GetMessage(langCode string, messageCode MessageCode, args .
|
||||
if lang.code != this.defaultLangCode {
|
||||
var defaultLang = this.langMap[this.defaultLangCode]
|
||||
if defaultLang != nil {
|
||||
return defaultLang.Get(messageCode)
|
||||
message = defaultLang.Get(messageCode)
|
||||
if len(args) == 0 {
|
||||
return message
|
||||
}
|
||||
|
||||
return fmt.Sprintf(message, args...)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user