Better localization support
Created by: nyuwec
In some languages future and past tenses expressed differently. For example in Hungarian "2 days ago" translates to "2 napja", but "in 2 days" translates to "2 nap múlva". As you can see the words must be separated more, please check the implementation is moment.js: https://github.com/moment/moment/blob/develop/locale/en-gb.js It handles singular, plural, past and future as separate cases. But it is far from easy to translate, because as a translator you should understand the javascript code.
I would create a simple "matrix" containing all the strings with placeholders inside, so the translators could freely write the proper sentences.
translations = {
...
'day': {
'singular': {
'past': 'one minute ago',
'future': 'in a minute'
},
'plural': {
'past': '%d minutes ago',
'future': 'in %d minutes'
},
...
},
wdyt?