You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of the text isn't translated in other languages when used with language packs.
The issue seems to be that we define additional keys for relativeTime, and since those keys aren't part of the standard DayJS, language packs don't translate it.
For example for seconds there is only s by default, but this extension ads ss, which won't be translated by any extension.
We should either use only translations available in the base DayJS, or gracefully fallback from "x seconds ago" to "a few seconds ago" if "x seconds ago" isn't translated in the current language.
The text was updated successfully, but these errors were encountered:
We should either use only translations available in the base DayJS, or gracefully fallback from "x seconds ago" to "a few seconds ago" if "x seconds ago" isn't translated in the current language.
I haven't studied this in enough details to really say.
It seems to me that DayJS should have a way to translate "x seconds", but from my quick look at the translation files, it doesn't seem they do.
That probably leaves a proper fallback the best option, but I'm not sure if that's easy to do, or if DayJS already tries to fallback to something when a key doesn't exist.
Some of the text isn't translated in other languages when used with language packs.
The issue seems to be that we define additional keys for
relativeTime
, and since those keys aren't part of the standard DayJS, language packs don't translate it.For example for seconds there is only
s
by default, but this extension adsss
, which won't be translated by any extension.realtimedate/js/src/forum/index.js
Lines 31 to 32 in 65fb3dc
Bizarrely in the report here https://discuss.flarum.org/d/23211-friendsofflarum-real-time-date/22 it seems like the
s
translation defaults to English, while it should be the only one with a French translation available, and I'd expectss
to default to English 🤔Translations registered by language pack https://github.com/qiaeru/lang-french/blob/bd0d01dc8fedbb04d8184b9ce9c892e874151a0a/locale/config.js#L23 which is copied verbatim from https://github.com/iamkun/dayjs/blob/dev/src/locale/fr.js
We should either use only translations available in the base DayJS, or gracefully fallback from "x seconds ago" to "a few seconds ago" if "x seconds ago" isn't translated in the current language.
The text was updated successfully, but these errors were encountered: