Repository: gohugoio/hugo (language: go)

Issue:
server: Browser does not reload when i18n file is changed
Although this occurred sporadically with prior versions, the behavior is consistently repeatable with hugo v0.123.0-DEV-21d9057d.

For example, the browser does not reload when changing `i18n/en.toml` from this:

```toml
foo = 'bar'
```

to this:

```toml
foo = 'baz'
```



Discussion / hints:
Actually, I get this when editing page translations (`index.xx.html` files). Hugo makes rebuild, browser reloads, but the translated content stays the same.
@TiGR please don't pad "I'm having a slightly related issue" to these issues. If you have found another but, please open up another issue describing it. a 

Fix patch:
diff --git a/hugolib/hugo_sites_build.go b/hugolib/hugo_sites_build.go
index 17af2d8d8dc..17a3f00563a 100644
--- a/hugolib/hugo_sites_build.go
+++ b/hugolib/hugo_sites_build.go
@@ -790,7 +790,9 @@ func (h *HugoSites) processPartial(ctx context.Context, l logg.LevelLogger, conf
 		case files.ComponentFolderI18n:
 			logger.Println("i18n changed", pathInfo.Path())
 			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:
 			panic(fmt.Sprintf("unknown component: %q", pathInfo.Component()))
 		}


Test patch:
diff --git a/hugolib/rebuild_test.go b/hugolib/rebuild_test.go
index 9b15fc3e29e..06a6083f546 100644
--- a/hugolib/rebuild_test.go
+++ b/hugolib/rebuild_test.go
@@ -1149,6 +1149,28 @@ Single.
 	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) {
 	if !htesting.IsCI() {
 		t.Skip("skip CI only")