ocpsoft / prettytime

Social Style Date and Time Formatting for Java
http://ocpsoft.org/prettytime/
Apache License 2.0
1.29k stars 253 forks source link

space between characters for Chinese locales #217

Open linama opened 3 years ago

linama commented 3 years ago

Hi, we are testing out your lib to support the needs to get localized strings. Your lib fits our needs but noticed that for Chinese locales(zh_), there are spaces between characters. For example, 1 天 前, 3 小时 前, or 59 分鐘 前. Shouldn't they be 1天前, 3小时前, or 59分鐘前 ? Thank you for your time.

lincolnthree commented 3 years ago

@linama Thanks for reporting the issue. I am not an expert in the Chinese language. You'd have to ask the original author of that resource bundle/language pack (陈正华), but I no longer have their contact information. It sounds like the zh_ bundles may need to have their patterns updated. Pull requests welcome to fix the issue:

https://github.com/ocpsoft/prettytime/blob/master/core/src/main/java/org/ocpsoft/prettytime/i18n/Resources_zh.java#L31