hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 02b120d1bd6dc7e81a6c81a44621de45a6c9b594
parent 6809ea1e7c5cb540d6d81ce0a47f3f0f5d761e8e
Author: Abdó Roig-Maranges <abdo.roig@gmail.com>
Date:   Sun, 19 Feb 2017 15:00:18 +0100

hugolib: Discard current language based on .Lang()

Otherwise we fail to skip the current language in translations
for paginated pages.

Fixes #2972
Diffstat:
Mhugolib/page.go | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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)
 		}
 	}