hugolib: Discard current language based on .Lang() - hugo - [fork] hugo port for 9front
HTML git clone git@git.drkhsh.at/hugo.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit 02b120d1bd6dc7e81a6c81a44621de45a6c9b594
DIR parent 6809ea1e7c5cb540d6d81ce0a47f3f0f5d761e8e
HTML 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:
M hugolib/page.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
DIR 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)
}
}