From 095bbe55ec94d0a56458625e771b9e9446ba9546 Mon Sep 17 00:00:00 2001 From: Pablo Costa Date: Tue, 27 Feb 2024 22:00:27 -0300 Subject: [PATCH 01/14] Initial Entity edit page --- site/gatsby-site/src/graphql/entities.js | 10 + site/gatsby-site/src/pages/entities/edit.js | 248 ++++++++++++++++++ .../aiidprod/entities/schema.json | 8 + 3 files changed, 266 insertions(+) create mode 100644 site/gatsby-site/src/pages/entities/edit.js diff --git a/site/gatsby-site/src/graphql/entities.js b/site/gatsby-site/src/graphql/entities.js index 46fc9f7ffb..af8e187d24 100644 --- a/site/gatsby-site/src/graphql/entities.js +++ b/site/gatsby-site/src/graphql/entities.js @@ -17,3 +17,13 @@ export const FIND_ENTITIES = gql` } } `; + +export const FIND_ENTITY = gql` + query FindEntity($query: EntityQueryInput) { + entity(query: $query) { + entity_id + name + created_at + } + } +`; diff --git a/site/gatsby-site/src/pages/entities/edit.js b/site/gatsby-site/src/pages/entities/edit.js new file mode 100644 index 0000000000..b99e24ee01 --- /dev/null +++ b/site/gatsby-site/src/pages/entities/edit.js @@ -0,0 +1,248 @@ +import React, { useEffect, useState } from 'react'; +import TextInputGroup from '../../components/forms/TextInputGroup'; +import { StringParam, useQueryParam, withDefault } from 'use-query-params'; +//import useToastContext, { SEVERITY } from '../../hooks/useToast'; +import { Button, Spinner } from 'flowbite-react'; +import { FIND_ENTITY } from '../../graphql/entities'; +import { /*useMutation,*/ useQuery } from '@apollo/client/react/hooks'; +import { Form, Formik } from 'formik'; +//import { LocalizedLink } from 'plugins/gatsby-theme-i18n'; +import { useTranslation, Trans } from 'react-i18next'; +import { Link } from 'gatsby'; +//import { processEntities } from '../../utils/entities'; +import DefaultSkeleton from 'elements/Skeletons/Default'; +//import { getUnixTime } from 'date-fns'; +//import { useUserContext } from 'contexts/userContext'; +import * as Yup from 'yup'; + +const schema = Yup.object().shape({ + name: Yup.string().required(), +}); + +function EditEntityPage(props) { + // const { user } = useUserContext(); + + const { t /*i18n*/ } = useTranslation(); + + const [entity, setEntity] = useState(null); + + const [entityId] = useQueryParam('entity_id', withDefault(StringParam, '')); + + const { + data: entityData, + loading: loadingEntity, + error, + } = useQuery(FIND_ENTITY, { + variables: { query: { entity_id: entityId } }, + }); + + // const { data: entitiesData, loading: loadingEntities } = useQuery(FIND_ENTITIES); + + const loading = loadingEntity; + + // const [updateIncident] = useMutation(UPDATE_INCIDENT); + + // const [createEntityMutation] = useMutation(UPSERT_ENTITY); + + // const addToast = useToastContext(); + + // const { logIncidentHistory } = useLogIncidentHistory(); + + // const updateSuccessToast = ({ incidentId }) => ({ + // message: ( + // + // Incident {{ incidentId }} updated successfully.{' '} + // View incident {{ incidentId }}. + // + // ), + // severity: SEVERITY.success, + // }); + + // const updateErrorToast = ({ incidentId, error }) => ({ + // message: t('Error updating incident {{incidentId}}.', { incidentId }), + // severity: SEVERITY.danger, + // error, + // }); + + useEffect(() => { + console.log('entityData', entityData, error); + + if (entityData?.entity) { + setEntity({ + ...entityData.entity, + }); + } + }, [entityData]); + + const handleSubmit = async (/*values*/) => { + alert('submitting...'); + + // try { + // const updated = { + // ...values, + // editors: { link: values.editors }, + // reports: undefined, + // embedding: { + // ...values.embedding, + // __typename: undefined, + // }, + // tsne: { + // ...values.tsne, + // __typename: undefined, + // }, + // __typename: undefined, + // }; + + // const { entities } = entitiesData; + + // updated.AllegedDeveloperOfAISystem = await processEntities( + // entities, + // values.AllegedDeveloperOfAISystem, + // createEntityMutation + // ); + + // updated.AllegedDeployerOfAISystem = await processEntities( + // entities, + // values.AllegedDeployerOfAISystem, + // createEntityMutation + // ); + + // updated.AllegedHarmedOrNearlyHarmedParties = await processEntities( + // entities, + // values.AllegedHarmedOrNearlyHarmedParties, + // createEntityMutation + // ); + + // updated.epoch_date_modified = getUnixTime(new Date()); + + // // Add the current user to the list of editors + // if (user && user.providerType != 'anon-user' && !updated.editors.link.includes(user.id)) { + // updated.editors.link.push(user.id); + // } + + // await updateIncident({ + // variables: { + // query: { + // incident_id: incidentId, + // }, + // set: { + // ...updated, + // }, + // }, + // }); + + // await logIncidentHistory( + // { + // ...incident, + // ...updated, + // reports: incident.reports, + // embedding: incident.embedding, + // }, + // user + // ); + + // addToast(updateSuccessToast({ incidentId })); + // } catch (error) { + // addToast(updateErrorToast({ incidentId, error })); + // } + }; + + return ( +
+ {!loading && entity && ( +
+

+ Editing Entity {{ name: entity.name }} +

+ + + +
+ )} + + {loading && } + {entity === null && !loading &&
Entity not found
} + + {entity && ( + <> + + {({ + values, + isValid, + isSubmitting, + submitForm, + errors, + touched, + handleChange, + handleBlur, + }) => ( + <> +
+
+ +
+ + {/* */} +
+ + + )} +
+ + )} +
+ ); +} + +export default EditEntityPage; diff --git a/site/realm/data_sources/mongodb-atlas/aiidprod/entities/schema.json b/site/realm/data_sources/mongodb-atlas/aiidprod/entities/schema.json index ff17ab8286..2da69e7769 100644 --- a/site/realm/data_sources/mongodb-atlas/aiidprod/entities/schema.json +++ b/site/realm/data_sources/mongodb-atlas/aiidprod/entities/schema.json @@ -3,6 +3,9 @@ "_id": { "bsonType": "objectId" }, + "created_at": { + "bsonType": "date" + }, "entity_id": { "bsonType": "string" }, @@ -10,5 +13,10 @@ "bsonType": "string" } }, + "required": [ + "created_at", + "entity_id", + "name" + ], "title": "entity" } From 5e71c9728be94f6c324f9c4221f78f3a9927b6b2 Mon Sep 17 00:00:00 2001 From: Pablo Costa Date: Wed, 20 Mar 2024 22:01:26 -0300 Subject: [PATCH 02/14] Add update entity mutation --- site/gatsby-site/src/graphql/entities.js | 10 ++ site/gatsby-site/src/pages/entities/edit.js | 94 +++++++++++++------ .../aiidprod/entities/schema.json | 4 +- 3 files changed, 77 insertions(+), 31 deletions(-) diff --git a/site/gatsby-site/src/graphql/entities.js b/site/gatsby-site/src/graphql/entities.js index af8e187d24..e325784d09 100644 --- a/site/gatsby-site/src/graphql/entities.js +++ b/site/gatsby-site/src/graphql/entities.js @@ -24,6 +24,16 @@ export const FIND_ENTITY = gql` entity_id name created_at + date_modified + } + } +`; + +export const UPDATE_ENTITY = gql` + mutation UpdateEntity($query: EntityQueryInput, $set: EntityUpdateInput!) { + updateOneEntity(query: $query, set: $set) { + entity_id + name } } `; diff --git a/site/gatsby-site/src/pages/entities/edit.js b/site/gatsby-site/src/pages/entities/edit.js index b99e24ee01..267ad0c915 100644 --- a/site/gatsby-site/src/pages/entities/edit.js +++ b/site/gatsby-site/src/pages/entities/edit.js @@ -1,10 +1,10 @@ import React, { useEffect, useState } from 'react'; import TextInputGroup from '../../components/forms/TextInputGroup'; import { StringParam, useQueryParam, withDefault } from 'use-query-params'; -//import useToastContext, { SEVERITY } from '../../hooks/useToast'; +import useToastContext, { SEVERITY } from '../../hooks/useToast'; import { Button, Spinner } from 'flowbite-react'; -import { FIND_ENTITY } from '../../graphql/entities'; -import { /*useMutation,*/ useQuery } from '@apollo/client/react/hooks'; +import { FIND_ENTITY, UPDATE_ENTITY } from '../../graphql/entities'; +import { useMutation, useQuery } from '@apollo/client/react/hooks'; import { Form, Formik } from 'formik'; //import { LocalizedLink } from 'plugins/gatsby-theme-i18n'; import { useTranslation, Trans } from 'react-i18next'; @@ -14,6 +14,7 @@ import DefaultSkeleton from 'elements/Skeletons/Default'; //import { getUnixTime } from 'date-fns'; //import { useUserContext } from 'contexts/userContext'; import * as Yup from 'yup'; +import { format } from 'date-fns'; const schema = Yup.object().shape({ name: Yup.string().required(), @@ -28,10 +29,12 @@ function EditEntityPage(props) { const [entityId] = useQueryParam('entity_id', withDefault(StringParam, '')); + console.log('entityId', entityId); + const { data: entityData, loading: loadingEntity, - error, + refetch, } = useQuery(FIND_ENTITY, { variables: { query: { entity_id: entityId } }, }); @@ -40,33 +43,22 @@ function EditEntityPage(props) { const loading = loadingEntity; - // const [updateIncident] = useMutation(UPDATE_INCIDENT); - - // const [createEntityMutation] = useMutation(UPSERT_ENTITY); + const [updateEntityMutation] = useMutation(UPDATE_ENTITY); - // const addToast = useToastContext(); + const addToast = useToastContext(); - // const { logIncidentHistory } = useLogIncidentHistory(); - - // const updateSuccessToast = ({ incidentId }) => ({ - // message: ( - // - // Incident {{ incidentId }} updated successfully.{' '} - // View incident {{ incidentId }}. - // - // ), - // severity: SEVERITY.success, - // }); + const updateSuccessToast = () => ({ + message: t('Entity updated successfully.'), + severity: SEVERITY.success, + }); - // const updateErrorToast = ({ incidentId, error }) => ({ - // message: t('Error updating incident {{incidentId}}.', { incidentId }), - // severity: SEVERITY.danger, - // error, - // }); + const updateErrorToast = ({ entityId, error }) => ({ + message: t('Error updating entity {{entityId}}.', { entityId }), + severity: SEVERITY.danger, + error, + }); useEffect(() => { - console.log('entityData', entityData, error); - if (entityData?.entity) { setEntity({ ...entityData.entity, @@ -74,8 +66,28 @@ function EditEntityPage(props) { } }, [entityData]); - const handleSubmit = async (/*values*/) => { - alert('submitting...'); + const handleSubmit = async (values) => { + try { + await updateEntityMutation({ + variables: { + query: { + entity_id: entityId, + }, + set: { + name: values.name, + date_modified: new Date(), + }, + }, + }); + + refetch(); + + addToast(updateSuccessToast()); + } catch (error) { + addToast(updateErrorToast({ entityId, error })); + } + + return; // try { // const updated = { @@ -186,9 +198,9 @@ function EditEntityPage(props) { }) => ( <>
-
+
+ + + +
{/*
@@ -215,7 +134,7 @@ function EditEntityPage(props) { - - {/* */} + )} @@ -308,7 +318,7 @@ function UnsubscribeButton({ return ( + ), + }); + } + return columns; - }, []); + }, [loadingUser]); const table = useTable( { From 7345731679ac7461ad34c3283836089f724acabb Mon Sep 17 00:00:00 2001 From: Pablo Costa Date: Mon, 25 Mar 2024 21:34:42 -0300 Subject: [PATCH 07/14] Add test to entities list page --- .../cypress/e2e/integration/entities.cy.js | 19 +++++++++++++++++++ .../src/components/entities/EntitiesTable.js | 1 + 2 files changed, 20 insertions(+) diff --git a/site/gatsby-site/cypress/e2e/integration/entities.cy.js b/site/gatsby-site/cypress/e2e/integration/entities.cy.js index 9e88f3f873..4db7eecfaf 100644 --- a/site/gatsby-site/cypress/e2e/integration/entities.cy.js +++ b/site/gatsby-site/cypress/e2e/integration/entities.cy.js @@ -67,4 +67,23 @@ describe('Entities page', () => { cy.visit(url); cy.get('[data-cy="row"]').first().contains('a', 'Facebook').should('be.visible'); }); + + conditionalIt( + !Cypress.env('isEmptyEnvironment') && Cypress.env('e2eUsername') && Cypress.env('e2ePassword'), + 'Should display Edit button only for Admin users', + () => { + cy.visit(url); + cy.get('[data-cy="edit-entity-btn"]').should('not.exist'); + + cy.login(Cypress.env('e2eUsername'), Cypress.env('e2ePassword')); + cy.visit(url); + cy.get('[data-cy="edit-entity-btn"]') + .first() + .should('have.attr', 'href', '/entities/edit?entity_id=facebook'); + cy.get('[data-cy="edit-entity-btn"]').first().click(); + cy.waitForStableDOM(); + cy.location('pathname').should('eq', '/entities/edit/'); + cy.location('search').should('eq', '?entity_id=facebook'); + } + ); }); diff --git a/site/gatsby-site/src/components/entities/EntitiesTable.js b/site/gatsby-site/src/components/entities/EntitiesTable.js index 775dae5111..88a3e2980c 100644 --- a/site/gatsby-site/src/components/entities/EntitiesTable.js +++ b/site/gatsby-site/src/components/entities/EntitiesTable.js @@ -280,6 +280,7 @@ export default function EntitiesTable({ data, className = '', ...props }) { className="hover:no-underline" color="light" href={localizePath({ path: `/entities/edit?entity_id=${values.id}` })} + data-cy="edit-entity-btn" > Edit From 3376b49a140f62bca8af28f558fc9c6d71a63304 Mon Sep 17 00:00:00 2001 From: Pablo Costa Date: Mon, 25 Mar 2024 21:40:17 -0300 Subject: [PATCH 08/14] Add test to individual entity page --- .../cypress/e2e/integration/entity.cy.js | 23 ++++++++++++++++++- site/gatsby-site/src/templates/entity.js | 1 + 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/site/gatsby-site/cypress/e2e/integration/entity.cy.js b/site/gatsby-site/cypress/e2e/integration/entity.cy.js index 24b7e5e576..684b7e648c 100644 --- a/site/gatsby-site/cypress/e2e/integration/entity.cy.js +++ b/site/gatsby-site/cypress/e2e/integration/entity.cy.js @@ -1,4 +1,4 @@ -import { maybeIt } from '../../support/utils'; +import { conditionalIt, maybeIt } from '../../support/utils'; import emptySubscriptionsData from '../../fixtures/subscriptions/empty-subscriptions.json'; import subscriptionsData from '../../fixtures/subscriptions/subscriptions.json'; const { SUBSCRIPTION_TYPE } = require('../../../src/utils/subscriptions'); @@ -118,4 +118,25 @@ describe('Individual Entity page', () => { .contains(`Please log in to subscribe`) .should('exist'); }); + + conditionalIt( + !Cypress.env('isEmptyEnvironment') && Cypress.env('e2eUsername') && Cypress.env('e2ePassword'), + 'Should display Edit button only for Admin users', + () => { + cy.visit(url); + cy.get('[data-cy="edit-entity-btn"]').should('not.exist'); + + cy.login(Cypress.env('e2eUsername'), Cypress.env('e2ePassword')); + cy.visit(url); + cy.get('[data-cy="edit-entity-btn"]').should( + 'have.attr', + 'href', + `/entities/edit?entity_id=${entity.entity_id}` + ); + cy.get('[data-cy="edit-entity-btn"]').click(); + cy.waitForStableDOM(); + cy.location('pathname').should('eq', '/entities/edit/'); + cy.location('search').should('eq', `?entity_id=${entity.entity_id}`); + } + ); }); diff --git a/site/gatsby-site/src/templates/entity.js b/site/gatsby-site/src/templates/entity.js index 15a1f7934f..4db4032215 100644 --- a/site/gatsby-site/src/templates/entity.js +++ b/site/gatsby-site/src/templates/entity.js @@ -244,6 +244,7 @@ const EntityPage = ({ pageContext, data, ...props }) => { className="hover:no-underline ml-2" color="light" href={localizePath({ path: `/entities/edit?entity_id=${id}` })} + data-cy="edit-entity-btn" > Edit From 8157f0b22717669afc7d20e0864431138ed5d377 Mon Sep 17 00:00:00 2001 From: Pablo Costa Date: Mon, 25 Mar 2024 22:21:44 -0300 Subject: [PATCH 09/14] Add tests to Edit Entity page --- .../cypress/e2e/integration/entityEdit.cy.js | 62 +++++++++++++++++++ .../cypress/fixtures/entities/entity.json | 10 +++ .../fixtures/entities/updateOneEntity.json | 7 +++ 3 files changed, 79 insertions(+) create mode 100644 site/gatsby-site/cypress/e2e/integration/entityEdit.cy.js create mode 100644 site/gatsby-site/cypress/fixtures/entities/entity.json create mode 100644 site/gatsby-site/cypress/fixtures/entities/updateOneEntity.json diff --git a/site/gatsby-site/cypress/e2e/integration/entityEdit.cy.js b/site/gatsby-site/cypress/e2e/integration/entityEdit.cy.js new file mode 100644 index 0000000000..593ffc7dea --- /dev/null +++ b/site/gatsby-site/cypress/e2e/integration/entityEdit.cy.js @@ -0,0 +1,62 @@ +import { conditionalIt } from '../../support/utils'; +import entity from '../../fixtures/entities/entity.json'; +import updateOneEntity from '../../fixtures/entities/updateOneEntity.json'; + +describe('Edit Entity', () => { + const entity_id = 'google'; + + const url = `/entities/edit?entity_id=${entity_id}`; + + conditionalIt( + !Cypress.env('isEmptyEnvironment') && Cypress.env('e2eUsername') && Cypress.env('e2ePassword'), + 'Should successfully edit Entity fields', + () => { + cy.login(Cypress.env('e2eUsername'), Cypress.env('e2ePassword')); + + cy.visit(url); + + cy.conditionalIntercept( + '**/graphql', + (req) => req.body.operationName == 'FindEntity', + 'FindEntity', + entity + ); + + cy.wait(['@FindEntity']); + + const values = { + name: 'Google new', + }; + + Object.keys(values).forEach((key) => { + cy.get(`[name=${key}]`).clear().type(values[key]); + }); + + cy.conditionalIntercept( + '**/graphql', + (req) => req.body.operationName == 'UpdateEntity', + 'UpdateEntity', + updateOneEntity + ); + + const now = new Date(); + + cy.clock(now); + + cy.contains('button', 'Save').click(); + + const updatedEntity = { + name: values.name, + date_modified: now.toISOString(), + }; + + cy.wait('@UpdateEntity').then((xhr) => { + expect(xhr.request.body.operationName).to.eq('UpdateEntity'); + expect(xhr.request.body.variables.query.entity_id).to.eq(entity_id); + expect(xhr.request.body.variables.set).to.deep.eq(updatedEntity); + }); + + cy.get('.tw-toast').contains('Entity updated successfully.').should('exist'); + } + ); +}); diff --git a/site/gatsby-site/cypress/fixtures/entities/entity.json b/site/gatsby-site/cypress/fixtures/entities/entity.json new file mode 100644 index 0000000000..bf937d338e --- /dev/null +++ b/site/gatsby-site/cypress/fixtures/entities/entity.json @@ -0,0 +1,10 @@ +{ + "data": { + "entity": { + "entity_id": "google", + "name": "Google", + "created_at": "2024-03-01T21:52:39.877Z", + "date_modified": "2024-03-21T21:52:39.877Z" + } + } +} diff --git a/site/gatsby-site/cypress/fixtures/entities/updateOneEntity.json b/site/gatsby-site/cypress/fixtures/entities/updateOneEntity.json new file mode 100644 index 0000000000..be791e188b --- /dev/null +++ b/site/gatsby-site/cypress/fixtures/entities/updateOneEntity.json @@ -0,0 +1,7 @@ +{ + "data": { + "updateOneEntity": { + "entity_id": "google" + } + } +} From 5cccee8a57232cfee844eb16e6192136275d2d9e Mon Sep 17 00:00:00 2001 From: Pablo Costa Date: Wed, 27 Mar 2024 21:44:19 -0300 Subject: [PATCH 10/14] Refactor toast messages --- site/gatsby-site/src/pages/entities/edit.js | 22 +++++++++------------ 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/site/gatsby-site/src/pages/entities/edit.js b/site/gatsby-site/src/pages/entities/edit.js index 1401471872..3be912f28f 100644 --- a/site/gatsby-site/src/pages/entities/edit.js +++ b/site/gatsby-site/src/pages/entities/edit.js @@ -37,17 +37,6 @@ function EditEntityPage(props) { const addToast = useToastContext(); - const updateSuccessToast = () => ({ - message: t('Entity updated successfully.'), - severity: SEVERITY.success, - }); - - const updateErrorToast = ({ entityId, error }) => ({ - message: t('Error updating entity {{entityId}}.', { entityId }), - severity: SEVERITY.danger, - error, - }); - useEffect(() => { if (entityData?.entity) { setEntity({ @@ -72,9 +61,16 @@ function EditEntityPage(props) { refetch(); - addToast(updateSuccessToast()); + addToast({ + message: t('Entity updated successfully.'), + severity: SEVERITY.success, + }); } catch (error) { - addToast(updateErrorToast({ entityId, error })); + addToast({ + message: t('Error updating Entity.'), + severity: SEVERITY.danger, + error, + }); } }; From 04038c77f98d68e246ef44791063760ee1e029e9 Mon Sep 17 00:00:00 2001 From: Pablo Costa Date: Wed, 27 Mar 2024 21:44:50 -0300 Subject: [PATCH 11/14] Add test when editing Entity fails --- .../cypress/e2e/integration/entityEdit.cy.js | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/site/gatsby-site/cypress/e2e/integration/entityEdit.cy.js b/site/gatsby-site/cypress/e2e/integration/entityEdit.cy.js index 593ffc7dea..08ae036394 100644 --- a/site/gatsby-site/cypress/e2e/integration/entityEdit.cy.js +++ b/site/gatsby-site/cypress/e2e/integration/entityEdit.cy.js @@ -59,4 +59,64 @@ describe('Edit Entity', () => { cy.get('.tw-toast').contains('Entity updated successfully.').should('exist'); } ); + + conditionalIt( + !Cypress.env('isEmptyEnvironment') && Cypress.env('e2eUsername') && Cypress.env('e2ePassword'), + 'Should display an error message when editing Entity fails', + () => { + cy.login(Cypress.env('e2eUsername'), Cypress.env('e2ePassword')); + + cy.visit(url); + + cy.conditionalIntercept( + '**/graphql', + (req) => req.body.operationName == 'FindEntity', + 'FindEntity', + entity + ); + + cy.wait(['@FindEntity']); + + const values = { + name: 'Google new', + }; + + Object.keys(values).forEach((key) => { + cy.get(`[name=${key}]`).clear().type(values[key]); + }); + + cy.conditionalIntercept( + '**/graphql', + (req) => req.body.operationName == 'UpdateEntity', + 'UpdateEntity', + { + data: null, + errors: [ + { + message: 'Dummy error message', + }, + ], + } + ); + + const now = new Date(); + + cy.clock(now); + + cy.contains('button', 'Save').click(); + + const updatedEntity = { + name: values.name, + date_modified: now.toISOString(), + }; + + cy.wait('@UpdateEntity').then((xhr) => { + expect(xhr.request.body.operationName).to.eq('UpdateEntity'); + expect(xhr.request.body.variables.query.entity_id).to.eq(entity_id); + expect(xhr.request.body.variables.set).to.deep.eq(updatedEntity); + }); + + cy.get('.tw-toast').contains('Error updating Entity.').should('exist'); + } + ); }); From 42bdd11e241cd7195acddd921a7fb35e25eaafcd Mon Sep 17 00:00:00 2001 From: Pablo Costa Date: Wed, 27 Mar 2024 22:02:09 -0300 Subject: [PATCH 12/14] Change Edit Entity page title --- site/gatsby-site/i18n/locales/es/entities.json | 2 +- site/gatsby-site/i18n/locales/fr/entities.json | 4 ++-- site/gatsby-site/i18n/locales/ja/entities.json | 2 +- site/gatsby-site/src/pages/entities/edit.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/site/gatsby-site/i18n/locales/es/entities.json b/site/gatsby-site/i18n/locales/es/entities.json index 34d300cbd8..aa9ed3d866 100644 --- a/site/gatsby-site/i18n/locales/es/entities.json +++ b/site/gatsby-site/i18n/locales/es/entities.json @@ -24,6 +24,6 @@ "Alleged: <1> developed an AI system deployed by <4>, which harmed <6>.": "Presunto: un sistema de IA desarrollado por <1> e implementado por <4>, perjudicó a <6>.", "Entities involved in AI Incidents": "^Entities involved in AI Incidents", "{{count}} Incident responses": "{{count}} respuestas de incidentes", - "Editing Entity: {{name}}": "Editando Entidad: {{name}}", + "Editing Entity": "Editando Entidad", "Back to Entity: {{name}}": "Volver a Entidad: {{name}}" } diff --git a/site/gatsby-site/i18n/locales/fr/entities.json b/site/gatsby-site/i18n/locales/fr/entities.json index 62db90b90d..1f383b6dfe 100644 --- a/site/gatsby-site/i18n/locales/fr/entities.json +++ b/site/gatsby-site/i18n/locales/fr/entities.json @@ -24,6 +24,6 @@ "Alleged: <1> developed an AI system deployed by <4>, which harmed <6>.": "Présumé : un système d'IA développé par <1> et mis en œuvre par <4>, endommagé <6>.", "Entities involved in AI Incidents": "Entités impliquées dans les incidents IA", "{{count}} Incident responses": "{{count}} réponses d'incident", - "Editing Entity: {{name}}": "Modification de l'entité : {{name}}", - "Back to Entity: {{name}}": "Retour à l'entité : {{name}}" + "Editing Entity": "Modification de l'entité", + "Back to Entity: {{name}}": "Retour à l'entité: {{name}}" } diff --git a/site/gatsby-site/i18n/locales/ja/entities.json b/site/gatsby-site/i18n/locales/ja/entities.json index 50581c54f1..e6a3b5d96b 100644 --- a/site/gatsby-site/i18n/locales/ja/entities.json +++ b/site/gatsby-site/i18n/locales/ja/entities.json @@ -25,6 +25,6 @@ "Alleged: <1> developed an AI system deployed by <4>, which harmed <6>.": "推定: <1>が開発し、<4>が提供したAIシステムで、<6>に影響を与えた", "Entities involved in AI Incidents": "AIインシデントに関係する組織", "{{count}} Incident responses": "{{count}} インシデントレスポンス", - "Editing Entity: {{name}}": "組織の編集: {{name}}", + "Editing Entity": "組織の編集", "Back to Entity: {{name}}": "組織に戻る: {{name}}" } diff --git a/site/gatsby-site/src/pages/entities/edit.js b/site/gatsby-site/src/pages/entities/edit.js index 3be912f28f..93d7286af5 100644 --- a/site/gatsby-site/src/pages/entities/edit.js +++ b/site/gatsby-site/src/pages/entities/edit.js @@ -79,7 +79,7 @@ function EditEntityPage(props) { {!loading && entity && (

- Editing Entity: {{ name: entity.name }} + Editing Entity