Merge pull request #1478 from Bilb/fix-es-419-moment-locale

fallback to es for moment when given locale is es-419
pull/1494/head
Audric Ackermann 4 years ago committed by GitHub
commit 9400ec9e1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -394,14 +394,17 @@ const Attachments = require('./app/attachments');
const { locale } = config;
window.i18n = i18n.setup(locale, localeMessages);
window.moment.updateLocale(locale, {
// moment does not support es-419 correctly (and cause white screen on app start)
const localeForMoment = locale === 'es-419' ? 'es' : locale;
window.moment.updateLocale(localeForMoment, {
relativeTime: {
s: window.i18n('timestamp_s'),
m: window.i18n('timestamp_m'),
h: window.i18n('timestamp_h'),
},
});
window.moment.locale(locale);
window.moment.locale(localeForMoment);
window.Signal = Signal.setup({
Attachments,

Loading…
Cancel
Save