Issue due-dates are shown in English regardless of current language #2724

Closed
opened 2025-11-02 04:45:40 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @saltymouse on GitHub (Jan 9, 2019).

Description

Due-dates shown on the Issues page are shown in English regardless of the currently used UI language.
Switch to any non-English language (from the language switcher at the bottom of the page) and the dates are still shown in their English format (e.g. Jan 09, 2019)

Somewhat related: Milestone due-dates don't use the same date format as issues but are instead display in a more universal format (e.g. 2019-01-23), so it's more readable in any language, but perhaps they should be unified to use the same date display template?
...

Screenshots

Issues (Japanese UI) shows English language.
gitea-issue_date_language_test-ja

Milestones (Japanese UI) shows generic/unformatted date.
gitea-milestone_date_language_test-ja

Originally created by @saltymouse on GitHub (Jan 9, 2019). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): d3dc07f - Git version: 2.17.1 - Operating system: Ubuntu Server 18.04 - Database: - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes https://try.gitea.io/testtestsetset/test-date-format-language/issues - [ ] No - [ ] Not relevant - Log gist: ## Description Due-dates shown on the Issues page are shown in English regardless of the currently used UI language. Switch to any non-English language (from the language switcher at the bottom of the page) and the dates are still shown in their English format (e.g. Jan 09, 2019) Somewhat related: Milestone due-dates don't use the same date format as issues but are instead display in a more universal format (e.g. 2019-01-23), so it's more readable in any language, but perhaps they should be unified to use the same date display template? ... ## Screenshots *Issues* (Japanese UI) shows English language. ![gitea-issue_date_language_test-ja](https://user-images.githubusercontent.com/7547649/50876711-d9a54f80-1411-11e9-8fa4-8d60a5c585bb.png) *Milestones* (Japanese UI) shows generic/unformatted date. ![gitea-milestone_date_language_test-ja](https://user-images.githubusercontent.com/7547649/50876754-fb063b80-1411-11e9-95ad-c2a44e7dbb09.png) <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the topic/uiissue/confirmed labels 2025-11-02 04:45:40 -06:00
Author
Owner

@stale[bot] commented on GitHub (Mar 10, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Mar 10, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@Ryuno-Ki commented on GitHub (Jun 5, 2022):

The relevant template for issues is

73382d2132/templates/shared/issuelist.tmpl (L101-L108)

and for milestones

73382d2132/templates/repo/issue/milestones.tmpl (L80)

FormatShort is defined in

73382d2132/modules/timeutil/timestamp.go (L89-L92)

and Deadline in

73382d2132/models/issues/milestone.go (L91)

I can see timeutil having localised version, but where would I pull the Location information from?

@Ryuno-Ki commented on GitHub (Jun 5, 2022): The relevant template for issues is https://github.com/go-gitea/gitea/blob/73382d2132f8f242245d83f66c92761e0b477b91/templates/shared/issuelist.tmpl#L101-L108 and for milestones https://github.com/go-gitea/gitea/blob/73382d2132f8f242245d83f66c92761e0b477b91/templates/repo/issue/milestones.tmpl#L80 FormatShort is defined in https://github.com/go-gitea/gitea/blob/73382d2132f8f242245d83f66c92761e0b477b91/modules/timeutil/timestamp.go#L89-L92 and Deadline in https://github.com/go-gitea/gitea/blob/73382d2132f8f242245d83f66c92761e0b477b91/models/issues/milestone.go#L91 I can see `timeutil` having localised version, but where would I pull the `Location` information from?
Author
Owner

@wxiaoguang commented on GitHub (Jun 6, 2022):

Two choices:

  1. make user can set their timezone in their preference (setting) page.
  2. render date/time by frontend (JS)

Each of them has Pros/Cons.

A similar problem: #17760

@wxiaoguang commented on GitHub (Jun 6, 2022): Two choices: 1. make user can set their timezone in their preference (setting) page. 2. render date/time by frontend (JS) Each of them has Pros/Cons. A similar problem: #17760 * https://github.com/go-gitea/gitea/pull/17760
Author
Owner

@Ryuno-Ki commented on GitHub (Jun 11, 2022):

Are, the joy of internationalisation. Okay, your PR appears to be almost ready for merge. I'll put this on the backburner for now.

@Ryuno-Ki commented on GitHub (Jun 11, 2022): Are, the joy of internationalisation. Okay, your PR appears to be almost ready for merge. I'll put this on the backburner for now.
Author
Owner

@yardenshoham commented on GitHub (Apr 29, 2023):

I fixed this

@yardenshoham commented on GitHub (Apr 29, 2023): I fixed this
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2724