[Glitch] Fix /share and cleanup and reorganize frontend locale loading

Port b0780cfeed to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Renaud Chaput
2023-06-02 15:00:27 +02:00
committed by Claire
parent 734e186717
commit 9e66c07be7
14 changed files with 151 additions and 86 deletions

View File

@ -1,7 +1,7 @@
import 'packs/public-path';
import { createRoot } from 'react-dom/client';
import * as IntlMessageFormat from 'intl-messageformat';
import { IntlMessageFormat } from 'intl-messageformat';
import { defineMessages } from 'react-intl';
import { delegate } from '@rails/ujs';
@ -12,10 +12,9 @@ import { throttle } from 'lodash';
import { timeAgoString } from 'flavours/glitch/components/relative_timestamp';
import emojify from 'flavours/glitch/features/emoji/emoji';
import loadKeyboardExtensions from 'flavours/glitch/load_keyboard_extensions';
import { loadLocale } from 'flavours/glitch/load_locale';
import { loadLocale, getLocale } from 'flavours/glitch/locales';
import { loadPolyfills } from 'flavours/glitch/polyfills';
import ready from 'flavours/glitch/ready';
import { getLocale } from 'locales';
const messages = defineMessages({
usernameTaken: { id: 'username.taken', defaultMessage: 'That username is taken. Try another' },
@ -24,7 +23,7 @@ const messages = defineMessages({
});
function main() {
const { localeData } = getLocale();
const { messages: localeData } = getLocale();
const scrollToDetailedStatus = () => {
const history = createBrowserHistory();