mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
### TL;DR First, fixed an i18n issue in history panel. When the browser language is set to Chinese, and the AFFiNE application language is set to English, the language supposed to be English global. But now the language is a mixture of Chinese and English, which is obviously wrong.  Second, design a time formatter to convert timestamp into relative calendar date, such today and yesterday and so on. Long-ago edits will show the exact date like before.  ### What changed? - `new Intl.DateTimeFormat` with language option form `document.documentElement.lang` - Added `timestampToCalendarDate` function to convert timestamp into relative calendar date - Updated unit tests - Updated i18n copywriting ### How to test? 1. Open view history version 2. Check edit timeline