fix: HTML sitemap headings follow each locale until an editor sets one

Settings > Sitemaps no longer prefills a content type's heading with its
label in the administrator's language, so a save that did not touch the
heading stores none and each locale's HTML sitemap keeps the label
translated into it. The field's comment says so.
This commit is contained in:
Jakub Zych
2026-11-04 23:08:38 +01:00
parent b37b2265ed
commit da32044d5b
5 changed files with 137 additions and 5 deletions

View File

@@ -211,7 +211,7 @@ The plugin also publishes `classes.Listing` as `contract.Rebuilder`. `RequestReb
The Settings page has one Sitemaps tile (icon `network`, category CMS, permission `golem15.sitemap.access_definitions`). It opens the singleton controller `golem15.sitemap.settings`:
- **Files:** Site address, Addresses per file and the files table: the index and every file with its address count and newest lastmod, the addresses left out by reason, and a note naming the public index address. Before the first build it says there are no files yet; after a save and until the rebuild ran, that it is rebuilding.
- **Content types:** per signpost content type, in registration order, a switch labelled with the type's label, the file name (`[a-z0-9-]`, unique, `images` and `news` reserved) and the HTML sitemap heading per locale. Stored in `golem15_sitemap_types`.
- **Content types:** per signpost content type, in registration order, a switch labelled with the type's label, the file name (`[a-z0-9-]`, unique, `images` and `news` reserved) and the HTML sitemap heading per locale. The heading loads empty until an editor sets one, so a save that does not touch it stores none and each language's HTML sitemap shows the type's label translated into that language. Stored in `golem15_sitemap_types`.
- **Additional addresses:** a repeater of paths (or absolute URLs) with an optional lastmod as `YYYY-MM-DD`. They go into the `pages` group.
- **Images and News:** the image sitemap switch, the News sitemap switch, and while it is on the publication name, the News sources (a tag list of `type:` and `category:` values) and the table of the values the site has.
- **IndexNow:** the switch, the status partial and, while it is on, "Generate a new key on save".