Skip to content

Image details: date not correctly localized in Japanese #2336

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

Closed
nicolas-raoul opened this issue Jan 23, 2019 · 14 comments
Closed

Image details: date not correctly localized in Japanese #2336

nicolas-raoul opened this issue Jan 23, 2019 · 14 comments

Comments

@nicolas-raoul
Copy link
Member

Steps to reproduce:

  1. Switch Android's locale to Japanese
  2. Tap a picture (via "Explore" for instance)
  3. Go to the upload date field
  4. It is like 18 1月 2019 whereas it should be 2019年1月18日

That might apply to other languages too.

screenshot_20190123-132224

@vanshikaarora
Copy link
Contributor

Hey!! I am working on this

@nicolas-raoul
Copy link
Member Author

The date must appear in a format that is natural for the locale of the user.
For instance, the same date will appear as 2019年1月18日 to a Japanese user and 18 Jan. 2019 to a German user.

@vanshikaarora
Copy link
Contributor

The date must appear in a format that is natural for the locale of the user.
For instance, the same date will appear as 2019年1月18日 to a Japanese user and 18 Jan. 2019 to a German user.

ohh ohk
Sorry I have misunderstood it earlier

@vanshikaarora
Copy link
Contributor

@nicolas-raoul as suggested by @maskaravivek I came across the method getBestDateTimePattern of the class DateFormat

I am updating the code using this function.
Kindly review and send your feedbacks whether this is preferable or shall i search for something else?

@nicolas-raoul
Copy link
Member Author

I don't know this method, would you mind posting screenshots in various languages on the pull request page? Thanks! :-)

@vanshikaarora
Copy link
Contributor

@nicolas-raoul Can you post the name that you of the image for which you have searched in the screenshot. In most of the Images that I have viewed I am getting Uploaded Date not available

@vanshikaarora
Copy link
Contributor

I don't know this method, would you mind posting screenshots in various languages on the pull request page? Thanks! :-)

@nicolas-raoul I don't know what's the Issue here But out of many images that I have searched through explore I am getting Uploaded Date not available on each of them. Also I am not getting this file:

https://commons.m.wikimedia.org/wiki/File:Iotaryoji_Tateishi_and_Masaya_Arai%2C_creators_of_a_ping-pong_table_that_simulates_physical_disabilities.jpg

Can you please verify the PR whether it's working fine when locale language is changed

@nicolas-raoul
Copy link
Member Author

nicolas-raoul commented Jan 27, 2019 via email

@vanshikaarora
Copy link
Contributor

There seems to be a bug with Explore indeed. The bug seems to not happen
with self-uploaded pictures so please upload a picture you have taken and
see its date, thanks!

@nicolas-raoul You were right the there was a bug with explore I can see the uploade date on a self-uploaded it. It shows absolutely correct response in case of English and Hindi

Here's a screenshot for the date in Hindi

whatsapp image 2019-01-27 at 3 38 07 pm

@maskaravivek
Copy link
Member

Nice to see the localized date in Hindi. :) Have created another issue for Explore. #2362.

After one round of testing, we can merge #2341.

@vanshikaarora
Copy link
Contributor

OK @maskaravivek till then I'll look at the other Issue as well

@nicolas-raoul
Copy link
Member Author

It works great, thanks! :-)

@vanshikaarora
Copy link
Contributor

It works great, thanks! :-)

Good to see this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants