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

Date and Time Formats were incorrectly applied when displaying dates in Korean (or other) languages. #26836

Open
fofwisdom opened this issue Sep 7, 2023 · 3 comments
Labels
area/web interface Related to the Mastodon web interface bug Something isn't working i18n Internationalization and localization status/to triage This issue needs to be triaged

Comments

@fofwisdom
Copy link

fofwisdom commented Sep 7, 2023

Steps to reproduce the problem

  1. Change the language to Korean
  2. open the any posts
    example - https://muri.network/deck/@TEA_FOP/111000303520826018
스크린샷 2023-09-07 15 39 19

Expected behaviour

two digit (2023년 09월 07일 or 2023-09-07) (%Y-%m-%d) or single digit (2023년 9월 7일)

Actual behaviour

mixed one digit & two digit (2023년 9월 07일 or 2023-9-07) (%Y-%f-%d)

Detailed description

Date and Time Formats - https://www.ibm.com/docs/en/cmofz/10.5.0?topic=reference-date-time-formats
Korea translation - https://crowdin.com/translate/mastodon/all/en-ko?filter=basic&value=0#q=%25Y

The Korean translation only calls %f in two cases, and does not write %f and %d together.

Mastodon instance

mastodon.social / muri.network / mastodon.mnetwork.co.kr

Mastodon version

v4.2.0-nightly.2023-09-06 / v4.2.0-beta3 / v4.1.6

Browser name and version

Microsoft Edge 116.0.1938.69 / Chrome 116.0.5845.164

Operating system

macOS 13.5.1 / Android 13

Technical details

No response

@fofwisdom fofwisdom added area/web interface Related to the Mastodon web interface bug Something isn't working status/to triage This issue needs to be triaged labels Sep 7, 2023
@ClearlyClaire
Copy link
Contributor

Korea translation - https://crowdin.com/translate/mastodon/all/en-ko?filter=basic&value=0#q=%25Y

These translation strings are for server-side-rendered content, which is not the case in your screenshot.

As far as I can tell, the code responsible for your screenshot is:

<FormattedDate value={new Date(status.get('created_at'))} hour12={false} year='numeric' month='short' day='2-digit' hour='2-digit' minute='2-digit' />

It appears it sets numeric for year, short for month (which in English locale is not numeric), and 2-digit for day. So I suppose the issue is the short style for months in Korean is numeric?

@fofwisdom
Copy link
Author

Hi ClearlyClaire,

Thanks for the feedback.

If we write X year Y month Z day or month name, we need to hide the zeros in the number of days. Only Mastodon uses two digits, including zeros, in its detailed date format.

Unless our translation project can control the date formatting of posts, we'll have to leave the zeros out. It's a minor change, so even if it's an afterthought, it seems like something that should be fixed at someday.

Mastodon
image

Wikipedia
image

Google Play
image

Microsoft Windows (Germany)
image

Microsoft Windows (English Germany)
image

Microsoft Windows (English USA)
image

So many thanks.

@ClearlyClaire
Copy link
Contributor

Yeah, you're right, using 2-digits for days is a weird choice regardless of the locale!

@renchap renchap added the i18n Internationalization and localization label Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/web interface Related to the Mastodon web interface bug Something isn't working i18n Internationalization and localization status/to triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants