mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
parent
eb00c621e0
commit
998034faad
2 changed files with 6 additions and 2 deletions
|
@ -14,6 +14,8 @@
|
|||
package hugolib
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/nicksnyder/go-i18n/i18n/bundle"
|
||||
"github.com/spf13/hugo/source"
|
||||
"github.com/spf13/hugo/tpl"
|
||||
|
@ -29,7 +31,7 @@ func loadI18n(sources []source.Input) error {
|
|||
for _, r := range currentSource.Files() {
|
||||
err := i18nBundle.ParseTranslationFileBytes(r.LogicalName(), r.Bytes())
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("Failed to load translations in file %q: %s", r.LogicalName(), err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -512,7 +512,9 @@ func (s *Site) reBuild(events []fsnotify.Event) (whatChanged, error) {
|
|||
}
|
||||
|
||||
if len(i18nChanged) > 0 {
|
||||
s.readI18nSources()
|
||||
if err := s.readI18nSources(); err != nil {
|
||||
jww.ERROR.Println(err)
|
||||
}
|
||||
}
|
||||
|
||||
// If a content file changes, we need to reload only it and re-render the entire site.
|
||||
|
|
Loading…
Reference in a new issue