engine/i18n with catalogs, plural forms and module catalogs; tools/i18n extract and check; the editor UI, menus, panels and notices in Russian with the author's terms; overflow test and tooltip wrapping; the English log.
20 lines
503 B
Go
20 lines
503 B
Go
package edit
|
|
|
|
import (
|
|
"aego/core/log"
|
|
"aego/engine/i18n"
|
|
"aego/engine/module"
|
|
)
|
|
|
|
// loadMessages adds the catalogs that modules register to the default bundle (D348).
|
|
func loadMessages(m *module.Manifest, lg *log.ChannelLogger) {
|
|
if m == nil {
|
|
return
|
|
}
|
|
for _, src := range m.Messages {
|
|
if err := i18n.Default().LoadOnce(src.Owner, src.FS, ".", "i18n."+src.Owner); err != nil && lg != nil {
|
|
lg.Warn("cannot read translations", log.F("owner", src.Owner), log.F("err", err.Error()))
|
|
}
|
|
}
|
|
}
|