clients icon indicating copy to clipboard operation
clients copied to clipboard

[PM-8499] Fix zh-Hant Invalid argument with locale

Open sunsky131221 opened this issue 1 year ago • 6 comments

Fix passkey added will cause view/edit page will blank issue. Fix datetime display error with zh-Hant.

🎟️ Tracking

https://github.com/bitwarden/clients/issues/6821 https://github.com/bitwarden/clients/issues/5220

📔 Objective

Make zh-Hant, zh-Hant-HK and zh-Hant-MO time format normalize.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

sunsky131221 avatar May 30 '24 13:05 sunsky131221

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 30 '24 13:05 CLAassistant

Thank you for your contribution! We've added this to our internal Community PR board for review. ID: PM-8499

bitwarden-bot avatar May 30 '24 13:05 bitwarden-bot

Hi @sunsky131221 and thank you for opening this PR!

I had noticed your great work researching for a solution over the past couple of days, on the linked GH issues. I had previously briefly looked into this and I suspect it might have something to do with https://github.com/angular/angular/issues/54114

Regardless if that is the exact problem, this is an upstream issue.

I spoke about this internally and we'd prefer if you could raise this with the Angular team instead of patching our current version.

It is quite possible that this has already been addressed with a newer version of Angular. A bump to a newer version is planned, but I currently can't mention a timeframe when this will happen. The team responsible has been hard at work in other areas.

Kind regards, Daniel

djsmith85 avatar May 31 '24 09:05 djsmith85

I briefly reviewed the issue ticket you provided, and I found the problem to be different.

Actually, the issue is that in Angular, the Locale module helps convert date, currency, and other language formats. However, in the traditional Chinese language template, “HH:mm” has been incorrectly written as “Bh:mm” and “ah:mm”. This directly causes an error when Bitwarden tries to convert the date format to the local format on devices used by traditional Chinese users.

Also, I submitted a PR to Angular yesterday, but I’m not sure if it was successfully sent.

Hi @sunsky131221 and thank you for opening this PR!

I had noticed your great work researching for a solution over the past couple of days, on the linked GH issues. I had previously briefly looked into this and I suspect it might have something to do with angular/angular#54114

Regardless if that is the exact problem, this is an upstream issue.

I spoke about this internally and we'd prefer if you could raise this with the Angular team instead of patching our current version.

It is quite possible that this has already been addressed with a newer version of Angular. A bump to a newer version is planned, but I currently can't mention a timeframe when this will happen. The team responsible has been hard at work in other areas.

Kind regards, Daniel

sunsky131221 avatar Jun 02 '24 07:06 sunsky131221

Hi everyone,

I just want to know if this PR is still in progress?

I’m just a regular Traditional Chinese Bitwarden user, and it seems this issue has been on hold for a while. Is there any new update or progress on this?

rick890101 avatar Oct 18 '24 08:10 rick890101

Hi everyone,

I just want to know if this PR is still in progress?

I’m just a regular Traditional Chinese Bitwarden user, and it seems this issue has been on hold for a while. Is there any new update or progress on this?

It's shows blocked. And this issue's root cause is from Angular, I don't know how/where to submit this request. BTW temporarity solution is replace "Bh:mm" with "HH:mm" in zipped release in this repo.

sunsky131221 avatar Oct 19 '24 11:10 sunsky131221

@sunsky131221 Thanks again for your time to investigate and your contribution

I'm closing this as https://github.com/bitwarden/clients/pull/13210 supersedes this. QA has already tested https://github.com/bitwarden/clients/pull/13210 and the changes will get merged soon.

djsmith85 avatar Feb 20 '25 16:02 djsmith85