Repository: gohugoio/hugo (language: go)

Issue:
Don't use the same value in .Data.Term.Title as in .Title
In 0.123.0 we changed the `Title` for kind `term` to be in line with others, but that means that it throws away some value having `.Data.Term` return the same.

I saw a discussion about using the `i18n` func for translation taxonomy terms, and I don't see anything wrong or hard doing something like this:

```handlebars
{{ $i18nKey := printf "%s.%s.title" .Data.Plural .Data.Term }}
{{ $title := i18n $i18nKey | default .Title }}
```


Discussion / hints:
Just for the record, the discussion was about translating the taxonomy name itself, e.g `tags` or `categories`.

Putting term titles in an i18n file is a nice feature but I am not sure if many users would use this as it is easier to achieve this by overwriting the according `_index.md` file.


Fix patch:
diff --git a/hugolib/page__data.go b/hugolib/page__data.go
index 9712f1b4a25..256d8a97f0a 100644
--- a/hugolib/page__data.go
+++ b/hugolib/page__data.go
@@ -44,7 +44,7 @@ func (p *pageData) Data() any {
 			p.data[name.singular] = term
 			p.data["Singular"] = name.singular
 			p.data["Plural"] = name.plural
-			p.data["Term"] = p.Title()
+			p.data["Term"] = p.m.term
 		case kinds.KindTaxonomy:
 			viewCfg := p.s.pageMap.cfg.getTaxonomyConfig(p.Path())
 			p.data["Singular"] = viewCfg.singular


Test patch:
diff --git a/hugolib/content_map_test.go b/hugolib/content_map_test.go
index c666e2a45f1..e043d936385 100644
--- a/hugolib/content_map_test.go
+++ b/hugolib/content_map_test.go
@@ -160,7 +160,7 @@ Draft5: {{ if (.Site.GetPage "blog/draftsection/sub/page") }}FOUND{{ end }}|
         Sections: /blog/|/docs/|/overlap/|/overlap2/|:END
 		Categories: /categories/funny/; Funny; 12|/categories/sad/; Sad; 2|:END
         Category Terms:  taxonomy: /categories/funny/; Funny; 12|/categories/sad/; Sad; 2|:END
-		Category Funny:  term; Funny: /blog/subsection/page4/;|/blog/page3/;|/blog/subsection/;|/blog/page2/;|/blog/page1/;|/blog/subsection/page5/;|/docs/page6/;|/blog/bundle/;|/blog/draftsection/page/;|/blog/draftsection/sub/;|/blog/draftsection/sub/page/;|/overlap2/;|:END
+		Category Funny:  term; funny: /blog/subsection/page4/;|/blog/page3/;|/blog/subsection/;|/blog/page2/;|/blog/page1/;|/blog/subsection/page5/;|/docs/page6/;|/blog/bundle/;|/blog/draftsection/page/;|/blog/draftsection/sub/;|/blog/draftsection/sub/page/;|/overlap2/;|:END
  		Pag Num Pages: 9
         Pag Blog Num Pages: 4
         Blog Num RegularPages: 4
diff --git a/hugolib/taxonomy_test.go b/hugolib/taxonomy_test.go
index ffcb8fb15c7..17e1b6cd406 100644
--- a/hugolib/taxonomy_test.go
+++ b/hugolib/taxonomy_test.go
@@ -815,3 +815,23 @@ Terms: {{ range site.Taxonomies.tags }}{{ .Page.Title }}: {{ .Count }}|{{ end }}
 
 	b.AssertFileContent("public/index.html", "Terms: A: 1|B: 1|C: 1|Hello World!: 1|$")
 }
+
+func TestTaxonomiesTermTitleAndTerm(t *testing.T) {
+	files := `
+-- hugo.toml --
+baseURL = "https://example.com"
+[taxonomies]
+tag = "tags"
+-- content/_index.md --
+---
+title: "Home"
+tags: ["hellO world"]
+---
+-- layouts/_default/term.html --
+{{ .Title }}|{{ .Kind }}|{{ .Data.Singular }}|{{ .Data.Plural }}|{{ .Page.Data.Term }}|
+`
+
+	b := Test(t, files)
+
+	b.AssertFileContent("public/tags/hello-world/index.html", "HellO World|term|tag|tags|hellO world|")
+}