mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-29 02:57:57 +00:00
hugolib: Discard current language based on .Lang()
Otherwise we fail to skip the current language in translations for paginated pages. Fixes #2972
This commit is contained in:
parent
6809ea1e7c
commit
02b120d1bd
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue