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

fix(i18n): fix unlocalized article publish/lastUpdated date #1050

Merged
merged 2 commits into from
Sep 7, 2024

Conversation

weeix
Copy link
Contributor

@weeix weeix commented Aug 18, 2024

Issue:

From #1040

Setting defaultContentLanguage in hugo.yaml doesn't localize article publish and last modified dates.

image of the unlocalized article publish and last modified dates

Proposed Solution:

This pull request addresses the missing localization for article dates by leveraging the time.Format function introduced in Hugo v0.87.

@JuliaLblnd JuliaLblnd mentioned this pull request Aug 22, 2024
Copy link
Owner

@CaiJimmy CaiJimmy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@CaiJimmy CaiJimmy changed the title fix(i18n): Fix unlocalized article publish/lastUpdated date fix(i18n): fix unlocalized article publish/lastUpdated date Sep 7, 2024
@CaiJimmy CaiJimmy linked an issue Sep 7, 2024 that may be closed by this pull request
@CaiJimmy CaiJimmy merged commit 374b25a into CaiJimmy:master Sep 7, 2024
4 of 5 checks passed
@weeix weeix deleted the fix-unlocalized-article-date branch September 7, 2024 12:41
cyp0633 added a commit to cyp0633/stack-mod that referenced this pull request Oct 20, 2024
NapalmCodes added a commit to NapalmCodes/hugo-theme-stack that referenced this pull request Nov 13, 2024
* fix: article category overflow (CaiJimmy#1055)

closes CaiJimmy#1045

* fix(i18n): fix unlocalized article publish/lastUpdated date (CaiJimmy#1050)

closes CaiJimmy#1040

* fix: use Hugo's default RSS template value source for lastBuildDate (CaiJimmy#1006)

Use Hugo's default RSS template value source for lastBuildDate

* feat(comments): add support to Gitalk `proxy` parameter (CaiJimmy#1012)

Co-authored-by: Jimmy Cai <hi@jimmycai.com>

* feat(i18n): add Occitan translations (CaiJimmy#1034)

* feat(i18n): add Bulgarian translations (CaiJimmy#1007)

* doc: add backslash to `baseURL` in exampleSite (CaiJimmy#1009)

* chore: bump Twikoo front-end to latest released version `1.6.39` (CaiJimmy#1021)

* fix: use `css.Sass` instead of deprecated `resources.ToCSS` (CaiJimmy#1054)

* doc: add `markup.goldmark.extensions.passthrough` in exampleSite (CaiJimmy#1056)

Related: CaiJimmy#1019

* fix(exampleSite): site config key `paginate` was deprecated (CaiJimmy#1057)

fix: site config key paginate was deprecated

* release: 3.27.0

* fix: show different subtitle for each i18n variant in exampleSite (CaiJimmy#1068)

* fix(colorScheme): systemPreferScheme not initialized on start up (CaiJimmy#1061)

* fix(i18n): missing translation for title of categories widget in fr.yaml (CaiJimmy#1059)

* feat(giscus): use current language as fallback for `lang` param and add `loading` param (CaiJimmy#1075)

fix: giscus use current lang as default, and add missing `loading` params

* feat: add fingerprints to the JS file URL to utilize HTTP caching (CaiJimmy#1076)

* release: 3.28.0

* feat: search box in 404 page (CaiJimmy#1081)

* fix(giscus): fallback to `en` if no language code is set (CaiJimmy#1084)

* release: 3.29.0

---------

Co-authored-by: Jimmy Cai <hi@jimmycai.com>
Co-authored-by: weeix <weeix@users.noreply.github.com>
Co-authored-by: Anthony Simmon <simmon.anthony@gmail.com>
Co-authored-by: DashJay <45532257+dashjay@users.noreply.github.com>
Co-authored-by: ensag-dev <59049879+ensag-dev@users.noreply.github.com>
Co-authored-by: Vladimir Vitkov <5081863+zeridon@users.noreply.github.com>
Co-authored-by: saikadaramakaisosjupita <162842238+saikadaramakaisosjupita@users.noreply.github.com>
Co-authored-by: Syafa Adena <gvoze32@gmail.com>
Co-authored-by: powerfullz <61956140+powerfullz@users.noreply.github.com>
Co-authored-by: PukNgae Cryolitia <Cryolitia@gmail.com>
Co-authored-by: onavas33 <71631187+onavas33@users.noreply.github.com>
Co-authored-by: xiaoxiyao <xiyao.luoxiao@gmail.com>
NapalmCodes added a commit to NapalmCodes/hugo-theme-stack that referenced this pull request Nov 13, 2024
* fix: article category overflow (CaiJimmy#1055)

closes CaiJimmy#1045

* fix(i18n): fix unlocalized article publish/lastUpdated date (CaiJimmy#1050)

closes CaiJimmy#1040

* fix: use Hugo's default RSS template value source for lastBuildDate (CaiJimmy#1006)

Use Hugo's default RSS template value source for lastBuildDate

* feat(comments): add support to Gitalk `proxy` parameter (CaiJimmy#1012)

Co-authored-by: Jimmy Cai <hi@jimmycai.com>

* feat(i18n): add Occitan translations (CaiJimmy#1034)

* feat(i18n): add Bulgarian translations (CaiJimmy#1007)

* doc: add backslash to `baseURL` in exampleSite (CaiJimmy#1009)

* chore: bump Twikoo front-end to latest released version `1.6.39` (CaiJimmy#1021)

* fix: use `css.Sass` instead of deprecated `resources.ToCSS` (CaiJimmy#1054)

* doc: add `markup.goldmark.extensions.passthrough` in exampleSite (CaiJimmy#1056)

Related: CaiJimmy#1019

* fix(exampleSite): site config key `paginate` was deprecated (CaiJimmy#1057)

fix: site config key paginate was deprecated

* release: 3.27.0

* fix: show different subtitle for each i18n variant in exampleSite (CaiJimmy#1068)

* fix(colorScheme): systemPreferScheme not initialized on start up (CaiJimmy#1061)

* fix(i18n): missing translation for title of categories widget in fr.yaml (CaiJimmy#1059)

* feat(giscus): use current language as fallback for `lang` param and add `loading` param (CaiJimmy#1075)

fix: giscus use current lang as default, and add missing `loading` params

* feat: add fingerprints to the JS file URL to utilize HTTP caching (CaiJimmy#1076)

* release: 3.28.0

* feat: search box in 404 page (CaiJimmy#1081)

* fix(giscus): fallback to `en` if no language code is set (CaiJimmy#1084)

* release: 3.29.0

---------

Co-authored-by: Jimmy Cai <hi@jimmycai.com>
Co-authored-by: weeix <weeix@users.noreply.github.com>
Co-authored-by: Anthony Simmon <simmon.anthony@gmail.com>
Co-authored-by: DashJay <45532257+dashjay@users.noreply.github.com>
Co-authored-by: ensag-dev <59049879+ensag-dev@users.noreply.github.com>
Co-authored-by: Vladimir Vitkov <5081863+zeridon@users.noreply.github.com>
Co-authored-by: saikadaramakaisosjupita <162842238+saikadaramakaisosjupita@users.noreply.github.com>
Co-authored-by: Syafa Adena <gvoze32@gmail.com>
Co-authored-by: powerfullz <61956140+powerfullz@users.noreply.github.com>
Co-authored-by: PukNgae Cryolitia <Cryolitia@gmail.com>
Co-authored-by: onavas33 <71631187+onavas33@users.noreply.github.com>
Co-authored-by: xiaoxiyao <xiyao.luoxiao@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support localized date format
2 participants