Merge remote-tracking branch 'overseerr/develop' into develop
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Crew } from '../../server/models/common';
|
||||
import type { Crew } from '@server/models/common';
|
||||
const priorityJobs = [
|
||||
'Director',
|
||||
'Creator',
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import axios, { AxiosError, AxiosResponse } from 'axios';
|
||||
import type { AxiosError, AxiosResponse } from 'axios';
|
||||
import axios from 'axios';
|
||||
|
||||
interface JellyfinAuthenticationResult {
|
||||
Id: string;
|
||||
|
||||
37
src/utils/polyfillIntl.ts
Normal file
37
src/utils/polyfillIntl.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import { shouldPolyfill as shouldPolyfillDisplayNames } from '@formatjs/intl-displaynames/should-polyfill';
|
||||
import { shouldPolyfill as shouldPolyfillLocale } from '@formatjs/intl-locale/should-polyfill';
|
||||
import { shouldPolyfill as shouldPolyfillPluralrules } from '@formatjs/intl-pluralrules/should-polyfill';
|
||||
|
||||
const polyfillLocale = async () => {
|
||||
if (shouldPolyfillLocale()) {
|
||||
await import('@formatjs/intl-locale/polyfill');
|
||||
}
|
||||
};
|
||||
|
||||
const polyfillPluralRules = async (locale: string) => {
|
||||
const unsupportedLocale = shouldPolyfillPluralrules(locale);
|
||||
// This locale is supported
|
||||
if (!unsupportedLocale) {
|
||||
return;
|
||||
}
|
||||
// Load the polyfill 1st BEFORE loading data
|
||||
await import('@formatjs/intl-pluralrules/polyfill-force');
|
||||
await import(`@formatjs/intl-pluralrules/locale-data/${unsupportedLocale}`);
|
||||
};
|
||||
|
||||
const polyfillDisplayNames = async (locale: string) => {
|
||||
const unsupportedLocale = shouldPolyfillDisplayNames(locale);
|
||||
// This locale is supported
|
||||
if (!unsupportedLocale) {
|
||||
return;
|
||||
}
|
||||
// Load the polyfill 1st BEFORE loading data
|
||||
await import('@formatjs/intl-displaynames/polyfill-force');
|
||||
await import(`@formatjs/intl-displaynames/locale-data/${unsupportedLocale}`);
|
||||
};
|
||||
|
||||
export const polyfillIntl = async (locale: string) => {
|
||||
await polyfillLocale();
|
||||
await polyfillPluralRules(locale);
|
||||
await polyfillDisplayNames(locale);
|
||||
};
|
||||
Reference in New Issue
Block a user