"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "langs/i18n/translationProvider.go" between
hugo-0.80.0.tar.gz and hugo-0.81.0.tar.gz

About: Hugo is a static site generator that takes a source directory of Markdown files and templates and uses these as input to create a complete website (written in Go).

translationProvider.go  (hugo-0.80.0):translationProvider.go  (hugo-0.81.0)
skipping to change at line 52 skipping to change at line 52
return &TranslationProvider{} return &TranslationProvider{}
} }
// Update updates the i18n func in the provided Deps. // Update updates the i18n func in the provided Deps.
func (tp *TranslationProvider) Update(d *deps.Deps) error { func (tp *TranslationProvider) Update(d *deps.Deps) error {
spec := source.NewSourceSpec(d.PathSpec, nil) spec := source.NewSourceSpec(d.PathSpec, nil)
bundle := i18n.NewBundle(language.English) bundle := i18n.NewBundle(language.English)
bundle.RegisterUnmarshalFunc("toml", toml.Unmarshal) bundle.RegisterUnmarshalFunc("toml", toml.Unmarshal)
bundle.RegisterUnmarshalFunc("yaml", yaml.Unmarshal) bundle.RegisterUnmarshalFunc("yaml", yaml.Unmarshal)
bundle.RegisterUnmarshalFunc("yml", yaml.Unmarshal)
bundle.RegisterUnmarshalFunc("json", json.Unmarshal) bundle.RegisterUnmarshalFunc("json", json.Unmarshal)
// The source dirs are ordered so the most important comes first. Since t his is a // The source dirs are ordered so the most important comes first. Since t his is a
// last key win situation, we have to reverse the iteration order. // last key win situation, we have to reverse the iteration order.
dirs := d.BaseFs.I18n.Dirs dirs := d.BaseFs.I18n.Dirs
for i := len(dirs) - 1; i >= 0; i-- { for i := len(dirs) - 1; i >= 0; i-- {
dir := dirs[i] dir := dirs[i]
src := spec.NewFilesystemFromFileMetaInfo(dir) src := spec.NewFilesystemFromFileMetaInfo(dir)
files, err := src.Files() files, err := src.Files()
if err != nil { if err != nil {
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)