hugolib: Fix IsTranslated for "old" node types
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 23 Dec 2016 08:52:05 +0000 (09:52 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 27 Dec 2016 11:01:54 +0000 (12:01 +0100)
commit88b5bbd5329a87046979e222a9ccf74eda59df3c
tree20cb12d2b79dc47142ec7b79a93523147348e287
parentd1b89f5c7cb3d1031d74014b4b2150a434bf557e
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
hugolib/hugo_sites.go
hugolib/hugo_sites_build_test.go
hugolib/page.go