I am trying to achieve a proper German localisation of the date string provided by vendor/flarum/core/js/src/common/utils/humanTime.js
. Here, the format is picked like:
if (m.year() === moment().year()) {
ago = m.format('D MMM');
} else {
ago = m.format('ll');
}
In the language pack's config.js
, I can localize the 'LL' format:
moment.locale('de', {
months : [...],
longDateFormat : {
[...],
LL : 'D. MMMM YYYY',
[...]
},
[...]
});
... but not 'D MMM'. In German, one would expect a dot behind the day: 'D. MMM', other languages have their own conventions.
How can a proper localisation be achieved here?
I also tried to override vendor/flarum/core/js/src/common/utils/humanTime.js
, but I wasn't successful. And probably I'm not the only one to struggle: clarkwinkelmann and https://discuss.flarum.org/?q=override%20helper%20function