refactor: Add support for script messages in SUI i18n locale merging logic
This commit is contained in:
parent
11a66d0aed
commit
57b59d6d45
1 changed files with 4 additions and 0 deletions
|
|
@ -125,6 +125,10 @@ func (locale *Locale) MergeTranslations(translations []Translation, prefix ...st
|
|||
locale.Messages = map[string]string{}
|
||||
}
|
||||
|
||||
if locale.ScriptMessages == nil {
|
||||
locale.ScriptMessages = map[string]string{}
|
||||
}
|
||||
|
||||
var reg *regexp.Regexp = nil
|
||||
if len(prefix) > 0 && prefix[0] != "" {
|
||||
reg = regexp.MustCompile(fmt.Sprintf(`^%s_([0-9]+)$`, prefix[0]))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue