diff --git a/amt/api/ai_act_profile.py b/amt/api/ai_act_profile.py index 1e5f8132..c4f69378 100644 --- a/amt/api/ai_act_profile.py +++ b/amt/api/ai_act_profile.py @@ -101,8 +101,8 @@ def get_ai_act_profile_selector(request: Request) -> AiActProfileSelector: systemic_risk_options = ("systeemrisico", "geen systeemrisico", "niet van toepassing") transparency_obligations_options = ( - "transparantieverplichtingen", - "geen transparantieverplichtingen", + "transparantieverplichting", + "geen transparantieverplichting", "niet van toepassing", ) open_source_options = ("open-source", "geen open-source", "niet van toepassing") diff --git a/amt/locale/en_US/LC_MESSAGES/messages.mo b/amt/locale/en_US/LC_MESSAGES/messages.mo index 87254830..738f59d7 100644 Binary files a/amt/locale/en_US/LC_MESSAGES/messages.mo and b/amt/locale/en_US/LC_MESSAGES/messages.mo differ diff --git a/amt/locale/nl_NL/LC_MESSAGES/messages.mo b/amt/locale/nl_NL/LC_MESSAGES/messages.mo index 359c1d3a..0c989e45 100644 Binary files a/amt/locale/nl_NL/LC_MESSAGES/messages.mo and b/amt/locale/nl_NL/LC_MESSAGES/messages.mo differ diff --git a/amt/locale/nl_NL/LC_MESSAGES/messages.po b/amt/locale/nl_NL/LC_MESSAGES/messages.po index 26147cbd..2911f520 100644 --- a/amt/locale/nl_NL/LC_MESSAGES/messages.po +++ b/amt/locale/nl_NL/LC_MESSAGES/messages.po @@ -38,7 +38,7 @@ msgstr "" #: amt/api/ai_act_profile.py:32 msgid "Is there a systemic risk?" -msgstr "Is er sprake van systematisch risico?" +msgstr "Is er sprake van een systeemrisico?" #: amt/api/ai_act_profile.py:34 msgid "Is there a transparency obligation?" @@ -570,7 +570,7 @@ msgstr "Vind uw AI Act profiel" #: amt/site/templates/algorithms/new.html.j2:112 msgid "Select Option" -msgstr "Selecteer organisatie" +msgstr "Selecteer optie" #: amt/site/templates/algorithms/new.html.j2:172 msgid "" diff --git a/amt/site/static/ts/amt.ts b/amt/site/static/ts/amt.ts index 88d03875..2354ec4c 100644 --- a/amt/site/static/ts/amt.ts +++ b/amt/site/static/ts/amt.ts @@ -212,6 +212,7 @@ export function closeModalSave(id: string) { aiActProfileRaw["Rol"], aiActProfileRaw["Open source"], ); + // Select the correct entries. Object.entries(aiActProfile).forEach(([category, el_ids]) => { el_ids.forEach((el_id: string) => { diff --git a/resources/system_card_templates/AMT_Template_1.json b/resources/system_card_templates/AMT_Template_1.json index 14cc36c6..34e36199 100644 --- a/resources/system_card_templates/AMT_Template_1.json +++ b/resources/system_card_templates/AMT_Template_1.json @@ -13,7 +13,7 @@ "risk_group": "hoog-risico AI", "conformity_assessment_body": "niet van toepassing", "systemic_risk": "geen systeemrisico", - "transparency_obligations": "geen transparantieverplichtingen", + "transparency_obligations": "geen transparantieverplichting", "role": "gebruiksverantwoordelijke" }, "instruments": [ diff --git a/tests/api/routes/test_algorithms.py b/tests/api/routes/test_algorithms.py index ddbe0fbb..c45228b7 100644 --- a/tests/api/routes/test_algorithms.py +++ b/tests/api/routes/test_algorithms.py @@ -131,7 +131,7 @@ async def test_post_new_algorithms(client: AsyncClient, mocker: MockFixture, db: risk_group="hoog-risico AI", conformity_assessment_body="beoordeling door derde partij", systemic_risk="geen systeemrisico", - transparency_obligations="geen transparantieverplichtingen", + transparency_obligations="geen transparantieverplichting", role="gebruiksverantwoordelijke", template_id="0", organization_id=1, @@ -179,7 +179,7 @@ async def test_post_new_algorithms_write_system_card( risk_group="hoog-risico AI", conformity_assessment_body="beoordeling door derde partij", systemic_risk="geen systeemrisico", - transparency_obligations="geen transparantieverplichtingen", + transparency_obligations="geen transparantieverplichting", role="gebruiksverantwoordelijke", template_id="", organization_id=1, diff --git a/tests/e2e/test_create_algorithm.py b/tests/e2e/test_create_algorithm.py index b8e95aa0..1a85f369 100644 --- a/tests/e2e/test_create_algorithm.py +++ b/tests/e2e/test_create_algorithm.py @@ -26,7 +26,7 @@ def test_e2e_create_algorithm(page: Page) -> None: page.locator("#role-aanbieder").check() page.locator("#type").select_option("AI-systeem voor algemene doeleinden") page.locator("#risk_group").select_option("verboden AI") - page.locator("#transparency_obligations").select_option("geen transparantieverplichtingen") + page.locator("#transparency_obligations").select_option("geen transparantieverplichting") page.locator("#systemic_risk").select_option("geen systeemrisico") page.locator("#open_source").select_option("geen open-source") page.locator("#conformity_assessment_body").select_option("niet van toepassing") @@ -45,7 +45,7 @@ def test_e2e_create_algorithm_invalid(page: Page): page.goto("/algorithms/new") - page.locator("#transparency_obligations").select_option("geen transparantieverplichtingen") + page.locator("#transparency_obligations").select_option("geen transparantieverplichting") page.locator("#open_source").select_option("geen open-source") diff --git a/tests/schema/test_schema_ai_act_profile.py b/tests/schema/test_schema_ai_act_profile.py index a853415e..77f57c50 100644 --- a/tests/schema/test_schema_ai_act_profile.py +++ b/tests/schema/test_schema_ai_act_profile.py @@ -8,14 +8,14 @@ def test_ai_act_profile_schema_create_new(): open_source="open-source", risk_group="hoog-risico AI", systemic_risk="systeemrisico", - transparency_obligations="transparantieverplichtingen", + transparency_obligations="transparantieverplichting", role="aanbieder", ) assert algorithm_new.type == "AI-systeem" assert algorithm_new.open_source == "open-source" assert algorithm_new.risk_group == "hoog-risico AI" assert algorithm_new.systemic_risk == "systeemrisico" - assert algorithm_new.transparency_obligations == "transparantieverplichtingen" + assert algorithm_new.transparency_obligations == "transparantieverplichting" assert algorithm_new.role == "aanbieder" @@ -25,14 +25,14 @@ def test_ai_act_profile_schema_create_new_no_role(): open_source="open-source", risk_group="hoog-risico AI", systemic_risk="systeemrisico", - transparency_obligations="transparantieverplichtingen", + transparency_obligations="transparantieverplichting", role=None, ) assert algorithm_new.type == "AI-systeem" assert algorithm_new.open_source == "open-source" assert algorithm_new.risk_group == "hoog-risico AI" assert algorithm_new.systemic_risk == "systeemrisico" - assert algorithm_new.transparency_obligations == "transparantieverplichtingen" + assert algorithm_new.transparency_obligations == "transparantieverplichting" assert algorithm_new.role is None @@ -42,14 +42,14 @@ def test_ai_act_profile_schema_create_new_empty_role_list(): open_source="open-source", risk_group="hoog-risico AI", systemic_risk="systeemrisico", - transparency_obligations="transparantieverplichtingen", + transparency_obligations="transparantieverplichting", role=[], ) assert algorithm_new.type == "AI-systeem" assert algorithm_new.open_source == "open-source" assert algorithm_new.risk_group == "hoog-risico AI" assert algorithm_new.systemic_risk == "systeemrisico" - assert algorithm_new.transparency_obligations == "transparantieverplichtingen" + assert algorithm_new.transparency_obligations == "transparantieverplichting" assert algorithm_new.role is None @@ -59,14 +59,14 @@ def test_ai_act_profile_schema_create_new_double_role(): open_source="open-source", risk_group="hoog-risico AI", systemic_risk="systeemrisico", - transparency_obligations="transparantieverplichtingen", + transparency_obligations="transparantieverplichting", role=["aanbieder", "gebruiksverantwoordelijke"], ) assert algorithm_new.type == "AI-systeem" assert algorithm_new.open_source == "open-source" assert algorithm_new.risk_group == "hoog-risico AI" assert algorithm_new.systemic_risk == "systeemrisico" - assert algorithm_new.transparency_obligations == "transparantieverplichtingen" + assert algorithm_new.transparency_obligations == "transparantieverplichting" assert algorithm_new.role == "aanbieder + gebruiksverantwoordelijke" @@ -77,6 +77,6 @@ def test_ai_act_profile_schema_create_new_too_many_roles(): open_source="open-source", risk_group="hoog-risico AI", systemic_risk="systeemrisico", - transparency_obligations="transparantieverplichtingen", + transparency_obligations="transparantieverplichting", role=["aanbieder", "gebruiksverantwoordelijke", "I am too much of a role"], ) diff --git a/tests/schema/test_schema_algorithm.py b/tests/schema/test_schema_algorithm.py index b9b241bc..3d1b875f 100644 --- a/tests/schema/test_schema_algorithm.py +++ b/tests/schema/test_schema_algorithm.py @@ -10,7 +10,7 @@ def test_algorithm_schema_create_new(): open_source="open-source", risk_group="hoog-risico AI", systemic_risk="systeemrisico", - transparency_obligations="transparantieverplichtingen", + transparency_obligations="transparantieverplichting", role=["aanbieder", "gebruiksverantwoordelijke"], organization_id=1, ) @@ -20,7 +20,7 @@ def test_algorithm_schema_create_new(): assert algorithm_new.open_source == "open-source" assert algorithm_new.risk_group == "hoog-risico AI" assert algorithm_new.systemic_risk == "systeemrisico" - assert algorithm_new.transparency_obligations == "transparantieverplichtingen" + assert algorithm_new.transparency_obligations == "transparantieverplichting" assert algorithm_new.role == ["aanbieder", "gebruiksverantwoordelijke"] assert algorithm_new.organization_id == 1 @@ -34,7 +34,7 @@ def test_algorithm_schema_create_new_one_instrument(): open_source="open-source", risk_group="hoog-risico AI", systemic_risk="systeemrisico", - transparency_obligations="transparantieverplichtingen", + transparency_obligations="transparantieverplichting", role="aanbieder", organization_id=1, ) @@ -44,6 +44,6 @@ def test_algorithm_schema_create_new_one_instrument(): assert algorithm_new.open_source == "open-source" assert algorithm_new.risk_group == "hoog-risico AI" assert algorithm_new.systemic_risk == "systeemrisico" - assert algorithm_new.transparency_obligations == "transparantieverplichtingen" + assert algorithm_new.transparency_obligations == "transparantieverplichting" assert algorithm_new.role == ["aanbieder"] assert algorithm_new.organization_id == 1