Closed Fubinator closed 6 years ago
By importing i18n into the main.js file the language of the given date could be automatically localized:
import i18n from './i18n'
...
Vue.use(VueTimeago, {
locale: i18n.locale,
locales: {
'en': require('vue-timeago/locales/en-US.json'),
'de': require('vue-timeago/locales/de-DE.json')
}
})
I guess it makes sense, but I wanted to ask if I should implement it before commiting.
@Fubinator I wonder if it is reactive over that way, since we only seem to pass the locale for the initial use-statement.
I checked this feature and it works fine, as intended and the implementation looks clean! 👍
If you want to, you can try out the things you have suggested yourself, otherwise I think this is ready!
Good point. I just ran a test to check if it's reactive and it is not. I'm going to keep that problem in mind. It will be a problem in the future when the user can change the language by himself, so I don't think it's that urgent to implement it right now.
Okay, so I'll guess we leave this as it is and just merge it then? :P
Yep sounds fine.
Added the correct date to posts and quoted posts with vue-timeago
feat #70
Description
Implemented #70
Requirements