From 02b120d1bd6dc7e81a6c81a44621de45a6c9b594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abd=C3=B3=20Roig-Maranges?= Date: Sun, 19 Feb 2017 15:00:18 +0100 Subject: [PATCH] hugolib: Discard current language based on .Lang() Otherwise we fail to skip the current language in translations for paginated pages. Fixes #2972 --- hugolib/page.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hugolib/page.go b/hugolib/page.go index 6af6a2da5..446e17b6a 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) } }