mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 10:55:37 +00:00
Merge branch 'main' into feature/relations-main-view
This commit is contained in:
commit
4e8d012b3d
1
.github/workflows/nightly.yml
vendored
1
.github/workflows/nightly.yml
vendored
@ -9,6 +9,7 @@ jobs:
|
||||
publish:
|
||||
name: 'Publish'
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'strapi/strapi'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup npmrc
|
||||
|
||||
@ -51,6 +51,7 @@ module.exports = {
|
||||
'<rootDir>/packages/admin-test-utils/lib/setup/styled-components.js',
|
||||
'<rootDir>/packages/admin-test-utils/lib/setup/strapi.js',
|
||||
],
|
||||
testEnvironment: 'jsdom',
|
||||
transform: {
|
||||
'^.+\\.js$': ['@swc/jest', { jsc: { parser: { jsx: true, dynamicImport: true } } }],
|
||||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
|
||||
|
||||
@ -87,9 +87,10 @@
|
||||
"husky": "3.1.0",
|
||||
"inquirer": "8.2.4",
|
||||
"istanbul": "~0.4.2",
|
||||
"jest": "26.6.3",
|
||||
"jest-circus": "26.6.3",
|
||||
"jest-cli": "26.6.3",
|
||||
"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",
|
||||
"lerna": "5.4.3",
|
||||
"lint-staged": "10.5.4",
|
||||
|
||||
@ -17,6 +17,7 @@ function SelectMany({
|
||||
name,
|
||||
isDisabled,
|
||||
isLoading,
|
||||
loadingMessage,
|
||||
onInputChange,
|
||||
onMenuClose,
|
||||
onMenuOpen,
|
||||
@ -61,6 +62,7 @@ function SelectMany({
|
||||
}}
|
||||
mainField={mainField}
|
||||
isLoading={isLoading}
|
||||
loadingMessage={loadingMessage}
|
||||
isMulti
|
||||
isSearchable
|
||||
options={options}
|
||||
@ -119,6 +121,7 @@ SelectMany.propTypes = {
|
||||
displayNavigationLink: PropTypes.bool.isRequired,
|
||||
isDisabled: PropTypes.bool.isRequired,
|
||||
isLoading: PropTypes.bool.isRequired,
|
||||
loadingMessage: PropTypes.string.isRequired,
|
||||
mainField: PropTypes.shape({
|
||||
name: PropTypes.string.isRequired,
|
||||
schema: PropTypes.shape({
|
||||
|
||||
@ -14,6 +14,7 @@ function SelectOne({
|
||||
name,
|
||||
isDisabled,
|
||||
isLoading,
|
||||
loadingMessage,
|
||||
onChange,
|
||||
onInputChange,
|
||||
onMenuClose,
|
||||
@ -37,6 +38,7 @@ function SelectOne({
|
||||
isClearable
|
||||
isDisabled={isDisabled}
|
||||
isLoading={isLoading}
|
||||
loadingMessage={loadingMessage}
|
||||
mainField={mainField}
|
||||
options={options}
|
||||
onChange={onChange}
|
||||
@ -70,6 +72,7 @@ SelectOne.propTypes = {
|
||||
components: PropTypes.object,
|
||||
isDisabled: PropTypes.bool.isRequired,
|
||||
isLoading: PropTypes.bool.isRequired,
|
||||
loadingMessage: PropTypes.string.isRequired,
|
||||
mainField: PropTypes.shape({
|
||||
name: PropTypes.string.isRequired,
|
||||
schema: PropTypes.shape({
|
||||
|
||||
@ -284,6 +284,12 @@ function SelectWrapper({
|
||||
isDisabled={isDisabled}
|
||||
isLoading={isLoading}
|
||||
isClearable
|
||||
loadingMessage={() =>
|
||||
formatMessage({
|
||||
id: getTrad('DynamicTable.relation-loading'),
|
||||
defaultMessage: 'Relations are loading',
|
||||
})
|
||||
}
|
||||
mainField={mainField}
|
||||
name={name}
|
||||
options={filteredOptions}
|
||||
|
||||
@ -29,16 +29,16 @@ const StyledTable = styled.table`
|
||||
const displayedData = {
|
||||
headers: {
|
||||
default: [
|
||||
'Settings.webhooks.events.create',
|
||||
'Settings.webhooks.events.update',
|
||||
'app.utils.delete',
|
||||
{ id: 'Settings.webhooks.events.create', defaultMessage: 'Create' },
|
||||
{ id: 'Settings.webhooks.events.update', defaultMessage: 'Update' },
|
||||
{ id: 'app.utils.delete', defaultMessage: 'Delete' },
|
||||
],
|
||||
draftAndPublish: [
|
||||
'Settings.webhooks.events.create',
|
||||
'Settings.webhooks.events.update',
|
||||
'app.utils.delete',
|
||||
'app.utils.publish',
|
||||
'app.utils.unpublish',
|
||||
{ id: 'Settings.webhooks.events.create', defaultMessage: 'Create' },
|
||||
{ id: 'Settings.webhooks.events.update', defaultMessage: 'Update' },
|
||||
{ id: 'app.utils.delete', defaultMessage: 'Delete' },
|
||||
{ id: 'app.utils.publish', defaultMessage: 'Publish' },
|
||||
{ id: 'app.utils.unpublish', defaultMessage: 'Unpublish' },
|
||||
],
|
||||
},
|
||||
events: {
|
||||
@ -122,7 +122,7 @@ const EventInput = ({ isDraftAndPublish }) => {
|
||||
})}
|
||||
>
|
||||
<Typography variant="sigma" textColor="neutral600">
|
||||
{formatMessage({ id: header, defaultMessage: header })}
|
||||
{formatMessage(header)}
|
||||
</Typography>
|
||||
</td>
|
||||
);
|
||||
@ -131,7 +131,7 @@ const EventInput = ({ isDraftAndPublish }) => {
|
||||
return (
|
||||
<td key={header}>
|
||||
<Typography variant="sigma" textColor="neutral600">
|
||||
{formatMessage({ id: header, defaultMessage: header })}
|
||||
{formatMessage(header)}
|
||||
</Typography>
|
||||
</td>
|
||||
);
|
||||
|
||||
@ -416,6 +416,7 @@
|
||||
"app.utils.defaultMessage": " ",
|
||||
"app.utils.duplicate": "Duplicate",
|
||||
"app.utils.edit": "Edit",
|
||||
"app.utils.delete": "Delete",
|
||||
"app.utils.errors.file-too-big.message": "The file is too big",
|
||||
"app.utils.filter-value": "Filter value",
|
||||
"app.utils.filters": "Filters",
|
||||
|
||||
@ -314,6 +314,7 @@
|
||||
"app.utils.defaultMessage": " ",
|
||||
"app.utils.duplicate": "Dupliquer",
|
||||
"app.utils.edit": "Modifier",
|
||||
"app.utils.delete": "Supprimer",
|
||||
"app.utils.errors.file-too-big.message": "Le fichier est trop lourd",
|
||||
"app.utils.filter-value": "Valeur du filtre",
|
||||
"app.utils.filters": "Filtres",
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
"bcryptjs": "2.4.3",
|
||||
"chalk": "^4.1.1",
|
||||
"chokidar": "^3.5.1",
|
||||
"codemirror": "^5.65.6",
|
||||
"codemirror": "^5.65.8",
|
||||
"cross-env": "^7.0.3",
|
||||
"css-loader": "6.7.1",
|
||||
"date-fns": "2.29.2",
|
||||
@ -145,7 +145,7 @@
|
||||
"glob": "8.0.3",
|
||||
"react-test-renderer": "^17.0.2",
|
||||
"speed-measure-webpack-plugin": "1.5.0",
|
||||
"webpack-bundle-analyzer": "^4.5.0"
|
||||
"webpack-bundle-analyzer": "^4.6.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@strapi/strapi": "^4.3.4"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -12,16 +12,16 @@ describe('Configuration settings service', () => {
|
||||
const settings = await settingsService.createDefaultSettings(schema);
|
||||
|
||||
expect(settings).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"bulkable": true,
|
||||
"defaultSortBy": "id",
|
||||
"defaultSortOrder": "ASC",
|
||||
"filterable": true,
|
||||
"mainField": "id",
|
||||
"pageSize": 10,
|
||||
"searchable": true,
|
||||
}
|
||||
`);
|
||||
{
|
||||
"bulkable": true,
|
||||
"defaultSortBy": "id",
|
||||
"defaultSortOrder": "ASC",
|
||||
"filterable": true,
|
||||
"mainField": "id",
|
||||
"pageSize": 10,
|
||||
"searchable": true,
|
||||
}
|
||||
`);
|
||||
});
|
||||
|
||||
test('uses id as mainField by default', async () => {
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Content types service format ContentType Returns consistent schemas 1`] = `
|
||||
Object {
|
||||
{
|
||||
"apiID": "my-name",
|
||||
"plugin": "some-plugin",
|
||||
"schema": Object {
|
||||
"attributes": Object {
|
||||
"title": Object {
|
||||
"schema": {
|
||||
"attributes": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
},
|
||||
},
|
||||
@ -15,8 +15,8 @@ Object {
|
||||
"displayName": "My name",
|
||||
"draftAndPublish": false,
|
||||
"kind": "singleType",
|
||||
"pluginOptions": Object {
|
||||
"content-manager": Object {
|
||||
"pluginOptions": {
|
||||
"content-manager": {
|
||||
"visible": true,
|
||||
},
|
||||
},
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Content Type Builder - Content types Collection Types Get collection type returns full schema and information 1`] = `
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"apiID": "test-collection-type",
|
||||
"schema": Object {
|
||||
"attributes": Object {
|
||||
"title": Object {
|
||||
"pluginOptions": Object {
|
||||
"i18n": Object {
|
||||
"schema": {
|
||||
"attributes": {
|
||||
"title": {
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true,
|
||||
},
|
||||
},
|
||||
@ -20,8 +20,8 @@ Object {
|
||||
"displayName": "Test Collection Type",
|
||||
"draftAndPublish": false,
|
||||
"kind": "collectionType",
|
||||
"pluginOptions": Object {
|
||||
"i18n": Object {
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true,
|
||||
},
|
||||
},
|
||||
@ -36,12 +36,12 @@ Object {
|
||||
`;
|
||||
|
||||
exports[`Content Type Builder - Content types Collection Types Get collection type returns full schema and informations with draftAndPublish 1`] = `
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"apiID": "ct-with-dp",
|
||||
"schema": Object {
|
||||
"attributes": Object {
|
||||
"title": Object {
|
||||
"schema": {
|
||||
"attributes": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
},
|
||||
},
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Content Type Builder - Content types Single Types Get single type returns full schema and information 1`] = `
|
||||
Object {
|
||||
"data": Object {
|
||||
{
|
||||
"data": {
|
||||
"apiID": "test-single-type",
|
||||
"schema": Object {
|
||||
"attributes": Object {
|
||||
"title": Object {
|
||||
"pluginOptions": Object {
|
||||
"i18n": Object {
|
||||
"schema": {
|
||||
"attributes": {
|
||||
"title": {
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true,
|
||||
},
|
||||
},
|
||||
@ -20,8 +20,8 @@ Object {
|
||||
"displayName": "Test Single Type",
|
||||
"draftAndPublish": false,
|
||||
"kind": "singleType",
|
||||
"pluginOptions": Object {
|
||||
"i18n": Object {
|
||||
"pluginOptions": {
|
||||
"i18n": {
|
||||
"localized": true,
|
||||
},
|
||||
},
|
||||
|
||||
@ -21,6 +21,7 @@ const ReactSelect = ({ components, styles, error, ariaErrorMessage, ...props })
|
||||
ClearIndicator,
|
||||
DropdownIndicator,
|
||||
IndicatorSeparator,
|
||||
LoadingIndicator: () => null,
|
||||
...components,
|
||||
}}
|
||||
aria-errormessage={error && ariaErrorMessage}
|
||||
|
||||
@ -45,12 +45,12 @@ module.exports = (strapi) => {
|
||||
environment: strapi.config.environment,
|
||||
os: os.type(),
|
||||
osPlatform: os.platform(),
|
||||
osArch: os.arch(),
|
||||
osRelease: os.release(),
|
||||
nodeVersion: process.version,
|
||||
nodeVersion: process.versions.node,
|
||||
docker: process.env.DOCKER || isDocker(),
|
||||
isCI: ciEnv.isCI,
|
||||
version: strapi.config.get('info.strapi'),
|
||||
strapiVersion: strapi.config.get('info.strapi'),
|
||||
projectType: isEE ? 'Enterprise' : 'Community',
|
||||
useTypescriptOnServer: isUsingTypeScriptSync(serverRootPath),
|
||||
useTypescriptOnAdmin: isUsingTypeScriptSync(adminRootPath),
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`SelectTree renders 1`] = `
|
||||
Object {
|
||||
{
|
||||
"asFragment": [Function],
|
||||
"baseElement": .c3 {
|
||||
border: 0;
|
||||
|
||||
@ -1,22 +1,22 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`flattenTree flattens the passed tree structure properly 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
[
|
||||
{
|
||||
"depth": 0,
|
||||
"label": "Folder 1",
|
||||
"parent": undefined,
|
||||
"value": "f-1",
|
||||
},
|
||||
Object {
|
||||
"children": Array [
|
||||
Object {
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"label": "Folder 2-1",
|
||||
"value": "f-2-1",
|
||||
},
|
||||
Object {
|
||||
"children": Array [
|
||||
Object {
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"label": "Folder 2-2-1",
|
||||
"value": "f-2-2-1",
|
||||
},
|
||||
@ -30,15 +30,15 @@ Array [
|
||||
"parent": undefined,
|
||||
"value": "f-2",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"depth": 1,
|
||||
"label": "Folder 2-1",
|
||||
"parent": "f-2",
|
||||
"value": "f-2-1",
|
||||
},
|
||||
Object {
|
||||
"children": Array [
|
||||
Object {
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"label": "Folder 2-2-1",
|
||||
"value": "f-2-2-1",
|
||||
},
|
||||
@ -48,7 +48,7 @@ Array [
|
||||
"parent": "f-2",
|
||||
"value": "f-2-2",
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"depth": 2,
|
||||
"label": "Folder 2-2-1",
|
||||
"parent": "f-2-2",
|
||||
|
||||
@ -1,104 +1,117 @@
|
||||
{
|
||||
"bulk.select.label": "Seleccioneu tots els fitxers",
|
||||
"button.next": "Següent",
|
||||
"checkControl.crop-duplicate": "Duplica i retalla l'imatge",
|
||||
"checkControl.crop-original": "Retalla l'imatge original",
|
||||
"content.isLoading": "S'està carregant la llista de fitxers.",
|
||||
"control-card.add": "Afegeix",
|
||||
"control-card.cancel": "Cancel·lar",
|
||||
"control-card.copy-link": "Copia l'enllaç",
|
||||
"control-card.crop": "Retalla",
|
||||
"control-card.download": "Descarregar",
|
||||
"control-card.edit": "Edita",
|
||||
"control-card.replace-media": "Substitueix els fitxers",
|
||||
"control-card.save": "Desa",
|
||||
"control-card.stop-crop": "Deixa de retallar",
|
||||
"filter.add": "Afegeix un filtre",
|
||||
"form.button.replace-media": "Substituïu els fitxers",
|
||||
"form.input.decription.file-alt": "Aquest text es mostrarà si el recurs no es pot mostrar.",
|
||||
"form.input.label.file-alt": "Text alternatiu",
|
||||
"form.input.label.file-caption": "Subtítol",
|
||||
"form.input.label.file-name": "Nom de l'arxiu",
|
||||
"form.upload-url.error.url.invalid": "Un URL no és vàlid",
|
||||
"form.upload-url.error.url.invalids": "{number} URL no són vàlids",
|
||||
"header.actions.add-assets": "Afegeix nous fitxers",
|
||||
"header.actions.upload-assets": "Carregueu fitxers",
|
||||
"header.actions.upload-new-asset": "Penja un fitxer nou",
|
||||
"header.content.assets-empty": "Sense fitxers",
|
||||
"header.content.assets-multiple": "{nombre} fitxers",
|
||||
"header.content.assets-single": "1 fitxer",
|
||||
"input.button.label": "Exploreu fitxers",
|
||||
"input.label": "Arrossega i deixa anar aquí o",
|
||||
"input.label-bold": "Arrossegar i deixar anar",
|
||||
"input.label-normal": "per carregar o",
|
||||
"input.placeholder": "Feu clic per afegir un fitxer o arrossegueu i deixeu anar un fitxer en aquesta àrea",
|
||||
"input.placeholder.icon": "Deixeu el fitxer en aquesta zona",
|
||||
"input.url.description": "Separeu els vostres enllaços URL mitjançant un retorn de carro.",
|
||||
"input.url.label": "URL",
|
||||
"list.asset.at.finished": "Els fitxers s'han acabat de carregar.",
|
||||
"list.assets-empty.search": "No s'ha trobat cap resultat",
|
||||
"list.assets-empty.subtitle": "Afegiu-ne un a la llista.",
|
||||
"list.assets-empty.title": "Encara no hi ha fitxers",
|
||||
"list.assets-empty.title-withSearch": "No hi ha fitxers amb els filtres aplicats",
|
||||
"list.assets.empty": "Penja els teus primers fitxers...",
|
||||
"list.assets.empty.no-permissions": "La llista de fitxers està buida.",
|
||||
"list.assets.loading-asset": "S'està carregant la previsualització dels mitjans: {path}",
|
||||
"list.assets.not-supported-content": "No hi ha vista prèvia disponible",
|
||||
"list.assets.preview-asset": "Vista prèvia del vídeo al camí {path}",
|
||||
"list.assets.selected": "{number, plural, =0 {Cap fitxer} un {1 fitxer} altres {# fitxers}} a punt per penjar",
|
||||
"list.assets.type-not-allowed": "Aquest tipus de fitxer no està permès.",
|
||||
"mediaLibraryInput.actions.nextSlide": "Següent diapositiva",
|
||||
"mediaLibraryInput.actions.previousSlide": "Diapositiva anterior",
|
||||
"mediaLibraryInput.placeholder": "Feu clic per afegir un fitxer o arrossegueu-ne un en aquesta àrea",
|
||||
"mediaLibraryInput.slideCount": "{n} de {m} diapositives",
|
||||
"modal.file-details.date": "Data",
|
||||
"modal.file-details.dimensions": "Dimensions",
|
||||
"modal.file-details.extension": "Extensió",
|
||||
"modal.file-details.size": "Mida",
|
||||
"modal.header.browse": "Carregueu fitxers",
|
||||
"modal.header.file-detail": "Detalls",
|
||||
"modal.header.pending-assets": "Fitxers pendents",
|
||||
"modal.header.select-files": "Fitxers seleccionats",
|
||||
"modal.nav.browse": "navegar",
|
||||
"modal.nav.computer": "Des de l'ordinador",
|
||||
"modal.nav.selected": "seleccionat",
|
||||
"modal.nav.url": "Des de l'URL",
|
||||
"modal.remove.success-label": "El fitxer s'ha eliminat correctament.",
|
||||
"modal.selected-list.sub-header-subtitle": "Arrossegueu i deixeu anar per reordenar els fitxers al camp",
|
||||
"modal.upload-list.footer.button": "Carregueu {nombre, plural, un {# fitxer} altres {# fitxer}} a la biblioteca",
|
||||
"modal.upload-list.sub-header-subtitle": "Gestioneu els fitxers abans d'afegir-los a la Mediateca",
|
||||
"modal.upload-list.sub-header.button": "Afegeix més actius",
|
||||
"modal.upload.cancelled": "La càrrega s'ha avortat manualment.",
|
||||
"page.title": "Configuració - Mediateca",
|
||||
"permissions.not-allowed.update": "No teniu permís per editar aquest fitxer.",
|
||||
"plugin.description.long": "Gestió de fitxers multimèdia.",
|
||||
"plugin.description.short": "Gestió de fitxers multimèdia.",
|
||||
"plugin.name": "Mediateca",
|
||||
"search.clear.label": "Esborra la cerca",
|
||||
"search.label": "Cerca un actiu",
|
||||
"search.placeholder": "ex.: el primer gos a la lluna",
|
||||
"settings.blockTitle": "Gestió de fitxers",
|
||||
"settings.form.autoOrientation.description": "Si activeu aquesta opció, la imatge girarà automàticament segons l'etiqueta d'orientació EXIF.",
|
||||
"settings.form.autoOrientation.label": "Orientació automàtica",
|
||||
"settings.form.responsiveDimensions.description": "Si activeu aquesta opció, es generaran diversos formats (petit, mitjà i gran) del recurs penjat.",
|
||||
"settings.form.responsiveDimensions.label": "Càrrega amigable responsiva",
|
||||
"settings.form.sizeOptimization.description": "Activar aquesta opció reduirà la mida de la imatge i la qualitat lleugerament.",
|
||||
"settings.form.sizeOptimization.label": "Optimització de la mida",
|
||||
"settings.form.videoPreview.description": "Generarà una previsualització de sis segons del vídeo (GIF)",
|
||||
"settings.form.videoPreview.label": "Vista prèvia",
|
||||
"settings.header.label": "Mediateca",
|
||||
"settings.section.doc.label": "Doc",
|
||||
"settings.section.image.label": "Imatge",
|
||||
"settings.section.video.label": "Vídeo",
|
||||
"settings.sub-header.label": "Configureu la configuració de la mediateca",
|
||||
"sort.created_at_asc": "Càrregues més antigues",
|
||||
"sort.created_at_desc": "Càrregues més recents",
|
||||
"sort.label": "Ordenar per",
|
||||
"sort.name_asc": "Ordre alfabètic (A a Z)",
|
||||
"sort.name_desc": "Ordre alfabètic invers (de la Z a la A)",
|
||||
"sort.updated_at_asc": "Actualitzacions més antigues",
|
||||
"sort.updated_at_desc": "Actualitzacions més recents",
|
||||
"tabs.title": "Com vols pujar els teus actius?",
|
||||
"window.confirm.close-modal.file": "Estàs segur? Els vostres canvis es perdran.",
|
||||
"window.confirm.close-modal.files": "Estàs segur? Teniu alguns fitxers que encara no s'han penjat."
|
||||
"apiError.FileTooBig": "El fitxer supera la mida màxima permesa.",
|
||||
"bulk.select.label": "Seleccioneu tots els fitxers",
|
||||
"button.next": "Següent",
|
||||
"checkControl.crop-duplicate": "Duplica i retalla l'imatge",
|
||||
"checkControl.crop-original": "Retalla l'imatge original",
|
||||
"content.isLoading": "S'està carregant la llista de fitxers.",
|
||||
"control-card.add": "Afegeix",
|
||||
"control-card.cancel": "Cancel·lar",
|
||||
"control-card.copy-link": "Copia l'enllaç",
|
||||
"control-card.crop": "Retalla",
|
||||
"control-card.download": "Descarregar",
|
||||
"control-card.edit": "Edita",
|
||||
"control-card.replace-media": "Substitueix els fitxers",
|
||||
"control-card.save": "Desa",
|
||||
"control-card.stop-crop": "Deixa de retallar",
|
||||
"filter.add": "Afegeix un filtre",
|
||||
"form.button.replace-media": "Substituïu els fitxers",
|
||||
"form.input.decription.file-alt": "Aquest text es mostrarà si el recurs no es pot mostrar.",
|
||||
"form.input.label.file-alt": "Text alternatiu",
|
||||
"form.input.label.file-caption": "Subtítol",
|
||||
"form.input.label.file-name": "Nom de l'arxiu",
|
||||
"form.upload-url.error.url.invalid": "Un URL no és vàlid",
|
||||
"form.upload-url.error.url.invalids": "{number} URL no són vàlids",
|
||||
"header.actions.add-assets": "Afegeix nous fitxers",
|
||||
"header.actions.add-assets.folder": "carpeta",
|
||||
"header.actions.add-folder": "Afegeix una nova carpeta",
|
||||
"header.actions.upload-assets": "Carregueu fitxers",
|
||||
"header.actions.upload-new-asset": "Penja un fitxer nou",
|
||||
"header.content.assets": "{numberFolders, plural, one {1 carpeta} other{# carpetes}} - {numberAssets, plural, one {1 actiu} other {# actius}}",
|
||||
"header.content.assets-empty": "Sense fitxers",
|
||||
"header.content.assets-multiple": "{nombre} fitxers",
|
||||
"header.content.assets-single": "1 fitxer",
|
||||
"input.button.label": "Exploreu fitxers",
|
||||
"input.label": "Arrossega i deixa anar aquí o",
|
||||
"input.label-bold": "Arrossegar i deixar anar",
|
||||
"input.label-normal": "per carregar o",
|
||||
"input.placeholder": "Feu clic per afegir un fitxer o arrossegueu i deixeu anar un fitxer en aquesta àrea",
|
||||
"input.placeholder.icon": "Deixeu el fitxer en aquesta zona",
|
||||
"input.url.description": "Separeu els vostres enllaços URL mitjançant un retorn de carro.",
|
||||
"input.url.label": "URL",
|
||||
"list.asset.at.finished": "Els fitxers s'han acabat de carregar.",
|
||||
"list.assets-empty.search": "No s'ha trobat cap resultat",
|
||||
"list.assets-empty.subtitle": "Afegiu-ne un a la llista.",
|
||||
"list.assets-empty.title": "Encara no hi ha fitxers",
|
||||
"list.assets-empty.title-withSearch": "No hi ha fitxers amb els filtres aplicats",
|
||||
"list.assets.empty": "Penja els teus primers fitxers...",
|
||||
"list.assets.empty.no-permissions": "La llista de fitxers està buida.",
|
||||
"list.assets.loading-asset": "S'està carregant la previsualització dels mitjans: {path}",
|
||||
"list.assets.not-supported-content": "No hi ha vista prèvia disponible",
|
||||
"list.assets.preview-asset": "Vista prèvia del vídeo al camí {path}",
|
||||
"list.assets.selected": "{number, plural, =0 {Cap fitxer} un {1 fitxer} altres {# fitxers}} a punt per penjar",
|
||||
"list.assets.title": "Fitxers",
|
||||
"list.assets.to-upload": "{number, plural, =0 {Cap fitxer} one {1 fitxer} other {# fitxers}} a punt per pujar",
|
||||
"list.assets.type-not-allowed": "Aquest tipus de fitxer no està permès.",
|
||||
"list.folder.edit": "Edita la carpeta",
|
||||
"list.folder.subtitle": "{folderCount, plural, =0 {Cap carpeta} one {# carpeta} other {# carpetes}}, {filesCount, plural, =0 {Cap fitxer} one {# fitxer} other {# fitxers}}",
|
||||
"list.folders.title": "Carpetes",
|
||||
"mediaLibraryInput.actions.nextSlide": "Següent diapositiva",
|
||||
"mediaLibraryInput.actions.previousSlide": "Diapositiva anterior",
|
||||
"mediaLibraryInput.placeholder": "Feu clic per afegir un fitxer o arrossegueu-ne un en aquesta àrea",
|
||||
"mediaLibraryInput.slideCount": "{n} de {m} diapositives",
|
||||
"modal.file-details.date": "Data",
|
||||
"modal.file-details.dimensions": "Dimensions",
|
||||
"modal.file-details.extension": "Extensió",
|
||||
"modal.file-details.size": "Mida",
|
||||
"modal.folder.elements.count": "{folderCount} carpetes, {assetCount} fitxers",
|
||||
"modal.folder.move.title": "Mou els elements a",
|
||||
"modal.header.browse": "Carregueu fitxers",
|
||||
"modal.header.file-detail": "Detalls",
|
||||
"modal.header.go-back": "Torna",
|
||||
"modal.header.pending-assets": "Fitxers pendents",
|
||||
"modal.header.select-files": "Fitxers seleccionats",
|
||||
"modal.move.success-label": "Els elements s'han mogut correctament",
|
||||
"modal.nav.browse": "navegar",
|
||||
"modal.nav.computer": "Des de l'ordinador",
|
||||
"modal.nav.selected": "seleccionat",
|
||||
"modal.nav.url": "Des de l'URL",
|
||||
"modal.remove.success-label": "El fitxer s'ha eliminat correctament.",
|
||||
"modal.selected-list.sub-header-subtitle": "Arrossegueu i deixeu anar per reordenar els fitxers al camp",
|
||||
"modal.upload-list.footer.button": "Carregueu {nombre, plural, un {# fitxer} altres {# fitxer}} a la biblioteca",
|
||||
"modal.upload-list.sub-header-subtitle": "Gestioneu els fitxers abans d'afegir-los a la Mediateca",
|
||||
"modal.upload-list.sub-header.button": "Afegeix més actius",
|
||||
"modal.upload.cancelled": "La càrrega s'ha avortat manualment.",
|
||||
"page.title": "Configuració - Mediateca",
|
||||
"permissions.not-allowed.update": "No teniu permís per editar aquest fitxer.",
|
||||
"plugin.description.long": "Gestió de fitxers multimèdia.",
|
||||
"plugin.description.short": "Gestió de fitxers multimèdia.",
|
||||
"plugin.name": "Mediateca",
|
||||
"search.clear.label": "Esborra la cerca",
|
||||
"search.label": "Cerca un actiu",
|
||||
"search.placeholder": "ex.: el primer gos a la lluna",
|
||||
"settings.blockTitle": "Gestió de fitxers",
|
||||
"settings.form.autoOrientation.description": "Si activeu aquesta opció, la imatge girarà automàticament segons l'etiqueta d'orientació EXIF.",
|
||||
"settings.form.autoOrientation.label": "Orientació automàtica",
|
||||
"settings.form.responsiveDimensions.description": "Si activeu aquesta opció, es generaran diversos formats (petit, mitjà i gran) del recurs penjat.",
|
||||
"settings.form.responsiveDimensions.label": "Càrrega amigable responsiva",
|
||||
"settings.form.sizeOptimization.description": "Activar aquesta opció reduirà la mida de la imatge i la qualitat lleugerament.",
|
||||
"settings.form.sizeOptimization.label": "Optimització de la mida",
|
||||
"settings.form.videoPreview.description": "Generarà una previsualització de sis segons del vídeo (GIF)",
|
||||
"settings.form.videoPreview.label": "Vista prèvia",
|
||||
"settings.header.label": "Mediateca",
|
||||
"settings.section.doc.label": "Doc",
|
||||
"settings.section.image.label": "Imatge",
|
||||
"settings.section.video.label": "Vídeo",
|
||||
"settings.sub-header.label": "Configureu la configuració de la mediateca",
|
||||
"sort.created_at_asc": "Càrregues més antigues",
|
||||
"sort.created_at_desc": "Càrregues més recents",
|
||||
"sort.label": "Ordenar per",
|
||||
"sort.name_asc": "Ordre alfabètic (A a Z)",
|
||||
"sort.name_desc": "Ordre alfabètic invers (de la Z a la A)",
|
||||
"sort.updated_at_asc": "Actualitzacions més antigues",
|
||||
"sort.updated_at_desc": "Actualitzacions més recents",
|
||||
"tabs.title": "Com vols pujar els teus actius?",
|
||||
"window.confirm.close-modal.file": "Estàs segur? Els vostres canvis es perdran.",
|
||||
"window.confirm.close-modal.files": "Estàs segur? Teniu alguns fitxers que encara no s'han penjat."
|
||||
}
|
||||
@ -2,11 +2,6 @@
|
||||
|
||||
const metricsService = require('../metrics');
|
||||
|
||||
// TODO: the matcher exists in jest@28
|
||||
const closeTo = (expected, precision = 2) => ({
|
||||
asymmetricMatch: (actual) => Math.abs(expected - actual) < 10 ** -precision / 2,
|
||||
});
|
||||
|
||||
describe('metrics', () => {
|
||||
describe('computeMetrics', () => {
|
||||
test.each([
|
||||
@ -95,9 +90,9 @@ describe('metrics', () => {
|
||||
expect(results).toMatchObject({
|
||||
assetNumber,
|
||||
folderNumber,
|
||||
averageDepth: closeTo(averageDepth, 3),
|
||||
averageDepth: expect.closeTo(averageDepth, 3),
|
||||
maxDepth,
|
||||
averageDeviationDepth: closeTo(averageDeviationDepth, 3),
|
||||
averageDeviationDepth: expect.closeTo(averageDeviationDepth, 3),
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -58,12 +58,12 @@ const generateNewApp = (projectDirectory, cliArguments) => {
|
||||
|
||||
sentry.configureScope(function scope(sentryScope) {
|
||||
const tags = {
|
||||
os_arch: os.arch(),
|
||||
os_type: os.type(),
|
||||
os_platform: os.platform(),
|
||||
os_release: os.release(),
|
||||
strapi_version: scope.strapiVersion,
|
||||
node_version: process.version,
|
||||
os: os.type(),
|
||||
osPlatform: os.platform(),
|
||||
osArch: os.arch(),
|
||||
osRelease: os.release(),
|
||||
version: scope.strapiVersion,
|
||||
nodeVersion: process.versions.node,
|
||||
docker: scope.docker,
|
||||
};
|
||||
|
||||
|
||||
@ -53,6 +53,21 @@ function captureStderr(name, error) {
|
||||
return captureError(name);
|
||||
}
|
||||
|
||||
const getProperties = (scope, error) => ({
|
||||
error: typeof error === 'string' ? error : error && error.message,
|
||||
os: os.type(),
|
||||
osPlatform: os.platform(),
|
||||
osArch: os.arch(),
|
||||
osRelease: os.release(),
|
||||
version: scope.strapiVersion,
|
||||
nodeVersion: process.versions.node,
|
||||
docker: scope.docker,
|
||||
useYarn: scope.useYarn,
|
||||
useTypescriptOnServer: scope.useTypescript,
|
||||
useTypescriptOnAdmin: scope.useTypescript,
|
||||
noRun: (scope.runQuickstartApp !== true).toString(),
|
||||
});
|
||||
|
||||
function trackEvent(event, body) {
|
||||
if (process.env.NODE_ENV === 'test') {
|
||||
return;
|
||||
@ -76,19 +91,7 @@ function trackEvent(event, body) {
|
||||
|
||||
function trackError({ scope, error }) {
|
||||
const { uuid } = scope;
|
||||
|
||||
const properties = {
|
||||
error: typeof error === 'string' ? error : error && error.message,
|
||||
os: os.type(),
|
||||
platform: os.platform(),
|
||||
release: os.release(),
|
||||
version: scope.strapiVersion,
|
||||
nodeVersion: process.version,
|
||||
docker: scope.docker,
|
||||
useYarn: scope.useYarn,
|
||||
useTypescriptOnServer: scope.useTypescript,
|
||||
useTypescriptOnAdmin: scope.useTypescript,
|
||||
};
|
||||
const properties = getProperties(scope, error);
|
||||
|
||||
try {
|
||||
return trackEvent('didNotCreateProject', {
|
||||
@ -104,21 +107,7 @@ function trackError({ scope, error }) {
|
||||
|
||||
function trackUsage({ event, scope, error }) {
|
||||
const { uuid } = scope;
|
||||
|
||||
const properties = {
|
||||
error: typeof error === 'string' ? error : error && error.message,
|
||||
os: os.type(),
|
||||
os_arch: os.arch(),
|
||||
os_platform: os.platform(),
|
||||
os_release: os.release(),
|
||||
node_version: process.version,
|
||||
version: scope.strapiVersion,
|
||||
docker: scope.docker,
|
||||
useYarn: scope.useYarn.toString(),
|
||||
useTypescriptOnServer: scope.useTypescript,
|
||||
useTypescriptOnAdmin: scope.useTypescript,
|
||||
noRun: (scope.runQuickstartApp !== true).toString(),
|
||||
};
|
||||
const properties = getProperties(scope, error);
|
||||
|
||||
try {
|
||||
return trackEvent(event, {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user