Relative date format issue

the relative date in Chinese language has unnecessary spaces,
usually the date format should be “mm月dd日”, the current format is “mm月 dd 日”,
I haven’t found any issue with the translation, and also I think the ember helper lead to this issue

I think function autoUpdatingRelativeAge adds the extra spaces.
I understand this is not an issue for English version discourse, but may cause some format issues for other languages.
I tried javascript to remove the spaces, but it won’t work with the lazy loading content.
I’m appreciated to any tips for modifying the ember helper in a plugin or any fix from the main branch.

这似乎是由于 locale 文件中的日期格式字符串导致的 Bug,影响了简体中文。查看 git 历史记录,在 v3.3.0 中,格式如下:

它们最近似乎已更新为(在 3.4.0.beta1-dev 中已确认 live):

在 codepen 中使用默认的 Momentjs 配置 zh-cn 测试格式字符串 \"MMM D 日\",会产生观察到的缺陷(即 \"8月 2 日\")。

作为即时修复,您可以通过修改 js.dates.tiny.date_monthjs.dates.long_no_year_no_time 的翻译来更改格式,如下所示:

2 个赞