From 8494f26831537dd2eb9569253e8c6f27f7eef884 Mon Sep 17 00:00:00 2001 From: Clara Youdale Date: Mon, 23 Dec 2024 12:44:20 -0300 Subject: [PATCH] Update "Implicated AI system(s)" copy adding "Alleged" (#3286) * Update translations to replace "Implicated AI system(s)" with "Alleged implicated AI system(s)" in multiple locales and components * Update translations for "Alleged implicated AI system(s)" in Spanish, French, and Japanese locales * Update translations for "Alleged implicated AI system(s)" in Spanish, French, and Japanese locales * Update translations and validation messages for "Alleged implicated AI systems" in Spanish, French, and Japanese locales * Add implicated systems to submitted reports test data * Add validation messages and schema for implicated AI systems in multiple locales * Refactor submitted reports tests to remove unused fields and streamline data handling --- site/gatsby-site/i18n/locales/es/entities.json | 4 ++-- site/gatsby-site/i18n/locales/es/submit.json | 4 +++- site/gatsby-site/i18n/locales/es/validation.json | 7 +++++-- site/gatsby-site/i18n/locales/fr/entities.json | 2 ++ site/gatsby-site/i18n/locales/fr/submit.json | 4 +++- site/gatsby-site/i18n/locales/fr/validation.json | 5 +++++ site/gatsby-site/i18n/locales/ja/entities.json | 4 ++-- site/gatsby-site/i18n/locales/ja/submit.json | 4 +++- site/gatsby-site/i18n/locales/ja/validation.json | 11 ++++++++--- .../playwright/e2e-full/apps/submitted.spec.ts | 15 ++++++++++++++- site/gatsby-site/playwright/e2e-full/cite.spec.ts | 2 +- .../playwright/e2e-full/dynamicCite.spec.ts | 2 +- .../src/components/entities/AllegedEntities.js | 2 +- .../forms/SubmissionWizard/StepThree.js | 4 ++-- .../src/components/submissions/SubmissionForm.js | 2 +- .../src/components/submissions/schemas.js | 9 ++++++++- 16 files changed, 61 insertions(+), 20 deletions(-) diff --git a/site/gatsby-site/i18n/locales/es/entities.json b/site/gatsby-site/i18n/locales/es/entities.json index ec5b94f10c..35702e184a 100644 --- a/site/gatsby-site/i18n/locales/es/entities.json +++ b/site/gatsby-site/i18n/locales/es/entities.json @@ -22,8 +22,8 @@ "Incidents involved as both Developer and Deployer": "Incidentes involucrados como desarrollador e implementador", "Incidents Harmed By": "Afectado por Incidentes", "Alleged: <2> developed and deployed an AI system, which harmed <6>.": "Presunto: un sistema de IA desarrollado e implementado por <2>, perjudicó a <6>.", - "Implicated AI system:": "Sistema de IA implicado:", - "Implicated AI systems:": "Sistemas de IA implicados:", + "Alleged implicated AI system:": "Sistema de IA presuntamente implicado:", + "Alleged implicated AI systems:": "Sistemas de IA presuntamente implicados:", "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", diff --git a/site/gatsby-site/i18n/locales/es/submit.json b/site/gatsby-site/i18n/locales/es/submit.json index b29541cf2a..dc92b7ba8d 100644 --- a/site/gatsby-site/i18n/locales/es/submit.json +++ b/site/gatsby-site/i18n/locales/es/submit.json @@ -67,5 +67,7 @@ "Incident IDs": "IDs de Incidentes", "Implicated Systems": "Sistemas Implicados", "What systems were involved in the incident?": "¿Qué sistemas estuvieron involucrados en el incidente?", - "Please confirm you are ready to submit this report. Report details cannot be changed after submission.": "Por favor confirma que estás listo para enviar este informe. Los detalles del informe no se pueden cambiar después de la presentación." + "Please confirm you are ready to submit this report. Report details cannot be changed after submission.": "Por favor confirma que estás listo para enviar este informe. Los detalles del informe no se pueden cambiar después de la presentación.", + "Alleged implicated AI systems": "Sistemas de IA presuntamente implicados", + "Which AI systems were involved?": "¿Qué sistemas de IA estuvieron involucrados?" } diff --git a/site/gatsby-site/i18n/locales/es/validation.json b/site/gatsby-site/i18n/locales/es/validation.json index 8b25ed4c09..a66368aa72 100644 --- a/site/gatsby-site/i18n/locales/es/validation.json +++ b/site/gatsby-site/i18n/locales/es/validation.json @@ -35,6 +35,9 @@ "*Incident Date is required": "*Fecha del incidente es obligatoria", "*Incident Date required": "*Fecha del incidente es obligatoria", "*Incident ID(s) must be a number": "*El ID del incidente debe ser un número", - "Implicated Systems must have at least 3 characters": "Los sistemas implicados deben tener al menos 3 caracteres", - "Implicated Systems can't be longer than 200 characters": "Los sistemas implicados no pueden tener más de 200 caracteres" + "Alleged implicated AI Systems must have at least 3 characters": "Los sistemas implicados deben tener al menos 3 caracteres", + "Alleged implicated AI Systems can't be longer than 200 characters": "Los sistemas implicados no pueden tener más de 200 caracteres", + "*Alleged Implicated AI Systems is required": "Se requieren los sistemas de IA presuntamente implicados", + "Implicated AI systems must have at least 3 characters": "Los sistemas de IA implicados deben tener al menos 3 caracteres", + "Implicated AI systems can't be longer than 200 characters": "Los sistemas de IA implicados no pueden tener más de 200 caracteres" } diff --git a/site/gatsby-site/i18n/locales/fr/entities.json b/site/gatsby-site/i18n/locales/fr/entities.json index 01f4524838..f8b7417112 100644 --- a/site/gatsby-site/i18n/locales/fr/entities.json +++ b/site/gatsby-site/i18n/locales/fr/entities.json @@ -28,6 +28,8 @@ "Back to Entity: {{name}}": "Retour à l'entité: {{name}}", "Entity updated successfully.": "Entité mise à jour avec succès.", "Error updating Entity.": "Erreur lors de la mise à jour de l'entité.", + "Alleged implicated AI system:": "Systèmes d'IA présumés impliqués:", + "Alleged implicated AI systems:": "Systèmes d'IA présumés impliqués:", "Incident Responses": "Réponses aux incidents", "Implicated AI system:": "Système de l'IA impliqué:", "Implicated AI systems:": "Systèmes de l'IA impliqués:" diff --git a/site/gatsby-site/i18n/locales/fr/submit.json b/site/gatsby-site/i18n/locales/fr/submit.json index 67ef366df2..220c363e92 100644 --- a/site/gatsby-site/i18n/locales/fr/submit.json +++ b/site/gatsby-site/i18n/locales/fr/submit.json @@ -67,5 +67,7 @@ "Fetching...": "Chargement...", "Implicated Systems": "Systèmes impliqués", "What systems were involved in the incident?": "Quels systèmes étaient impliqués dans l'incident ?", - "Please confirm you are ready to submit this report. Report details cannot be changed after submission.": "Veuillez confirmer que vous êtes prêt à soumettre ce rapport. Les détails du rapport ne peuvent pas être modifiés après la soumission." + "Please confirm you are ready to submit this report. Report details cannot be changed after submission.": "Veuillez confirmer que vous êtes prêt à soumettre ce rapport. Les détails du rapport ne peuvent pas être modifiés après la soumission.", + "Alleged implicated AI systems": "Systèmes IA impliqués présumés", + "Which AI systems were involved?": "Quels systèmes IA étaient impliqués ?" } diff --git a/site/gatsby-site/i18n/locales/fr/validation.json b/site/gatsby-site/i18n/locales/fr/validation.json index 4a6cabe2e0..e751b3c8df 100644 --- a/site/gatsby-site/i18n/locales/fr/validation.json +++ b/site/gatsby-site/i18n/locales/fr/validation.json @@ -29,6 +29,11 @@ "*Incident Date is required": "*Date de l'incident requise", "*Incident Date required": "*Date de l'incident requise", "*Incident ID(s) must be a number": "*L'ID de l'incident doit être un nombre", + "Alleged implicated AI Systems must have at least 3 characters": "Les systèmes impliqués doivent avoir au moins 3 caractères", + "Alleged implicated AI Systems can't be longer than 200 characters": "Les systèmes impliqués ne peuvent pas comporter plus de 200 caractères", + "*Alleged Implicated AI Systems is required": "Les systèmes d'IA présumés impliqués sont requis", + "Implicated AI systems must have at least 3 characters": "Les systèmes de l'IA impliqués doivent avoir au moins 3 caractères", + "Implicated AI systems can't be longer than 200 characters": "Les systèmes de l'IA impliqués ne peuvent pas comporter plus de 200 caractères", "*Text must have at least 80 characters": "*Le texte doit comporter au moins 80 caractères", "*Text can’t be longer than 50000 characters": "*Le texte ne peut pas comporter plus de 50000 caractères", "Please review report. Some data is missing.": "Veuillez vérifier le rapport. Certaines données manquent.", diff --git a/site/gatsby-site/i18n/locales/ja/entities.json b/site/gatsby-site/i18n/locales/ja/entities.json index 462109f69a..8d37e689ed 100644 --- a/site/gatsby-site/i18n/locales/ja/entities.json +++ b/site/gatsby-site/i18n/locales/ja/entities.json @@ -29,6 +29,6 @@ "Back to Entity: {{name}}": "組織に戻る: {{name}}", "Entity updated successfully.": "組織が正常に更新されました。", "Error updating Entity.": "組織の更新中にエラーが発生しました。", - "Implicated AI system:": "AI関連システム:", - "Implicated AI systems:": "AI関連システム:" + "Alleged implicated AI system:": "関与が疑われるAIシステム:", + "Alleged implicated AI systems:": "関与が疑われるAIシステム:" } diff --git a/site/gatsby-site/i18n/locales/ja/submit.json b/site/gatsby-site/i18n/locales/ja/submit.json index 47c2be998a..34c19c7631 100644 --- a/site/gatsby-site/i18n/locales/ja/submit.json +++ b/site/gatsby-site/i18n/locales/ja/submit.json @@ -67,5 +67,7 @@ "Incident ID": "インシデントID", "Implicated Systems": "関連システム", "What systems were involved in the incident?": "このインシデントに関わるシステムは何ですか?", - "Please confirm you are ready to submit this report. Report details cannot be changed after submission.": "このレポートを送信する準備ができていることを確認してください。送信後にレポートの詳細を変更することはできません" + "Please confirm you are ready to submit this report. Report details cannot be changed after submission.": "このレポートを送信する準備ができていることを確認してください。送信後にレポートの詳細を変更することはできません", + "Alleged implicated AI systems": "推定される関連AIシステム", + "Which AI systems were involved?": "どのAIシステムが関わっていましたか?" } diff --git a/site/gatsby-site/i18n/locales/ja/validation.json b/site/gatsby-site/i18n/locales/ja/validation.json index 6acbe691f2..738dcd9508 100644 --- a/site/gatsby-site/i18n/locales/ja/validation.json +++ b/site/gatsby-site/i18n/locales/ja/validation.json @@ -14,6 +14,14 @@ "Please review submission. Some data is missing.": "投稿を確認してください。足りない情報があります", "Some data is missing.": "足りない情報があります", "Please review. Some data is missing.": "確認してください。足りない情報があります", + "Alleged implicated AI Systems must have at least 3 characters": "関連システムは3文字以上でなければいけません", + "Alleged implicated AI Systems can't be longer than 200 characters": "関連システムは200文字を超えることはできません", + "*Alleged Implicated AI Systems is required": "関連システムは必須です", + "*Alleged developers is required": "開発者は必須です", + "*Alleged deployers is required": "デプロイヤーは必須です", + "*Alleged Harmed Parties is required": "被害を受けたとされる当事者は必須です", + "Implicated AI systems must have at least 3 characters": "関連AIシステムは3文字以上でなければいけません", + "Implicated AI systems can't be longer than 200 characters": "関連AIシステムは200文字を超えることはできません", "*Title must have at least 6 characters": "*タイトルは少なくとも6文字必要です", "*Titles can't be longer than 500 characters": "*タイトルは500文字を超えることはできません", "Alleged Developer must have at least 3 characters": "推定される開発者は少なくとも3文字必要です", @@ -25,11 +33,8 @@ "Description must have at least 3 characters": "説明は少なくとも3文字必要です", "Description can't be longer than 500 characters": "説明は500文字を超えることはできません", "*Incident title is required": "*インシデントタイトルは必須です", - "*Alleged developers is required": "*推定されるAIシステムの開発者は必須です", "*Alleged developer of AI system is required": "*推定されるAIシステムの開発者は必須です", - "*Alleged deployers is required": "*推定されるAIシステムのデプロイヤーは必須です", "*Alleged deployer of AI system is required": "*推定されるAIシステムのデプロイヤーは必須です", - "*Alleged Harmed Parties is required": "*推定される被害グループは必須です", "*Alleged harmed or nearly harmed parties is required": "*推定される被害グループは必須です", "*Description is required": "*説明は必須です", "*Incident Date is required": "*インシデント日は必須です", diff --git a/site/gatsby-site/playwright/e2e-full/apps/submitted.spec.ts b/site/gatsby-site/playwright/e2e-full/apps/submitted.spec.ts index f3e665a520..937837cab2 100644 --- a/site/gatsby-site/playwright/e2e-full/apps/submitted.spec.ts +++ b/site/gatsby-site/playwright/e2e-full/apps/submitted.spec.ts @@ -78,7 +78,7 @@ test.describe('Submitted reports', () => { await login(config.E2E_ADMIN_USERNAME, config.E2E_ADMIN_PASSWORD, { customData: { first_name: 'Test', last_name: 'User', roles: ['admin'] } }); - await page.goto(url + `?editSubmission=6140e4b4b9b4f7b3b3b1b1b1`); + await page.goto(url + `?editSubmission=6140e4b4b9b4f7b3b3b1b1b1`); await page.locator('select[data-cy="promote-select"]').selectOption('Incident'); @@ -284,6 +284,7 @@ test.describe('Submitted reports', () => { incident_title: "Incident title", incident_date: "2021-09-14", editor_notes: "", + implicated_systems: ["entity-1"], }] await init({ aiidprod: { submissions } }); @@ -326,6 +327,7 @@ test.describe('Submitted reports', () => { editor_notes: "", description: 'Sarasa', title: "", + implicated_systems: ["entity-1"], }] await init({ aiidprod: { submissions } }); @@ -425,6 +427,7 @@ test.describe('Submitted reports', () => { editor_notes: "", description: 'Sarasa', title: "Already Claimed", + implicated_systems: [] }] await seedCollection({ name: 'submissions', docs: submissions, drop: false }); @@ -482,6 +485,7 @@ test.describe('Submitted reports', () => { editor_notes: "", description: 'Sarasa', title: "Submission " + i, + implicated_systems: [] } }) @@ -550,6 +554,7 @@ test.describe('Submitted reports', () => { editor_notes: "", description: 'Sarasa', title: "Already Claimed", + implicated_systems: [] }] await seedCollection({ name: 'submissions', docs: submissions, drop: false }); @@ -605,6 +610,9 @@ test.describe('Submitted reports', () => { AllegedHarmedOrNearlyHarmedParties { entity_id } + implicated_systems { + entity_id + } date description editor_dissimilar_incidents @@ -657,6 +665,11 @@ test.describe('Submitted reports', () => { entity_id: "entity-3", }, ], + implicated_systems: [ + { + entity_id: "entity-1", + }, + ], date: "2021-09-14", description: "Sample description", editor_dissimilar_incidents: [], diff --git a/site/gatsby-site/playwright/e2e-full/cite.spec.ts b/site/gatsby-site/playwright/e2e-full/cite.spec.ts index 9595ad4663..474a01a504 100644 --- a/site/gatsby-site/playwright/e2e-full/cite.spec.ts +++ b/site/gatsby-site/playwright/e2e-full/cite.spec.ts @@ -452,7 +452,7 @@ test.describe('Cite pages', () => { test('Should show proper entities card text', async ({ page }) => { await page.goto('/cite/3/'); await expect(page.locator('[data-cy="alleged-entities"]')).toHaveText( - 'Alleged: Kronos developed an AI system deployed by Starbucks, which harmed Starbucks Employees.Implicated AI system: Entity 1' + 'Alleged: Kronos developed an AI system deployed by Starbucks, which harmed Starbucks Employees.Alleged implicated AI system: Entity 1' ); }); diff --git a/site/gatsby-site/playwright/e2e-full/dynamicCite.spec.ts b/site/gatsby-site/playwright/e2e-full/dynamicCite.spec.ts index 05493b33f7..bdd17025d4 100644 --- a/site/gatsby-site/playwright/e2e-full/dynamicCite.spec.ts +++ b/site/gatsby-site/playwright/e2e-full/dynamicCite.spec.ts @@ -34,7 +34,7 @@ test.describe('Dynamic Cite pages', () => { await expect(page.getByText(`Kronos’s scheduling algorithm and its use by Starbucks managers allegedly negatively impacted financial and scheduling stability for Starbucks employees, which disadvantaged wage workers.`)).toBeVisible(); await expect(page.locator('[data-cy="alleged-entities"]')).toHaveText( - 'Alleged: Kronos developed an AI system deployed by Starbucks, which harmed Starbucks Employees.Implicated AI system: Entity 1' + 'Alleged: Kronos developed an AI system deployed by Starbucks, which harmed Starbucks Employees.Alleged implicated AI system: Entity 1' ); await expect(page.locator('[data-cy="citation"]').getByText("Report Count", { exact: true }).locator('xpath=following-sibling::div[1]')).toHaveText('2'); diff --git a/site/gatsby-site/src/components/entities/AllegedEntities.js b/site/gatsby-site/src/components/entities/AllegedEntities.js index b3d193c742..31b41b1b7f 100644 --- a/site/gatsby-site/src/components/entities/AllegedEntities.js +++ b/site/gatsby-site/src/components/entities/AllegedEntities.js @@ -51,7 +51,7 @@ function ImplicatedSystemsList({ entities }) {
{entities.length > 0 && ( <> - Implicated AI system{entities.length > 1 ? 's' : ''}:{' '} + Alleged implicated AI system{entities.length > 1 ? 's' : ''}:{' '} {' '} )} diff --git a/site/gatsby-site/src/components/forms/SubmissionWizard/StepThree.js b/site/gatsby-site/src/components/forms/SubmissionWizard/StepThree.js index 13090e0f11..4a4c2d2d2a 100644 --- a/site/gatsby-site/src/components/forms/SubmissionWizard/StepThree.js +++ b/site/gatsby-site/src/components/forms/SubmissionWizard/StepThree.js @@ -79,11 +79,11 @@ const StepThree = (props) => { .string() .matches(/^.{3,}$/, { excludeEmptyString: true, - message: 'Implicated Systems must have at least 3 characters', + message: 'Alleged implicated AI Systems must have at least 3 characters', }) .matches(/^.{3,200}$/, { excludeEmptyString: true, - message: "Implicated Systems can't be longer than 200 characters", + message: "Alleged implicated AI Systems can't be longer than 200 characters", }) .nullable(), }); diff --git a/site/gatsby-site/src/components/submissions/SubmissionForm.js b/site/gatsby-site/src/components/submissions/SubmissionForm.js index 537cf9bcf4..b634a0b1d6 100644 --- a/site/gatsby-site/src/components/submissions/SubmissionForm.js +++ b/site/gatsby-site/src/components/submissions/SubmissionForm.js @@ -434,7 +434,7 @@ const SubmissionForm = ({ onChange = null }) => {