mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-16 20:53:59 +02:00
hugolib: Fix IsTranslated for "old" node types
The new logic for creating Page objects from old node types didn't include itself in the translation logic, so `IsTranslated` returned falsely false for sites with only two languages. The `AllTranslations` method also returned too few pages in that case. This commit fixes that. Fixes #2812
This commit is contained in:
@@ -180,7 +180,7 @@ func (h *HugoSites) assignMissingTranslations() error {
|
||||
// Assign translations
|
||||
for _, t1 := range nodes {
|
||||
for _, t2 := range nodes {
|
||||
if t2.isNewTranslation(t1) {
|
||||
if t1.isNewTranslation(t2) {
|
||||
t1.translations = append(t1.translations, t2)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user