mykiwi/mykiwi.blogpublic Fork
⑂ 7222307
Commits
⬇ Clone ▾
git clone https://git.rickub.com/mykiwi/mykiwi.blog.git
git clone ssh://git@rickub.com/mykiwi/mykiwi.blog.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

Say the date, and name the page, in each site's own languageUnverified

.Date.Format is Go's own formatter, which knows one set of month names
and they are English. So every site but one dated its lead post "April
13, 1990", and its post headers "1990-04-13" - chrome fully translated
around a date that never was. It only became visible now that the other
four languages have a post to date at all.

time.Format is the localized one, but it substitutes names and cannot
reorder: where the day goes, and whether the month is joined with "de"
or a comma or 年, is part of the translation and not of the template. So
the layout string itself moves into i18n/*.toml - dateLong for the home
lead, dateShort for a list entry, dateNumeric for the post header - and
the three call sites ask for it by key.

Those values are Go reference-time layouts, where "January" is a token
and not a word. Renaming it to "janvier" is the obvious thing for a
translator to do and it breaks the date, so each file says so above the
keys.

Two dates deliberately stay as they are. The datetime attribute on
<time> is the machine-readable one and stays ISO 8601, which is the only
thing a parser may assume. The feed's pubDate and lastBuildDate stay
English because RFC 822 requires English day and month names - a
localized one is not a late date, it is an unparseable one, for every
subscriber at once.

/posts/ had no _index.md, so Hugo titled it after the directory and the
heading and the tab read "Posts" in all five. Each language now names it
with the word it already uses for counting them: Articles, Artículos,
投稿. pt keeps "Posts", which is what its own count string says.

Smaller, in fr: "Dernier" reads as the final one, where the label means
the most recent - "Plus récent", which is what pt already said. And the
pt bio takes the <br> the other four have, so the second line starts
where theirs do.

Abbreviated month names are wider than "Apr 13", and the entry date sits
in a fixed 4.25rem column set to nowrap, so it was worth measuring:
widest case is "13 janv." at 66.9px against a 73.69px column, with the
0.85rem gap still behind it. Nothing overflows, and the column stands.
Romain Gautier committed 2026-09-21T01:06:53+02:00 Browse files
7222307 parent: 80a4931
added blog/content/posts/_index.es.md +3 -0
new file mode 100644
@@ -0,0 +1,3 @@
1++++
2+title = 'Artículos'
3++++
new file mode 100644
@@ -0,0 +1,3 @@
1++++
2+title = 'Artículos'
3++++
added blog/content/posts/_index.fr.md +3 -0
new file mode 100644
@@ -0,0 +1,3 @@
1++++
2+title = 'Articles'
3++++
new file mode 100644
@@ -0,0 +1,3 @@
1++++
2+title = 'Articles'
3++++
added blog/content/posts/_index.ja.md +3 -0
new file mode 100644
@@ -0,0 +1,3 @@
1++++
2+title = '投稿'
3++++
new file mode 100644
@@ -0,0 +1,3 @@
1++++
2+title = '投稿'
3++++
added blog/content/posts/_index.md +3 -0
new file mode 100644
@@ -0,0 +1,3 @@
1++++
2+title = 'Posts'
3++++
new file mode 100644
@@ -0,0 +1,3 @@
1++++
2+title = 'Posts'
3++++
added blog/content/posts/_index.pt.md +3 -0
new file mode 100644
@@ -0,0 +1,3 @@
1++++
2+title = 'Posts'
3++++
new file mode 100644
@@ -0,0 +1,3 @@
1++++
2+title = 'Posts'
3++++
modified blog/i18n/en.toml +14 -0
@@ -73,3 +73,17 @@ other = "Code on ATmosphere"
7373
7474 [linkCodeGitHub]
7575 other = "Code on GitHub"
76+
77+# Go reference-time layouts, rendered by time.Format, which is the localized
78+# one: it replaces "January"/"Jan" with this language's month name and leaves
79+# every other character as written. So translate the *order and punctuation*
80+# here - the English words are tokens, and renaming them breaks the date.
81+
82+[dateLong]
83+other = "January 2, 2006"
84+
85+[dateShort]
86+other = "Jan 02"
87+
88+[dateNumeric]
89+other = "2006-01-02"
@@ -73,3 +73,17 @@ other = "Code on ATmosphere"
73 73
74 [linkCodeGitHub]74 [linkCodeGitHub]
75 other = "Code on GitHub"75 other = "Code on GitHub"
76+
77+# Go reference-time layouts, rendered by time.Format, which is the localized
78+# one: it replaces "January"/"Jan" with this language's month name and leaves
79+# every other character as written. So translate the *order and punctuation*
80+# here - the English words are tokens, and renaming them breaks the date.
81+
82+[dateLong]
83+other = "January 2, 2006"
84+
85+[dateShort]
86+other = "Jan 02"
87+
88+[dateNumeric]
89+other = "2006-01-02"
modified blog/i18n/es.toml +14 -0
@@ -73,3 +73,17 @@ other = "Código en ATmosphere"
7373
7474 [linkCodeGitHub]
7575 other = "Código en GitHub"
76+
77+# Go reference-time layouts, rendered by time.Format, which is the localized
78+# one: it replaces "January"/"Jan" with this language's month name and leaves
79+# every other character as written. So translate the *order and punctuation*
80+# here - the English words are tokens, and renaming them breaks the date.
81+
82+[dateLong]
83+other = "2 de January de 2006"
84+
85+[dateShort]
86+other = "02 Jan"
87+
88+[dateNumeric]
89+other = "02/01/2006"
@@ -73,3 +73,17 @@ other = "Código en ATmosphere"
73 73
74 [linkCodeGitHub]74 [linkCodeGitHub]
75 other = "Código en GitHub"75 other = "Código en GitHub"
76+
77+# Go reference-time layouts, rendered by time.Format, which is the localized
78+# one: it replaces "January"/"Jan" with this language's month name and leaves
79+# every other character as written. So translate the *order and punctuation*
80+# here - the English words are tokens, and renaming them breaks the date.
81+
82+[dateLong]
83+other = "2 de January de 2006"
84+
85+[dateShort]
86+other = "02 Jan"
87+
88+[dateNumeric]
89+other = "02/01/2006"
modified blog/i18n/fr.toml +15 -1
@@ -51,7 +51,7 @@ other = "Ce flux ne contient encore aucun article."
5151 other = "Retour à {{ .Site }}"
5252
5353 [latest]
54-other = "Dernier"
54+other = "Plus récent"
5555
5656 [readMore]
5757 other = "Lire →"
@@ -73,3 +73,17 @@ other = "Code sur l’ATmosphere"
7373
7474 [linkCodeGitHub]
7575 other = "Code sur GitHub"
76+
77+# Go reference-time layouts, rendered by time.Format, which is the localized
78+# one: it replaces "January"/"Jan" with this language's month name and leaves
79+# every other character as written. So translate the *order and punctuation*
80+# here - the English words are tokens, and renaming them breaks the date.
81+
82+[dateLong]
83+other = "2 January 2006"
84+
85+[dateShort]
86+other = "02 Jan"
87+
88+[dateNumeric]
89+other = "02/01/2006"
@@ -51,7 +51,7 @@ other = "Ce flux ne contient encore aucun article."
51 other = "Retour à {{ .Site }}"51 other = "Retour à {{ .Site }}"
52 52
53 [latest]53 [latest]
54-other = "Dernier"54+other = "Plus récent"
55 55
56 [readMore]56 [readMore]
57 other = "Lire →"57 other = "Lire →"
@@ -73,3 +73,17 @@ other = "Code sur l’ATmosphere"
73 73
74 [linkCodeGitHub]74 [linkCodeGitHub]
75 other = "Code sur GitHub"75 other = "Code sur GitHub"
76+
77+# Go reference-time layouts, rendered by time.Format, which is the localized
78+# one: it replaces "January"/"Jan" with this language's month name and leaves
79+# every other character as written. So translate the *order and punctuation*
80+# here - the English words are tokens, and renaming them breaks the date.
81+
82+[dateLong]
83+other = "2 January 2006"
84+
85+[dateShort]
86+other = "02 Jan"
87+
88+[dateNumeric]
89+other = "02/01/2006"
modified blog/i18n/ja.toml +14 -0
@@ -72,3 +72,17 @@ other = "ATmosphereのコード"
7272
7373 [linkCodeGitHub]
7474 other = "GitHubのコード"
75+
76+# Go reference-time layouts, rendered by time.Format, which is the localized
77+# one: it replaces "January"/"Jan" with this language's month name and leaves
78+# every other character as written. So translate the *order and punctuation*
79+# here - the English words are tokens, and renaming them breaks the date.
80+
81+[dateLong]
82+other = "2006年1月2日"
83+
84+[dateShort]
85+other = "1月2日"
86+
87+[dateNumeric]
88+other = "2006/01/02"
@@ -72,3 +72,17 @@ other = "ATmosphereのコード"
72 72
73 [linkCodeGitHub]73 [linkCodeGitHub]
74 other = "GitHubのコード"74 other = "GitHubのコード"
75+
76+# Go reference-time layouts, rendered by time.Format, which is the localized
77+# one: it replaces "January"/"Jan" with this language's month name and leaves
78+# every other character as written. So translate the *order and punctuation*
79+# here - the English words are tokens, and renaming them breaks the date.
80+
81+[dateLong]
82+other = "2006年1月2日"
83+
84+[dateShort]
85+other = "1月2日"
86+
87+[dateNumeric]
88+other = "2006/01/02"
modified blog/i18n/pt.toml +15 -1
@@ -57,7 +57,7 @@ other = "Mais recente"
5757 other = "Ler →"
5858
5959 [bio]
60-other = "Engenheiro de software, apaixonado por tecnologia, compartilhamento de conhecimento e open source como #PHP, #Symfony, #Dagger, #Docker, #Nix, atproto:// e o ATmosphere. Também pai de <a href=\"https://instagram.com/apy.leon\" title=\"Fotos da Apy e do Léon\" target=\"_blank\" rel=\"noopener noreferrer\">🐕️ & 🐈️</a>."
60+other = "Engenheiro de software, apaixonado por tecnologia, compartilhamento de conhecimento e open source como #PHP, #Symfony, #Dagger, #Docker, #Nix, atproto:// e o ATmosphere.<br>Também pai de <a href=\"https://instagram.com/apy.leon\" title=\"Fotos da Apy e do Léon\" target=\"_blank\" rel=\"noopener noreferrer\">🐕️ & 🐈️</a>."
6161
6262 [linkTweetsATmosphere]
6363 other = "Tweets no ATmosphere"
@@ -73,3 +73,17 @@ other = "Código no ATmosphere"
7373
7474 [linkCodeGitHub]
7575 other = "Código no GitHub"
76+
77+# Go reference-time layouts, rendered by time.Format, which is the localized
78+# one: it replaces "January"/"Jan" with this language's month name and leaves
79+# every other character as written. So translate the *order and punctuation*
80+# here - the English words are tokens, and renaming them breaks the date.
81+
82+[dateLong]
83+other = "2 de January de 2006"
84+
85+[dateShort]
86+other = "02 Jan"
87+
88+[dateNumeric]
89+other = "02/01/2006"
@@ -57,7 +57,7 @@ other = "Mais recente"
57 other = "Ler →"57 other = "Ler →"
58 58
59 [bio]59 [bio]
60-other = "Engenheiro de software, apaixonado por tecnologia, compartilhamento de conhecimento e open source como #PHP, #Symfony, #Dagger, #Docker, #Nix, atproto:// e o ATmosphere. Também pai de <a href=\"https://instagram.com/apy.leon\" title=\"Fotos da Apy e do Léon\" target=\"_blank\" rel=\"noopener noreferrer\">🐕️ & 🐈️</a>."60+other = "Engenheiro de software, apaixonado por tecnologia, compartilhamento de conhecimento e open source como #PHP, #Symfony, #Dagger, #Docker, #Nix, atproto:// e o ATmosphere.<br>Também pai de <a href=\"https://instagram.com/apy.leon\" title=\"Fotos da Apy e do Léon\" target=\"_blank\" rel=\"noopener noreferrer\">🐕️ & 🐈️</a>."
61 61
62 [linkTweetsATmosphere]62 [linkTweetsATmosphere]
63 other = "Tweets no ATmosphere"63 other = "Tweets no ATmosphere"
@@ -73,3 +73,17 @@ other = "Código no ATmosphere"
73 73
74 [linkCodeGitHub]74 [linkCodeGitHub]
75 other = "Código no GitHub"75 other = "Código no GitHub"
76+
77+# Go reference-time layouts, rendered by time.Format, which is the localized
78+# one: it replaces "January"/"Jan" with this language's month name and leaves
79+# every other character as written. So translate the *order and punctuation*
80+# here - the English words are tokens, and renaming them breaks the date.
81+
82+[dateLong]
83+other = "2 de January de 2006"
84+
85+[dateShort]
86+other = "02 Jan"
87+
88+[dateNumeric]
89+other = "02/01/2006"
modified blog/layouts/_default/list.html +1 -1
@@ -15,7 +15,7 @@
1515 <ul class="year__list">
1616 {{ range $year.Pages }}
1717 <li class="entry">
18- <span class="date">{{ .Date.Format "Jan 02" }}</span>
18+ <span class="date">{{ time.Format (i18n "dateShort") .Date }}</span>
1919 <a href="{{ .RelPermalink }}">{{ .Title }}</a>
2020 </li>
2121 {{ end }}
@@ -15,7 +15,7 @@
15 <ul class="year__list">15 <ul class="year__list">
16 {{ range $year.Pages }}16 {{ range $year.Pages }}
17 <li class="entry">17 <li class="entry">
18- <span class="date">{{ .Date.Format "Jan 02" }}</span>18+ <span class="date">{{ time.Format (i18n "dateShort") .Date }}</span>
19 <a href="{{ .RelPermalink }}">{{ .Title }}</a>19 <a href="{{ .RelPermalink }}">{{ .Title }}</a>
20 </li>20 </li>
21 {{ end }}21 {{ end }}
modified blog/layouts/_default/single.html +1 -1
@@ -3,7 +3,7 @@
33 <header class="post-header rise">
44 <p class="post-kicker">
55 {{ with .Date }}
6- <time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ .Format "2006-01-02" }}</time>
6+ <time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ time.Format (i18n "dateNumeric") . }}</time>
77 <span class="sep" aria-hidden="true">&middot;</span>
88 {{ end }}
99 <span>{{ i18n "minRead" (dict "Count" .ReadingTime) }}</span>
@@ -3,7 +3,7 @@
3 <header class="post-header rise">3 <header class="post-header rise">
4 <p class="post-kicker">4 <p class="post-kicker">
5 {{ with .Date }}5 {{ with .Date }}
6- <time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ .Format "2006-01-02" }}</time>6+ <time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ time.Format (i18n "dateNumeric") . }}</time>
7 <span class="sep" aria-hidden="true">&middot;</span>7 <span class="sep" aria-hidden="true">&middot;</span>
8 {{ end }}8 {{ end }}
9 <span>{{ i18n "minRead" (dict "Count" .ReadingTime) }}</span>9 <span>{{ i18n "minRead" (dict "Count" .ReadingTime) }}</span>
modified blog/layouts/index.html +2 -2
@@ -10,7 +10,7 @@
1010 <div class="index-body">
1111 {{ with $lead }}
1212 <div class="index-lead rise" style="--i: 1">
13- <span class="label">{{ i18n "latest" }} &middot; {{ .Date.Format "January 2, 2006" }}</span>
13+ <span class="label">{{ i18n "latest" }} &middot; {{ time.Format (i18n "dateLong") .Date }}</span>
1414 <a class="title" href="{{ .RelPermalink }}">{{ .Title }}</a>
1515 <span class="excerpt">{{ .Summary }}</span>
1616 <span class="more" aria-hidden="true">{{ i18n "readMore" }}</span>
@@ -26,7 +26,7 @@
2626 <ul class="year__list">
2727 {{ range $year.Pages }}
2828 <li class="entry">
29- <span class="date">{{ .Date.Format "Jan 02" }}</span>
29+ <span class="date">{{ time.Format (i18n "dateShort") .Date }}</span>
3030 <a href="{{ .RelPermalink }}">{{ .Title }}</a>
3131 </li>
3232 {{ end }}
@@ -10,7 +10,7 @@
10 <div class="index-body">10 <div class="index-body">
11 {{ with $lead }}11 {{ with $lead }}
12 <div class="index-lead rise" style="--i: 1">12 <div class="index-lead rise" style="--i: 1">
13- <span class="label">{{ i18n "latest" }} &middot; {{ .Date.Format "January 2, 2006" }}</span>13+ <span class="label">{{ i18n "latest" }} &middot; {{ time.Format (i18n "dateLong") .Date }}</span>
14 <a class="title" href="{{ .RelPermalink }}">{{ .Title }}</a>14 <a class="title" href="{{ .RelPermalink }}">{{ .Title }}</a>
15 <span class="excerpt">{{ .Summary }}</span>15 <span class="excerpt">{{ .Summary }}</span>
16 <span class="more" aria-hidden="true">{{ i18n "readMore" }}</span>16 <span class="more" aria-hidden="true">{{ i18n "readMore" }}</span>
@@ -26,7 +26,7 @@
26 <ul class="year__list">26 <ul class="year__list">
27 {{ range $year.Pages }}27 {{ range $year.Pages }}
28 <li class="entry">28 <li class="entry">
29- <span class="date">{{ .Date.Format "Jan 02" }}</span>29+ <span class="date">{{ time.Format (i18n "dateShort") .Date }}</span>
30 <a href="{{ .RelPermalink }}">{{ .Title }}</a>30 <a href="{{ .RelPermalink }}">{{ .Title }}</a>
31 </li>31 </li>
32 {{ end }}32 {{ end }}