mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 10:23:34 +00:00
Merge branch 'main' into STRAP-54
This commit is contained in:
commit
c700c7f9a8
@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
beforeUpdate() {
|
||||
const ctx = strapi.requestContext.get();
|
||||
|
||||
console.log('User info in service: ', ctx.state.user);
|
||||
},
|
||||
};
|
||||
@ -5,7 +5,7 @@ const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||
module.exports = createCoreRouter('api::address.address', {
|
||||
config: {
|
||||
find: {
|
||||
auth: false,
|
||||
// auth: false,
|
||||
},
|
||||
},
|
||||
only: ['find', 'findOne'],
|
||||
|
||||
10
package.json
10
package.json
@ -87,11 +87,11 @@
|
||||
"husky": "3.1.0",
|
||||
"inquirer": "8.2.4",
|
||||
"istanbul": "~0.4.2",
|
||||
"jest": "29.0.0",
|
||||
"jest-circus": "29.0.0",
|
||||
"jest-cli": "29.0.0",
|
||||
"jest-environment-jsdom": "29.0.0",
|
||||
"jest-watch-typeahead": "0.6.5",
|
||||
"jest": "29.0.3",
|
||||
"jest-circus": "29.0.3",
|
||||
"jest-cli": "29.0.3",
|
||||
"jest-environment-jsdom": "29.0.3",
|
||||
"jest-watch-typeahead": "2.2.0",
|
||||
"lerna": "5.4.3",
|
||||
"lint-staged": "10.5.4",
|
||||
"lodash": "4.17.21",
|
||||
|
||||
@ -22,6 +22,7 @@ import {
|
||||
} from './exposedHooks';
|
||||
import injectionZones from './injectionZones';
|
||||
import favicon from './favicon.ico';
|
||||
import localStorageKey from './components/LanguageProvider/utils/localStorageKey';
|
||||
|
||||
class StrapiApp {
|
||||
constructor({ adminConfig, appPlugins, library, middlewares, reducers }) {
|
||||
@ -457,6 +458,7 @@ class StrapiApp {
|
||||
href: this.configurations.head.favicon,
|
||||
},
|
||||
]}
|
||||
htmlAttributes={{ lang: localStorage.getItem(localStorageKey) || 'en' }}
|
||||
/>
|
||||
<BrowserRouter basename={basename}>
|
||||
<App store={store} />
|
||||
|
||||
@ -65,11 +65,11 @@ const AuthenticatedApp = () => {
|
||||
if (userRoles) {
|
||||
const isUserSuperAdmin = userRoles.find(({ code }) => code === 'strapi-super-admin');
|
||||
|
||||
if (isUserSuperAdmin) {
|
||||
if (isUserSuperAdmin && appInfos?.autoReload) {
|
||||
setGuidedTourVisibilityRef.current(true);
|
||||
}
|
||||
}
|
||||
}, [userRoles]);
|
||||
}, [userRoles, appInfos]);
|
||||
|
||||
// We don't need to wait for the release query to be fetched before rendering the plugins
|
||||
// however, we need the appInfos and the permissions
|
||||
|
||||
@ -175,8 +175,20 @@ describe('Admin | components | AuthenticatedApp', () => {
|
||||
await waitFor(() => expect(setGuidedTourVisibility).not.toHaveBeenCalled());
|
||||
});
|
||||
|
||||
it('should call setGuidedTourVisibility when user is super admin', async () => {
|
||||
it('should not setGuidedTourVisibility when user is a super admin and autoReload is false ', async () => {
|
||||
fetchUserRoles.mockImplementationOnce(() => [{ code: 'strapi-super-admin' }]);
|
||||
fetchAppInfo.mockImplementationOnce(() => ({ autoReload: false }));
|
||||
const setGuidedTourVisibility = jest.fn();
|
||||
useGuidedTour.mockImplementation(() => ({ setGuidedTourVisibility }));
|
||||
|
||||
render(<App />);
|
||||
|
||||
await waitFor(() => expect(setGuidedTourVisibility).not.toHaveBeenCalled());
|
||||
});
|
||||
|
||||
it('should call setGuidedTourVisibility when user is super admin and autoReload is true', async () => {
|
||||
fetchUserRoles.mockImplementationOnce(() => [{ code: 'strapi-super-admin' }]);
|
||||
fetchAppInfo.mockImplementationOnce(() => ({ autoReload: true }));
|
||||
const setGuidedTourVisibility = jest.fn();
|
||||
useGuidedTour.mockImplementation(() => ({ setGuidedTourVisibility }));
|
||||
render(<App />);
|
||||
|
||||
@ -21,6 +21,7 @@ const LanguageProvider = ({ children, localeNames, messages }) => {
|
||||
useEffect(() => {
|
||||
// Set user language in local storage.
|
||||
window.localStorage.setItem(localStorageKey, locale);
|
||||
document.documentElement.setAttribute('lang', locale);
|
||||
}, [locale]);
|
||||
|
||||
const changeLocale = (locale) => {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
import React, { useState } from 'react';
|
||||
import React, { useState, useMemo, useCallback } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ThemeToggleContext } from '../../contexts';
|
||||
|
||||
@ -14,22 +14,33 @@ const getDefaultTheme = () => {
|
||||
const browserTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
||||
const persistedTheme = localStorage.getItem(THEME_KEY);
|
||||
|
||||
if (!persistedTheme) {
|
||||
localStorage.setItem(THEME_KEY, browserTheme);
|
||||
}
|
||||
|
||||
return persistedTheme || browserTheme;
|
||||
};
|
||||
|
||||
const ThemeToggleProvider = ({ children, themes }) => {
|
||||
const [currentTheme, setCurrentTheme] = useState(getDefaultTheme());
|
||||
|
||||
const handleChangeTheme = (nextTheme) => {
|
||||
setCurrentTheme(nextTheme);
|
||||
localStorage.setItem(THEME_KEY, nextTheme);
|
||||
};
|
||||
|
||||
return (
|
||||
<ThemeToggleContext.Provider value={{ currentTheme, onChangeTheme: handleChangeTheme, themes }}>
|
||||
{children}
|
||||
</ThemeToggleContext.Provider>
|
||||
const handleChangeTheme = useCallback(
|
||||
(nextTheme) => {
|
||||
setCurrentTheme(nextTheme);
|
||||
localStorage.setItem(THEME_KEY, nextTheme);
|
||||
},
|
||||
[setCurrentTheme]
|
||||
);
|
||||
|
||||
const themeValues = useMemo(() => {
|
||||
return {
|
||||
currentTheme,
|
||||
onChangeTheme: handleChangeTheme,
|
||||
themes,
|
||||
};
|
||||
}, [currentTheme, handleChangeTheme, themes]);
|
||||
|
||||
return <ThemeToggleContext.Provider value={themeValues}>{children}</ThemeToggleContext.Provider>;
|
||||
};
|
||||
|
||||
ThemeToggleProvider.propTypes = {
|
||||
|
||||
@ -79,6 +79,8 @@ class InputJSON extends React.Component {
|
||||
try {
|
||||
if (value === null) return this.codeMirror.setValue('');
|
||||
|
||||
if (value === 0) return this.codeMirror.setValue('0');
|
||||
|
||||
return this.codeMirror.setValue(value);
|
||||
} catch (err) {
|
||||
return this.setState({ error: true });
|
||||
|
||||
@ -356,7 +356,6 @@
|
||||
"components.FilterOptions.FILTER_TYPES.$lt": "小于",
|
||||
"components.FilterOptions.FILTER_TYPES.$lte": "小于或等于",
|
||||
"components.FilterOptions.FILTER_TYPES.$ne": "不等于",
|
||||
"components.FilterOptions.FILTER_TYPES.$neq": "不等于",
|
||||
"components.FilterOptions.FILTER_TYPES.$notContains": "不包含 (区分大小写)",
|
||||
"components.FilterOptions.FILTER_TYPES.$notNull": "不为空",
|
||||
"components.FilterOptions.FILTER_TYPES.$null": "为空",
|
||||
|
||||
@ -62,6 +62,17 @@ const createContentTypeSchema = (
|
||||
return context.parent.singularName !== value;
|
||||
},
|
||||
})
|
||||
.test({
|
||||
name: 'pluralNameNotAllowed',
|
||||
message: getTrad('error.contentTypeName.reserved-name'),
|
||||
test(value) {
|
||||
if (!value) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !reservedNames.includes(toLower(trim(value)));
|
||||
},
|
||||
})
|
||||
.required(errorsTrads.required),
|
||||
singularName: yup
|
||||
.string()
|
||||
@ -87,6 +98,17 @@ const createContentTypeSchema = (
|
||||
return context.parent.pluralName !== value;
|
||||
},
|
||||
})
|
||||
.test({
|
||||
name: 'singularNameNotAllowed',
|
||||
message: getTrad('error.contentTypeName.reserved-name'),
|
||||
test(value) {
|
||||
if (!value) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !reservedNames.includes(toLower(trim(value)));
|
||||
},
|
||||
})
|
||||
.required(errorsTrads.required),
|
||||
draftAndPublish: yup.boolean(),
|
||||
kind: yup.string().oneOf(['singleType', 'collectionType']),
|
||||
|
||||
@ -17,7 +17,7 @@ const getFilterList = ({ fieldSchema: { type: fieldType, mainField } }) => {
|
||||
value: '$eq',
|
||||
},
|
||||
{
|
||||
intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$neq', defaultMessage: 'is not' },
|
||||
intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$ne', defaultMessage: 'is not' },
|
||||
value: '$ne',
|
||||
},
|
||||
{
|
||||
@ -75,7 +75,7 @@ const getFilterList = ({ fieldSchema: { type: fieldType, mainField } }) => {
|
||||
value: '$eq',
|
||||
},
|
||||
{
|
||||
intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$neq', defaultMessage: 'is not' },
|
||||
intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$ne', defaultMessage: 'is not' },
|
||||
value: '$ne',
|
||||
},
|
||||
{
|
||||
@ -130,7 +130,7 @@ const getFilterList = ({ fieldSchema: { type: fieldType, mainField } }) => {
|
||||
value: '$eq',
|
||||
},
|
||||
{
|
||||
intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$neq', defaultMessage: 'is not' },
|
||||
intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$ne', defaultMessage: 'is not' },
|
||||
value: '$ne',
|
||||
},
|
||||
{
|
||||
@ -199,7 +199,7 @@ const getFilterList = ({ fieldSchema: { type: fieldType, mainField } }) => {
|
||||
value: '$eq',
|
||||
},
|
||||
{
|
||||
intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$neq', defaultMessage: 'is not' },
|
||||
intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$ne', defaultMessage: 'is not' },
|
||||
value: '$ne',
|
||||
},
|
||||
{
|
||||
@ -254,7 +254,7 @@ const getFilterList = ({ fieldSchema: { type: fieldType, mainField } }) => {
|
||||
value: '$eq',
|
||||
},
|
||||
{
|
||||
intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$neq', defaultMessage: 'is not' },
|
||||
intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$ne', defaultMessage: 'is not' },
|
||||
value: '$ne',
|
||||
},
|
||||
{
|
||||
|
||||
@ -21,6 +21,7 @@ const createEntityService = require('./services/entity-service');
|
||||
const createCronService = require('./services/cron');
|
||||
const entityValidator = require('./services/entity-validator');
|
||||
const createTelemetry = require('./services/metrics');
|
||||
const requestContext = require('./services/request-context');
|
||||
const createAuth = require('./services/auth');
|
||||
const createUpdateNotifier = require('./utils/update-notifier');
|
||||
const createStartupLogger = require('./utils/startup-logger');
|
||||
@ -108,6 +109,7 @@ class Strapi {
|
||||
this.log = createLogger(this.config.get('logger', {}));
|
||||
this.cron = createCronService();
|
||||
this.telemetry = createTelemetry(this);
|
||||
this.requestContext = requestContext;
|
||||
|
||||
createUpdateNotifier(this).notify();
|
||||
}
|
||||
|
||||
17
packages/core/strapi/lib/services/request-context.js
Normal file
17
packages/core/strapi/lib/services/request-context.js
Normal file
@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
const { AsyncLocalStorage } = require('async_hooks');
|
||||
|
||||
const storage = new AsyncLocalStorage();
|
||||
|
||||
const requestCtx = {
|
||||
async run(store, cb) {
|
||||
return storage.run(store, cb);
|
||||
},
|
||||
|
||||
get() {
|
||||
return storage.getStore();
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = requestCtx;
|
||||
@ -9,6 +9,7 @@ const { createContentAPI } = require('./content-api');
|
||||
const registerAllRoutes = require('./register-routes');
|
||||
const registerApplicationMiddlewares = require('./register-middlewares');
|
||||
const createKoaApp = require('./koa');
|
||||
const requestCtx = require('../request-context');
|
||||
|
||||
const healthCheck = async (ctx) => {
|
||||
ctx.set('strapi', 'You are so French!');
|
||||
@ -33,6 +34,8 @@ const createServer = (strapi) => {
|
||||
keys: strapi.config.get('server.app.keys'),
|
||||
});
|
||||
|
||||
app.use((ctx, next) => requestCtx.run(ctx, () => next()));
|
||||
|
||||
const router = new Router();
|
||||
|
||||
const routeManager = createRouteManager(strapi);
|
||||
|
||||
@ -33,7 +33,7 @@ const getFilterList = ({ fieldSchema: { type: fieldType, mainField } }) => {
|
||||
value: '$eq',
|
||||
},
|
||||
{
|
||||
intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$neq', defaultMessage: 'is not' },
|
||||
intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$ne', defaultMessage: 'is not' },
|
||||
value: '$ne',
|
||||
},
|
||||
{
|
||||
@ -74,7 +74,7 @@ const getFilterList = ({ fieldSchema: { type: fieldType, mainField } }) => {
|
||||
value: '$eq',
|
||||
},
|
||||
{
|
||||
intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$neq', defaultMessage: 'is not' },
|
||||
intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$ne', defaultMessage: 'is not' },
|
||||
value: '$ne',
|
||||
},
|
||||
{
|
||||
|
||||
@ -43,6 +43,10 @@
|
||||
"code":"am-ET",
|
||||
"name":"Amharic (Ethiopia) (am-ET)"
|
||||
},
|
||||
{
|
||||
"code":"aig",
|
||||
"name":"Antigua and Barbuda Creole English"
|
||||
},
|
||||
{
|
||||
"code":"ar",
|
||||
"name":"Arabic (ar)"
|
||||
@ -171,6 +175,10 @@
|
||||
"code":"ksf-CM",
|
||||
"name":"Bafia (Cameroon) (ksf-CM)"
|
||||
},
|
||||
{
|
||||
"code":"bah",
|
||||
"name":"Bahamas Creole English"
|
||||
},
|
||||
{
|
||||
"code":"bm",
|
||||
"name":"Bambara (bm)"
|
||||
@ -447,6 +455,10 @@
|
||||
"code":"en",
|
||||
"name":"English (en)"
|
||||
},
|
||||
{
|
||||
"code":"en-AI",
|
||||
"name":"English (Anguilla) (en-AI)"
|
||||
},
|
||||
{
|
||||
"code":"en-AS",
|
||||
"name":"English (American Samoa) (en-AS)"
|
||||
@ -455,6 +467,10 @@
|
||||
"code":"en-AU",
|
||||
"name":"English (Australia) (en-AU)"
|
||||
},
|
||||
{
|
||||
"code":"en-AT",
|
||||
"name":"English (Austria) (en-AT)"
|
||||
},
|
||||
{
|
||||
"code":"en-BB",
|
||||
"name":"English (Barbados) (en-BB)"
|
||||
@ -475,6 +491,106 @@
|
||||
"code":"en-BW",
|
||||
"name":"English (Botswana) (en-BW)"
|
||||
},
|
||||
{
|
||||
"code":"en-IO",
|
||||
"name":"English (British Indian Ocean Territory) (en-IO)"
|
||||
},
|
||||
{
|
||||
"code":"en-BI",
|
||||
"name":"English (Burundi) (en-BI)"
|
||||
},
|
||||
{
|
||||
"code":"en-CM",
|
||||
"name":"English (Cameroon) (en-CM)"
|
||||
},
|
||||
{
|
||||
"code":"en-CA",
|
||||
"name":"English (Canada) (en-CA)"
|
||||
},
|
||||
{
|
||||
"code":"en-KY",
|
||||
"name":"English (Cayman Islands) (en-KY)"
|
||||
},
|
||||
{
|
||||
"code":"en-CX",
|
||||
"name":"English (Christmas Island) (en-CX)"
|
||||
},
|
||||
{
|
||||
"code":"en-CC",
|
||||
"name":"English (Cocos [Keeling] Islands) (en-CC)"
|
||||
},
|
||||
{
|
||||
"code":"en-CK",
|
||||
"name":"English (Cook Islands) (en-CK)"
|
||||
},
|
||||
{
|
||||
"code":"en-CY",
|
||||
"name":"English (Cyprus) (en-CY)"
|
||||
},
|
||||
{
|
||||
"code":"en-DK",
|
||||
"name":"English (Denmark) (en-DK)"
|
||||
},
|
||||
{
|
||||
"code":"en-DG",
|
||||
"name":"English (Diego Garcia) (en-DG)"
|
||||
},
|
||||
{
|
||||
"code":"en-DM",
|
||||
"name":"English (Dominica) (en-DM)"
|
||||
},
|
||||
{
|
||||
"code":"en-EG",
|
||||
"name":"English (Egypt) (en-EG)"
|
||||
},
|
||||
{
|
||||
"code":"en-ER",
|
||||
"name":"English (Eritrea) (en-ER)"
|
||||
},
|
||||
{
|
||||
"code":"en-EU",
|
||||
"name":"English (Europe) (en-EU)"
|
||||
},
|
||||
{
|
||||
"code":"en-FK",
|
||||
"name":"English (Falkland Islands) (en-FK)"
|
||||
},
|
||||
{
|
||||
"code":"en-FJ",
|
||||
"name":"English (Fiji) (en-FJ)"
|
||||
},
|
||||
{
|
||||
"code":"en-FI",
|
||||
"name":"English (Finland) (en-FI)"
|
||||
},
|
||||
{
|
||||
"code":"en-GM",
|
||||
"name":"English (Gambia) (en-GM)"
|
||||
},
|
||||
{
|
||||
"code":"en-DE",
|
||||
"name":"English (Germany) (en-DE)"
|
||||
},
|
||||
{
|
||||
"code":"en-GH",
|
||||
"name":"English (Ghana) (en-GH)"
|
||||
},
|
||||
{
|
||||
"code":"en-GI",
|
||||
"name":"English (Gibraltar) (en-GI)"
|
||||
},
|
||||
{
|
||||
"code":"en-GD",
|
||||
"name":"English (Grenada) (en-GD)"
|
||||
},
|
||||
{
|
||||
"code":"en-GU",
|
||||
"name":"English (Guam) (en-GU)"
|
||||
},
|
||||
{
|
||||
"code":"en-GG",
|
||||
"name":"English (Guernsey) (en-GG)"
|
||||
},
|
||||
{
|
||||
"code":"en-CA",
|
||||
"name":"English (Canada) (en-CA)"
|
||||
@ -507,6 +623,50 @@
|
||||
"code":"en-IE",
|
||||
"name":"English (Ireland) (en-IE)"
|
||||
},
|
||||
{
|
||||
"code":"en-IM",
|
||||
"name":"English (Isle of Man) (en-IM)"
|
||||
},
|
||||
{
|
||||
"code":"en-IL",
|
||||
"name":"English (Israel) (en-IL)"
|
||||
},
|
||||
{
|
||||
"code":"en-JM",
|
||||
"name":"English (Jamaica) (en-JM)"
|
||||
},
|
||||
{
|
||||
"code":"en-JE",
|
||||
"name":"English (Jersey) (en-JE)"
|
||||
},
|
||||
{
|
||||
"code":"en-KE",
|
||||
"name":"English (Kenya) (en-KE)"
|
||||
},
|
||||
{
|
||||
"code":"en-KI",
|
||||
"name":"English (Kiribati) (en-KI)"
|
||||
},
|
||||
{
|
||||
"code":"en-LS",
|
||||
"name":"English (Lesotho) (en-LS)"
|
||||
},
|
||||
{
|
||||
"code":"en-MO",
|
||||
"name":"English (Macao SAR China) (en-MO)"
|
||||
},
|
||||
{
|
||||
"code":"en-MG",
|
||||
"name":"English (Madagascar) (en-MG)"
|
||||
},
|
||||
{
|
||||
"code":"en-MW",
|
||||
"name":"English (Malawi) (en-MW)"
|
||||
},
|
||||
{
|
||||
"code":"en-MY",
|
||||
"name":"English (Malaysia) (en-MY)"
|
||||
},
|
||||
{
|
||||
"code":"en-JM",
|
||||
"name":"English (Jamaica) (en-JM)"
|
||||
@ -523,6 +683,42 @@
|
||||
"code":"en-MU",
|
||||
"name":"English (Mauritius) (en-MU)"
|
||||
},
|
||||
{
|
||||
"code":"en-FM",
|
||||
"name":"English (Micronesia) (en-FM)"
|
||||
},
|
||||
{
|
||||
"code":"en-MS",
|
||||
"name":"English (Montserrat) (en-MS)"
|
||||
},
|
||||
{
|
||||
"code":"en-NA",
|
||||
"name":"English (Namibia) (en-NA)"
|
||||
},
|
||||
{
|
||||
"code":"en-NR",
|
||||
"name":"English (Nauru) (en-NR)"
|
||||
},
|
||||
{
|
||||
"code":"en-NL",
|
||||
"name":"English (Netherlands) (en-NL)"
|
||||
},
|
||||
{
|
||||
"code":"en-NZ",
|
||||
"name":"English (New Zealand) (en-NZ)"
|
||||
},
|
||||
{
|
||||
"code":"en-NG",
|
||||
"name":"English (Nigeria) (en-NG)"
|
||||
},
|
||||
{
|
||||
"code":"en-NU",
|
||||
"name":"English (Niue) (en-NU)"
|
||||
},
|
||||
{
|
||||
"code":"en-NF",
|
||||
"name":"English (Norfolk Island) (en-NF)"
|
||||
},
|
||||
{
|
||||
"code":"en-NA",
|
||||
"name":"English (Namibia) (en-NA)"
|
||||
@ -539,6 +735,126 @@
|
||||
"code":"en-PK",
|
||||
"name":"English (Pakistan) (en-PK)"
|
||||
},
|
||||
{
|
||||
"code":"en-PW",
|
||||
"name":"English (Palau) (en-PW)"
|
||||
},
|
||||
{
|
||||
"code":"en-PG",
|
||||
"name":"English (Papua New Guinea) (en-PG)"
|
||||
},
|
||||
{
|
||||
"code":"en-PH",
|
||||
"name":"English (Philippines) (en-PH)"
|
||||
},
|
||||
{
|
||||
"code":"en-PN",
|
||||
"name":"English (Pitcairn Islands) (en-PN)"
|
||||
},
|
||||
{
|
||||
"code":"en-PR",
|
||||
"name":"English (Puerto Rico) (en-PR)"
|
||||
},
|
||||
{
|
||||
"code":"en-RW",
|
||||
"name":"English (Rwanda) (en-RW)"
|
||||
},
|
||||
{
|
||||
"code":"en-WS",
|
||||
"name":"English (Samoa) (en-WS)"
|
||||
},
|
||||
{
|
||||
"code":"en-SA",
|
||||
"name":"English (Saudi Arabia) (en-SA)"
|
||||
},
|
||||
{
|
||||
"code":"en-SC",
|
||||
"name":"English (Seychelles) (en-SC)"
|
||||
},
|
||||
{
|
||||
"code":"en-SL",
|
||||
"name":"English (Sierra Leone) (en-SL)"
|
||||
},
|
||||
{
|
||||
"code":"en-SG",
|
||||
"name":"English (Singapore) (en-SG)"
|
||||
},
|
||||
{
|
||||
"code":"en-SX",
|
||||
"name":"English (Sint Maarten) (en-SX)"
|
||||
},
|
||||
{
|
||||
"code":"en-SI",
|
||||
"name":"English (Slovenia) (en-SI)"
|
||||
},
|
||||
{
|
||||
"code":"en-SB",
|
||||
"name":"English (Solomon Islands) (en-SB)"
|
||||
},
|
||||
{
|
||||
"code":"en-ZA",
|
||||
"name":"English (South Africa) (en-ZA)"
|
||||
},
|
||||
{
|
||||
"code":"en-SS",
|
||||
"name":"English (South Sudan) (en-SS)"
|
||||
},
|
||||
{
|
||||
"code":"en-SH",
|
||||
"name":"English (St Helena) (en-SH)"
|
||||
},
|
||||
{
|
||||
"code":"en-KN",
|
||||
"name":"English (St Kitts & Nevis) (en-KN)"
|
||||
},
|
||||
{
|
||||
"code":"en-LC",
|
||||
"name":"English (St Lucia) (en-LC)"
|
||||
},
|
||||
{
|
||||
"code":"svc",
|
||||
"name":"Vincentian Creole English"
|
||||
},
|
||||
{
|
||||
"code":"vic",
|
||||
"name":"Virgin Islands Creole English"
|
||||
},
|
||||
{
|
||||
"code":"en-SD",
|
||||
"name":"English (Sudan) (en-SD)"
|
||||
},
|
||||
{
|
||||
"code":"en-SZ",
|
||||
"name":"English (Swaziland) (en-SZ)"
|
||||
},
|
||||
{
|
||||
"code":"en-SE",
|
||||
"name":"English (Sweden) (en-SE)"
|
||||
},
|
||||
{
|
||||
"code":"en-CH",
|
||||
"name":"English (Switzerland) (en-CH)"
|
||||
},
|
||||
{
|
||||
"code":"en-TZ",
|
||||
"name":"English (Tanzania) (en-TZ)"
|
||||
},
|
||||
{
|
||||
"code":"en-TK",
|
||||
"name":"English (Tokelau) (en-TK)"
|
||||
},
|
||||
{
|
||||
"code":"en-TO",
|
||||
"name":"English (Tonga) (en-TO)"
|
||||
},
|
||||
{
|
||||
"code":"en-TT",
|
||||
"name":"English (Trinidad and Tobago) (en-TT)"
|
||||
},
|
||||
{
|
||||
"code":"en-TV",
|
||||
"name":"English (Tuvalu) (en-TV)"
|
||||
},
|
||||
{
|
||||
"code":"en-PH",
|
||||
"name":"English (Philippines) (en-PH)"
|
||||
@ -575,6 +891,10 @@
|
||||
"code":"en-US-POSIX",
|
||||
"name":"English (U.S., Computer) (en-US-POSIX)"
|
||||
},
|
||||
{
|
||||
"code":"en-UG",
|
||||
"name":"English (Uganda) (en-UG)"
|
||||
},
|
||||
{
|
||||
"code":"en-GB",
|
||||
"name":"English (United Kingdom) (en-GB)"
|
||||
@ -583,6 +903,14 @@
|
||||
"code":"en-US",
|
||||
"name":"English (United States) (en-US)"
|
||||
},
|
||||
{
|
||||
"code":"en-VU",
|
||||
"name":"English (Vanuatu) (en-VU)"
|
||||
},
|
||||
{
|
||||
"code":"en-ZM",
|
||||
"name":"English (Zambia) (en-ZM)"
|
||||
},
|
||||
{
|
||||
"code":"en-ZW",
|
||||
"name":"English (Zimbabwe) (en-ZW)"
|
||||
@ -1135,6 +1463,10 @@
|
||||
"code":"lv-LV",
|
||||
"name":"Latvian (Latvia) (lv-LV)"
|
||||
},
|
||||
{
|
||||
"code":"lir",
|
||||
"name":"Liberian English"
|
||||
},
|
||||
{
|
||||
"code":"ln",
|
||||
"name":"Lingala (ln)"
|
||||
@ -1324,20 +1656,20 @@
|
||||
"name":"Nepali (Nepal) (ne-NP)"
|
||||
},
|
||||
{
|
||||
"code": "se",
|
||||
"name": "Northern Sami"
|
||||
"code":"se",
|
||||
"name":"Northern Sami"
|
||||
},
|
||||
{
|
||||
"code": "se-FI",
|
||||
"name": "Northern Sami (Finland)"
|
||||
"code":"se-FI",
|
||||
"name":"Northern Sami (Finland)"
|
||||
},
|
||||
{
|
||||
"code": "se-NO",
|
||||
"name": "Northern Sami (Norway)"
|
||||
"code":"se-NO",
|
||||
"name":"Northern Sami (Norway)"
|
||||
},
|
||||
{
|
||||
"code": "se-SE",
|
||||
"name": "Northern Sami (Sweden)"
|
||||
"code":"se-SE",
|
||||
"name":"Northern Sami (Sweden)"
|
||||
},
|
||||
{
|
||||
"code":"nd",
|
||||
@ -1939,6 +2271,10 @@
|
||||
"code":"tr-TR",
|
||||
"name":"Turkish (Turkey) (tr-TR)"
|
||||
},
|
||||
{
|
||||
"code":"tch",
|
||||
"name":"Turks And Caicos Creole English"
|
||||
},
|
||||
{
|
||||
"code":"uk",
|
||||
"name":"Ukrainian (uk)"
|
||||
@ -1960,12 +2296,12 @@
|
||||
"name":"Urdu (Pakistan) (ur-PK)"
|
||||
},
|
||||
{
|
||||
"code": "ug",
|
||||
"name": "Uyghur"
|
||||
"code":"ug",
|
||||
"name":"Uyghur"
|
||||
},
|
||||
{
|
||||
"code": "ug-CN",
|
||||
"name": "Uyghur (China)"
|
||||
"code":"ug-CN",
|
||||
"name":"Uyghur (China)"
|
||||
},
|
||||
{
|
||||
"code":"uz",
|
||||
|
||||
@ -46,6 +46,10 @@ exports[`ISO locales getIsoLocales 1`] = `
|
||||
"code": "am-ET",
|
||||
"name": "Amharic (Ethiopia) (am-ET)",
|
||||
},
|
||||
{
|
||||
"code": "aig",
|
||||
"name": "Antigua and Barbuda Creole English",
|
||||
},
|
||||
{
|
||||
"code": "ar",
|
||||
"name": "Arabic (ar)",
|
||||
@ -174,6 +178,10 @@ exports[`ISO locales getIsoLocales 1`] = `
|
||||
"code": "ksf-CM",
|
||||
"name": "Bafia (Cameroon) (ksf-CM)",
|
||||
},
|
||||
{
|
||||
"code": "bah",
|
||||
"name": "Bahamas Creole English",
|
||||
},
|
||||
{
|
||||
"code": "bm",
|
||||
"name": "Bambara (bm)",
|
||||
@ -450,6 +458,10 @@ exports[`ISO locales getIsoLocales 1`] = `
|
||||
"code": "en",
|
||||
"name": "English (en)",
|
||||
},
|
||||
{
|
||||
"code": "en-AI",
|
||||
"name": "English (Anguilla) (en-AI)",
|
||||
},
|
||||
{
|
||||
"code": "en-AS",
|
||||
"name": "English (American Samoa) (en-AS)",
|
||||
@ -458,6 +470,10 @@ exports[`ISO locales getIsoLocales 1`] = `
|
||||
"code": "en-AU",
|
||||
"name": "English (Australia) (en-AU)",
|
||||
},
|
||||
{
|
||||
"code": "en-AT",
|
||||
"name": "English (Austria) (en-AT)",
|
||||
},
|
||||
{
|
||||
"code": "en-BB",
|
||||
"name": "English (Barbados) (en-BB)",
|
||||
@ -478,6 +494,106 @@ exports[`ISO locales getIsoLocales 1`] = `
|
||||
"code": "en-BW",
|
||||
"name": "English (Botswana) (en-BW)",
|
||||
},
|
||||
{
|
||||
"code": "en-IO",
|
||||
"name": "English (British Indian Ocean Territory) (en-IO)",
|
||||
},
|
||||
{
|
||||
"code": "en-BI",
|
||||
"name": "English (Burundi) (en-BI)",
|
||||
},
|
||||
{
|
||||
"code": "en-CM",
|
||||
"name": "English (Cameroon) (en-CM)",
|
||||
},
|
||||
{
|
||||
"code": "en-CA",
|
||||
"name": "English (Canada) (en-CA)",
|
||||
},
|
||||
{
|
||||
"code": "en-KY",
|
||||
"name": "English (Cayman Islands) (en-KY)",
|
||||
},
|
||||
{
|
||||
"code": "en-CX",
|
||||
"name": "English (Christmas Island) (en-CX)",
|
||||
},
|
||||
{
|
||||
"code": "en-CC",
|
||||
"name": "English (Cocos [Keeling] Islands) (en-CC)",
|
||||
},
|
||||
{
|
||||
"code": "en-CK",
|
||||
"name": "English (Cook Islands) (en-CK)",
|
||||
},
|
||||
{
|
||||
"code": "en-CY",
|
||||
"name": "English (Cyprus) (en-CY)",
|
||||
},
|
||||
{
|
||||
"code": "en-DK",
|
||||
"name": "English (Denmark) (en-DK)",
|
||||
},
|
||||
{
|
||||
"code": "en-DG",
|
||||
"name": "English (Diego Garcia) (en-DG)",
|
||||
},
|
||||
{
|
||||
"code": "en-DM",
|
||||
"name": "English (Dominica) (en-DM)",
|
||||
},
|
||||
{
|
||||
"code": "en-EG",
|
||||
"name": "English (Egypt) (en-EG)",
|
||||
},
|
||||
{
|
||||
"code": "en-ER",
|
||||
"name": "English (Eritrea) (en-ER)",
|
||||
},
|
||||
{
|
||||
"code": "en-EU",
|
||||
"name": "English (Europe) (en-EU)",
|
||||
},
|
||||
{
|
||||
"code": "en-FK",
|
||||
"name": "English (Falkland Islands) (en-FK)",
|
||||
},
|
||||
{
|
||||
"code": "en-FJ",
|
||||
"name": "English (Fiji) (en-FJ)",
|
||||
},
|
||||
{
|
||||
"code": "en-FI",
|
||||
"name": "English (Finland) (en-FI)",
|
||||
},
|
||||
{
|
||||
"code": "en-GM",
|
||||
"name": "English (Gambia) (en-GM)",
|
||||
},
|
||||
{
|
||||
"code": "en-DE",
|
||||
"name": "English (Germany) (en-DE)",
|
||||
},
|
||||
{
|
||||
"code": "en-GH",
|
||||
"name": "English (Ghana) (en-GH)",
|
||||
},
|
||||
{
|
||||
"code": "en-GI",
|
||||
"name": "English (Gibraltar) (en-GI)",
|
||||
},
|
||||
{
|
||||
"code": "en-GD",
|
||||
"name": "English (Grenada) (en-GD)",
|
||||
},
|
||||
{
|
||||
"code": "en-GU",
|
||||
"name": "English (Guam) (en-GU)",
|
||||
},
|
||||
{
|
||||
"code": "en-GG",
|
||||
"name": "English (Guernsey) (en-GG)",
|
||||
},
|
||||
{
|
||||
"code": "en-CA",
|
||||
"name": "English (Canada) (en-CA)",
|
||||
@ -510,6 +626,50 @@ exports[`ISO locales getIsoLocales 1`] = `
|
||||
"code": "en-IE",
|
||||
"name": "English (Ireland) (en-IE)",
|
||||
},
|
||||
{
|
||||
"code": "en-IM",
|
||||
"name": "English (Isle of Man) (en-IM)",
|
||||
},
|
||||
{
|
||||
"code": "en-IL",
|
||||
"name": "English (Israel) (en-IL)",
|
||||
},
|
||||
{
|
||||
"code": "en-JM",
|
||||
"name": "English (Jamaica) (en-JM)",
|
||||
},
|
||||
{
|
||||
"code": "en-JE",
|
||||
"name": "English (Jersey) (en-JE)",
|
||||
},
|
||||
{
|
||||
"code": "en-KE",
|
||||
"name": "English (Kenya) (en-KE)",
|
||||
},
|
||||
{
|
||||
"code": "en-KI",
|
||||
"name": "English (Kiribati) (en-KI)",
|
||||
},
|
||||
{
|
||||
"code": "en-LS",
|
||||
"name": "English (Lesotho) (en-LS)",
|
||||
},
|
||||
{
|
||||
"code": "en-MO",
|
||||
"name": "English (Macao SAR China) (en-MO)",
|
||||
},
|
||||
{
|
||||
"code": "en-MG",
|
||||
"name": "English (Madagascar) (en-MG)",
|
||||
},
|
||||
{
|
||||
"code": "en-MW",
|
||||
"name": "English (Malawi) (en-MW)",
|
||||
},
|
||||
{
|
||||
"code": "en-MY",
|
||||
"name": "English (Malaysia) (en-MY)",
|
||||
},
|
||||
{
|
||||
"code": "en-JM",
|
||||
"name": "English (Jamaica) (en-JM)",
|
||||
@ -526,6 +686,42 @@ exports[`ISO locales getIsoLocales 1`] = `
|
||||
"code": "en-MU",
|
||||
"name": "English (Mauritius) (en-MU)",
|
||||
},
|
||||
{
|
||||
"code": "en-FM",
|
||||
"name": "English (Micronesia) (en-FM)",
|
||||
},
|
||||
{
|
||||
"code": "en-MS",
|
||||
"name": "English (Montserrat) (en-MS)",
|
||||
},
|
||||
{
|
||||
"code": "en-NA",
|
||||
"name": "English (Namibia) (en-NA)",
|
||||
},
|
||||
{
|
||||
"code": "en-NR",
|
||||
"name": "English (Nauru) (en-NR)",
|
||||
},
|
||||
{
|
||||
"code": "en-NL",
|
||||
"name": "English (Netherlands) (en-NL)",
|
||||
},
|
||||
{
|
||||
"code": "en-NZ",
|
||||
"name": "English (New Zealand) (en-NZ)",
|
||||
},
|
||||
{
|
||||
"code": "en-NG",
|
||||
"name": "English (Nigeria) (en-NG)",
|
||||
},
|
||||
{
|
||||
"code": "en-NU",
|
||||
"name": "English (Niue) (en-NU)",
|
||||
},
|
||||
{
|
||||
"code": "en-NF",
|
||||
"name": "English (Norfolk Island) (en-NF)",
|
||||
},
|
||||
{
|
||||
"code": "en-NA",
|
||||
"name": "English (Namibia) (en-NA)",
|
||||
@ -542,6 +738,126 @@ exports[`ISO locales getIsoLocales 1`] = `
|
||||
"code": "en-PK",
|
||||
"name": "English (Pakistan) (en-PK)",
|
||||
},
|
||||
{
|
||||
"code": "en-PW",
|
||||
"name": "English (Palau) (en-PW)",
|
||||
},
|
||||
{
|
||||
"code": "en-PG",
|
||||
"name": "English (Papua New Guinea) (en-PG)",
|
||||
},
|
||||
{
|
||||
"code": "en-PH",
|
||||
"name": "English (Philippines) (en-PH)",
|
||||
},
|
||||
{
|
||||
"code": "en-PN",
|
||||
"name": "English (Pitcairn Islands) (en-PN)",
|
||||
},
|
||||
{
|
||||
"code": "en-PR",
|
||||
"name": "English (Puerto Rico) (en-PR)",
|
||||
},
|
||||
{
|
||||
"code": "en-RW",
|
||||
"name": "English (Rwanda) (en-RW)",
|
||||
},
|
||||
{
|
||||
"code": "en-WS",
|
||||
"name": "English (Samoa) (en-WS)",
|
||||
},
|
||||
{
|
||||
"code": "en-SA",
|
||||
"name": "English (Saudi Arabia) (en-SA)",
|
||||
},
|
||||
{
|
||||
"code": "en-SC",
|
||||
"name": "English (Seychelles) (en-SC)",
|
||||
},
|
||||
{
|
||||
"code": "en-SL",
|
||||
"name": "English (Sierra Leone) (en-SL)",
|
||||
},
|
||||
{
|
||||
"code": "en-SG",
|
||||
"name": "English (Singapore) (en-SG)",
|
||||
},
|
||||
{
|
||||
"code": "en-SX",
|
||||
"name": "English (Sint Maarten) (en-SX)",
|
||||
},
|
||||
{
|
||||
"code": "en-SI",
|
||||
"name": "English (Slovenia) (en-SI)",
|
||||
},
|
||||
{
|
||||
"code": "en-SB",
|
||||
"name": "English (Solomon Islands) (en-SB)",
|
||||
},
|
||||
{
|
||||
"code": "en-ZA",
|
||||
"name": "English (South Africa) (en-ZA)",
|
||||
},
|
||||
{
|
||||
"code": "en-SS",
|
||||
"name": "English (South Sudan) (en-SS)",
|
||||
},
|
||||
{
|
||||
"code": "en-SH",
|
||||
"name": "English (St Helena) (en-SH)",
|
||||
},
|
||||
{
|
||||
"code": "en-KN",
|
||||
"name": "English (St Kitts & Nevis) (en-KN)",
|
||||
},
|
||||
{
|
||||
"code": "en-LC",
|
||||
"name": "English (St Lucia) (en-LC)",
|
||||
},
|
||||
{
|
||||
"code": "svc",
|
||||
"name": "Vincentian Creole English",
|
||||
},
|
||||
{
|
||||
"code": "vic",
|
||||
"name": "Virgin Islands Creole English",
|
||||
},
|
||||
{
|
||||
"code": "en-SD",
|
||||
"name": "English (Sudan) (en-SD)",
|
||||
},
|
||||
{
|
||||
"code": "en-SZ",
|
||||
"name": "English (Swaziland) (en-SZ)",
|
||||
},
|
||||
{
|
||||
"code": "en-SE",
|
||||
"name": "English (Sweden) (en-SE)",
|
||||
},
|
||||
{
|
||||
"code": "en-CH",
|
||||
"name": "English (Switzerland) (en-CH)",
|
||||
},
|
||||
{
|
||||
"code": "en-TZ",
|
||||
"name": "English (Tanzania) (en-TZ)",
|
||||
},
|
||||
{
|
||||
"code": "en-TK",
|
||||
"name": "English (Tokelau) (en-TK)",
|
||||
},
|
||||
{
|
||||
"code": "en-TO",
|
||||
"name": "English (Tonga) (en-TO)",
|
||||
},
|
||||
{
|
||||
"code": "en-TT",
|
||||
"name": "English (Trinidad and Tobago) (en-TT)",
|
||||
},
|
||||
{
|
||||
"code": "en-TV",
|
||||
"name": "English (Tuvalu) (en-TV)",
|
||||
},
|
||||
{
|
||||
"code": "en-PH",
|
||||
"name": "English (Philippines) (en-PH)",
|
||||
@ -578,6 +894,10 @@ exports[`ISO locales getIsoLocales 1`] = `
|
||||
"code": "en-US-POSIX",
|
||||
"name": "English (U.S., Computer) (en-US-POSIX)",
|
||||
},
|
||||
{
|
||||
"code": "en-UG",
|
||||
"name": "English (Uganda) (en-UG)",
|
||||
},
|
||||
{
|
||||
"code": "en-GB",
|
||||
"name": "English (United Kingdom) (en-GB)",
|
||||
@ -586,6 +906,14 @@ exports[`ISO locales getIsoLocales 1`] = `
|
||||
"code": "en-US",
|
||||
"name": "English (United States) (en-US)",
|
||||
},
|
||||
{
|
||||
"code": "en-VU",
|
||||
"name": "English (Vanuatu) (en-VU)",
|
||||
},
|
||||
{
|
||||
"code": "en-ZM",
|
||||
"name": "English (Zambia) (en-ZM)",
|
||||
},
|
||||
{
|
||||
"code": "en-ZW",
|
||||
"name": "English (Zimbabwe) (en-ZW)",
|
||||
@ -1138,6 +1466,10 @@ exports[`ISO locales getIsoLocales 1`] = `
|
||||
"code": "lv-LV",
|
||||
"name": "Latvian (Latvia) (lv-LV)",
|
||||
},
|
||||
{
|
||||
"code": "lir",
|
||||
"name": "Liberian English",
|
||||
},
|
||||
{
|
||||
"code": "ln",
|
||||
"name": "Lingala (ln)",
|
||||
@ -1942,6 +2274,10 @@ exports[`ISO locales getIsoLocales 1`] = `
|
||||
"code": "tr-TR",
|
||||
"name": "Turkish (Turkey) (tr-TR)",
|
||||
},
|
||||
{
|
||||
"code": "tch",
|
||||
"name": "Turks And Caicos Creole English",
|
||||
},
|
||||
{
|
||||
"code": "uk",
|
||||
"name": "Ukrainian (uk)",
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
"test": "echo \"no tests yet\""
|
||||
},
|
||||
"dependencies": {
|
||||
"aws-sdk": "2.1208.0",
|
||||
"aws-sdk": "2.1215.0",
|
||||
"lodash": "4.17.21"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user