From 2e200df933ebb27eaa6f8638fe7ed98986c8e5af Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Wed, 9 Mar 2022 11:12:39 +1100 Subject: [PATCH] fdix NOW ago by using the default format of moment this prints `A few seconds ago` for a very recent change --- _locales/en/messages.json | 3 --- preload.js | 17 ----------------- 2 files changed, 20 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index da0d50793..59b420e64 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -149,9 +149,6 @@ "notificationMostRecent": "Most recent:", "sendFailed": "Send Failed", "mediaMessage": "Media message", - "timestamp_s": "Now", - "timestamp_m": "1 minute", - "timestamp_h": "1 hour", "messageBodyMissing": "Please enter a message body.", "unblockToSend": "Unblock this contact to send a message.", "unblockGroupToSend": "This group is blocked. Unlock it if you would like to send a message.", diff --git a/preload.js b/preload.js index 8bf26f368..f1d8e21cb 100644 --- a/preload.js +++ b/preload.js @@ -215,24 +215,7 @@ window.getSeedNodeList = () => JSON.parse(config.seedNodeList); const { locale: localFromEnv } = config; window.i18n = i18n.setup(localFromEnv, localeMessages); - -// moment does not support es-419 correctly (and cause white screen on app start) window.moment = require('moment'); - -// Default to the locale from env. It will be overriden if moment -// does not recognize it with what moment knows which is the closest. -// i.e. es-419 will return 'es'. -// We just need to use what we got from moment on the updateLocale below - -const localeSetForMoment = window.moment.locale(localFromEnv); -window.moment.updateLocale(localeSetForMoment, { - relativeTime: { - s: window.i18n('timestamp_s'), - m: window.i18n('timestamp_m'), - h: window.i18n('timestamp_h'), - }, -}); - window.libsession = require('./ts/session'); window.Signal.Data = require('./ts/data/data');