mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
@@ -195,12 +195,19 @@ func (h *HugoSites) assignMissingTranslations() error {
|
||||
// Assign translations
|
||||
for _, t1 := range nodes {
|
||||
for _, t2 := range nodes {
|
||||
if t2.isTranslation(t1) {
|
||||
if t2.isNewTranslation(t1) {
|
||||
t1.translations = append(t1.translations, t2)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now we can sort the translations.
|
||||
for _, p := range allPages {
|
||||
if len(p.translations) > 0 {
|
||||
pageBy(languagePageSort).Sort(p.translations)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user