hugo-theme-bootstrap: missing i18n translation and correct formatting archive pages year listing

Prerequisites

Describe the issue

Similar to discussion https://github.com/razonyang/hugo-theme-bootstrap/discussions/998, there is a problem with the dateFormat parameter in the archive listing year

The default english and default dateFormat in the lines with the page title and the month paragraphs are ignored.

The current appearance

October
2 Beiträge insgesamt
Sonstiges   Oct 30
GIT         Oct 11

The expected look

Oktober
2 Beiträge insgesamt
Sonstiges   Okt 30
GIT         Okt 11

Steps to reproduce

config/_default/languages.toml

[de]
  languageName = "Deutsch"
  weight = 1
  defaultContentLanguage = "de"
  [de.params]
    dateFormat = ':date_full'
    description = "Anleitungen, HowTos, Code-Schnipsel & Blog"
    pygmentsUseClasses = true
    comment = false
  [de.params.archive]
    dateFormat = "1. Jan"

Expected behavior

The expected appearance would be a translation into german

Oktober
2 Beiträge insgesamt
Sonstiges   Okt 30
GIT         Okt 11

What operating system(s) are you seeing the problem on?

Linux

What browser(s) are you seeing the problem on?

Chrome

What version of theme are you using?

pull master-branch a few minutes ago

What version of Hugo are you using?

0.119.0

What version of Node.js are you using?

No response

What version of Git are you using?

2.42.0

Additional context

The error should be in this file:

/layouts/partials/archives/year.html

in the lines 7 and 20:

https://github.com/razonyang/hugo-theme-bootstrap/blob/master/layouts/partials/archives/year.html#L7 https://github.com/razonyang/hugo-theme-bootstrap/blob/master/layouts/partials/archives/year.html#L20

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Reactions: 1
  • Comments: 15 (7 by maintainers)

Most upvoted comments

Fixed by cde8594c0d3a32d2a8615da9e9bda36f7e1ef659

First of all, thank you very much. The request has already been closed. I neglected to use the forum first.

Thanks for the patch. Now it looks the way I would like it to. Thank you very much for your work.

month

@rainerrose Added (archive.monthFormat), see https://hbs.razonyang.com/v1/en/docs/layouts/archives/, you can also use the localization token in the future if there is any format for month only, since I’m not sure there is one.

Thank you very much! That was once again very fast. I just have to do something else (family time) and will try this a little later.

@rainerrose I didn’t find a localization date format for month only on https://gohugo.io/functions/time/format/#localization, it may be impossible.

But I can add a parameter to format it as number instead, e.g. 01.