mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
parent
639073e4fe
commit
f1491c900e
2 changed files with 25 additions and 1 deletions
|
@ -790,7 +790,9 @@ func (h *HugoSites) processPartial(ctx context.Context, l logg.LevelLogger, conf
|
||||||
case files.ComponentFolderI18n:
|
case files.ComponentFolderI18n:
|
||||||
logger.Println("i18n changed", pathInfo.Path())
|
logger.Println("i18n changed", pathInfo.Path())
|
||||||
i18nChanged = true
|
i18nChanged = true
|
||||||
changes = append(changes, pathInfo)
|
// It's hard to determine the exact change set of this,
|
||||||
|
// so be very coarse grained for now.
|
||||||
|
changes = append(changes, identity.GenghisKhan)
|
||||||
default:
|
default:
|
||||||
panic(fmt.Sprintf("unknown component: %q", pathInfo.Component()))
|
panic(fmt.Sprintf("unknown component: %q", pathInfo.Component()))
|
||||||
}
|
}
|
||||||
|
|
|
@ -1149,6 +1149,28 @@ Single.
|
||||||
b.AssertFileContent("public/index.html", "Home.", "<style>body {\n\tbackground: blue;\n}</style>")
|
b.AssertFileContent("public/index.html", "Home.", "<style>body {\n\tbackground: blue;\n}</style>")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestRebuildI18n(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
|
files := `
|
||||||
|
-- hugo.toml --
|
||||||
|
baseURL = "https://example.com"
|
||||||
|
disableLiveReload = true
|
||||||
|
-- i18n/en.toml --
|
||||||
|
hello = "Hello"
|
||||||
|
-- layouts/index.html --
|
||||||
|
Hello: {{ i18n "hello" }}
|
||||||
|
`
|
||||||
|
|
||||||
|
b := TestRunning(t, files)
|
||||||
|
|
||||||
|
b.AssertFileContent("public/index.html", "Hello: Hello")
|
||||||
|
|
||||||
|
b.EditFileReplaceAll("i18n/en.toml", "Hello", "Hugo").Build()
|
||||||
|
|
||||||
|
b.AssertFileContent("public/index.html", "Hello: Hugo")
|
||||||
|
}
|
||||||
|
|
||||||
func TestRebuildVariationsAssetsSassImport(t *testing.T) {
|
func TestRebuildVariationsAssetsSassImport(t *testing.T) {
|
||||||
if !htesting.IsCI() {
|
if !htesting.IsCI() {
|
||||||
t.Skip("skip CI only")
|
t.Skip("skip CI only")
|
||||||
|
|
Loading…
Reference in a new issue