mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 08:18:30 +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:
1 parent
6809ea1e7c
commit
02b120d1bd
1 file changed
+1
-1
+1
-1
@@ -860,7 +860,7 @@ func (p *Page) IsTranslated() bool {
|
|||||||
func (p *Page) Translations() Pages {
|
func (p *Page) Translations() Pages {
|
||||||
translations := make(Pages, 0)
|
translations := make(Pages, 0)
|
||||||
for _, t := range p.translations {
|
for _, t := range p.translations {
|
||||||
if t != p {
|
if t.Lang() != p.Lang() {
|
||||||
translations = append(translations, t)
|
translations = append(translations, t)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user