Formatting dates with i18n
artsiom-voitas opened this issue · comments
Describe the bug
Currently, Spacedrive formats dates, for example on (spacedrive\interface\app$libraryId\Explorer\Inspector\index.tsx):
<MetaData icon={Eraser} label={t('modified')} value={formatDate(dateModified)} />
using JavaScript capabilities, which makes it impossible to have date mapping in different languages.
It is worth considering using the i18n functions provided in the documentation
Reproduction
- Check date in Inspector
Expected behavior
Date formatting matches app language.
Platform and versions
spacedrive - v0.2.13
Stack trace
No response
Additional context
No response
We should tackle this #2389 with this issue also
Do you want to add Date Format selector in the settings? Somewhere under Language settings? If yes, I will continue work on this matter tomorrow, if you want to format according to language preferences, I can push it now
Do you want to add Date Format selector in the settings? Somewhere under Language settings? If yes, I will continue work on this matter tomorrow, if you want to format according to language preferences, I can push it now
Yes, I think we should default to the local time settings and user should also be able to change it
Do you want to add Date Format selector in the settings? Somewhere under Language settings? If yes, I will continue work on this matter tomorrow, if you want to format according to language preferences, I can push it now
Yes, I think we should default to the local time settings and user should also be able to change it
Is it good idea to make a changes to local time from chosen language? For example, We add two versions of English:
yup, options like "System", "DD/MM/YYYY", "M/D/Y" would be nice. And for extra points, we could display how it would look under the time display setting so it's easily understandable.
System would use whatever the default locale setting for that country is. (this would also be the default setting)