Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong spelling of "Montag" from time.Format #9107

Closed
raoulb opened this issue Nov 1, 2021 · 7 comments · Fixed by #9110
Closed

Wrong spelling of "Montag" from time.Format #9107

raoulb opened this issue Nov 1, 2021 · 7 comments · Fixed by #9110
Assignees
Milestone

Comments

@raoulb
Copy link
Contributor

raoulb commented Nov 1, 2021

The german translation of the weekday name "monday" is wrong. The following code

{{ time.Format "Monday" "2021-11-01" }}<br>
{{ time.Format "Monday" "2021-11-02" }}<br>
{{ time.Format "Monday" "2021-11-03" }}<br>
{{ time.Format "Monday" "2021-11-04" }}<br>
{{ time.Format "Monday" "2021-11-05" }}<br>
{{ time.Format "Monday" "2021-11-06" }}<br>
{{ time.Format "Monday" "2021-11-07" }}<br>

produces

Mo.tag
Dienstag
Mittwoch
Donnerstag
Freitag
Samstag
Sonntag

with Mo.tag instead of Montag. The others are correct. Hugo is configured as:

languageCode = "de-de"
defaultContentLanguage = "de"

timeZone = "UTC"

A minimal working example can be found here.

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.88.1-5BC54738 linux/amd64 BuildDate=2021-09-04T09:39:19Z VendorInfo=gohugoio

Does this issue reproduce with the latest release?

Yes.

@jmooring
Copy link
Member

jmooring commented Nov 1, 2021

There's a problem with month names as well.

{{ time.Format "January" "2021-01-01" }} --> Jan.uar
{{ time.Format "January" "2021-02-01" }} --> Feb.ruar
{{ time.Format "January" "2021-03-01" }} --> März
{{ time.Format "January" "2021-04-01" }} --> Apr.il
{{ time.Format "January" "2021-05-01" }} --> Mai
{{ time.Format "January" "2021-06-01" }} --> Junii
{{ time.Format "January" "2021-07-01" }} --> Julii
{{ time.Format "January" "2021-08-01" }} --> Aug.ust
{{ time.Format "January" "2021-09-01" }} --> Sept.tember
{{ time.Format "January" "2021-10-01" }} --> Oktober
{{ time.Format "January" "2021-11-01" }} --> Nov.ember
{{ time.Format "January" "2021-12-01" }} --> Dezember

@jmooring
Copy link
Member

jmooring commented Nov 1, 2021

This seems to happen when

  1. The day or month name is capitalized in the target language, AND
  2. A day or month abbreviation in the target language matches a few characters of the format string

Affected languages include: Afrikaans (af), German (de), Swiss German (gsw), maybe some others

@bep bep added this to the v0.89 milestone Nov 1, 2021
@davidsneighbour
Copy link
Contributor

Double ii on Juni and Juli is wrong too.

@bep bep self-assigned this Nov 1, 2021
@bep
Copy link
Member

bep commented Nov 1, 2021

This looks like a Bangles bug.

@bep
Copy link
Member

bep commented Nov 1, 2021

Note that this is only wrong for the Go layout strings, it is OK for :date_long etc.

@bep bep closed this as completed in #9110 Nov 1, 2021
bep added a commit that referenced this issue Nov 1, 2021
@raoulb
Copy link
Contributor Author

raoulb commented Nov 1, 2021

Cool. Thanks for the quick fix!

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants