|
|
|
@ -115,11 +115,22 @@ export const trendsAsLanding = getMeta('trends_as_landing_page');
|
|
|
|
|
export const useBlurhash = getMeta('use_blurhash');
|
|
|
|
|
export const usePendingItems = getMeta('use_pending_items');
|
|
|
|
|
export const version = getMeta('version');
|
|
|
|
|
export const languages = initialState?.languages;
|
|
|
|
|
export const criticalUpdatesPending = initialState?.critical_updates_pending;
|
|
|
|
|
export const statusPageUrl = getMeta('status_page_url');
|
|
|
|
|
export const sso_redirect = getMeta('sso_redirect');
|
|
|
|
|
export const termsOfServiceEnabled = getMeta('terms_of_service_enabled');
|
|
|
|
|
|
|
|
|
|
const displayNames = Intl.DisplayNames && new Intl.DisplayNames(getMeta('locale'), {
|
|
|
|
|
type: 'language',
|
|
|
|
|
fallback: 'none',
|
|
|
|
|
languageDisplay: 'standard',
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export const languages = initialState?.languages?.map(lang => {
|
|
|
|
|
// zh-YUE is not a valid CLDR unicode_language_id
|
|
|
|
|
return [lang[0], displayNames?.of(lang[0].replace('zh-YUE', 'yue')) || lang[1], lang[2]];
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @returns {string | undefined}
|
|
|
|
|
*/
|
|
|
|
|