From: Abdó Roig-Maranges Date: Sun, 19 Feb 2017 14:00:18 +0000 (+0100) Subject: hugolib: Discard current language based on .Lang() X-Git-Tag: v0.19~42 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=02b120d1;p=brevno-suite%2Fhugo hugolib: Discard current language based on .Lang() Otherwise we fail to skip the current language in translations for paginated pages. Fixes #2972 --- diff --git a/hugolib/page.go b/hugolib/page.go index 6af6a2da..446e17b6 100644 --- a/hugolib/page.go +++ b/hugolib/page.go @@ -860,7 +860,7 @@ func (p *Page) IsTranslated() bool { func (p *Page) Translations() Pages { translations := make(Pages, 0) for _, t := range p.translations { - if t != p { + if t.Lang() != p.Lang() { translations = append(translations, t) } }