update translation
gitea/passerelle/pipeline/head This commit looks good Details

Carl connector implementation (#86683)
This commit is contained in:
Yann Weber 2024-03-07 17:36:11 +01:00
parent f32d06b474
commit 0f75026c9a
3 changed files with 272 additions and 23 deletions

View File

@ -575,7 +575,7 @@ class Carl(BaseResource, HTTPResource):
response = method_fun(url, **kwargs)
except requests.RequestException as expt:
raise APIError(
_('Error sending request to Carl: %s') % exception_to_text(expt),
_('Carl interaction error: %s') % exception_to_text(expt),
log_error=True,
err_code='http-error',
data={

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Passerelle 0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-03-05 16:59+0100\n"
"POT-Creation-Date: 2024-03-07 17:35+0100\n"
"PO-Revision-Date: 2024-02-14 16:02+0100\n"
"Last-Translator: Frederic Peters <fpeters@entrouvert.com>\n"
"Language: fr\n"
@ -99,23 +99,23 @@ msgstr "Jeton daccès aux API (API token)"
#: apps/arpege_ecp/models.py apps/astech/models.py apps/astre_rest/models.py
#: apps/astregs/models.py apps/atal/models.py apps/atal_rest/models.py
#: apps/atos_genesys/models.py apps/bbb/models.py apps/bdp/models.py
#: apps/clicrdv/models.py apps/esabora/models.py apps/esirius/models.py
#: apps/esup_signature/models.py apps/family/models.py apps/gdc/models.py
#: apps/gesbac/models.py apps/litteralis/models.py apps/matrix42/models.py
#: apps/okina/models.py apps/r2p/models.py apps/signal_arretes/models.py
#: apps/sne/models.py apps/soap/models.py apps/solis/models.py
#: apps/vivaticket/models.py contrib/caluire_axel/models.py
#: contrib/dpark/models.py contrib/esirius_swi/models.py
#: contrib/fake_family/models.py contrib/gdema/models.py
#: contrib/greco/models.py contrib/grenoble_gru/models.py
#: contrib/isere_ens/models.py contrib/isere_esrh/models.py
#: contrib/iws/models.py contrib/lille_kimoce/models.py
#: contrib/mdph13/models.py contrib/nantes_scrib/models.py
#: contrib/planitech/models.py contrib/rsa13/models.py
#: contrib/sigerly/models.py contrib/solis_afi_mss/models.py
#: contrib/solis_apa/models.py contrib/teamnet_axel/models.py
#: contrib/toulouse_axel/models.py contrib/toulouse_foederis/models.py
#: contrib/toulouse_smart/models.py
#: apps/carl/models.py apps/clicrdv/models.py apps/esabora/models.py
#: apps/esirius/models.py apps/esup_signature/models.py apps/family/models.py
#: apps/gdc/models.py apps/gesbac/models.py apps/litteralis/models.py
#: apps/matrix42/models.py apps/okina/models.py apps/r2p/models.py
#: apps/signal_arretes/models.py apps/sne/models.py apps/soap/models.py
#: apps/solis/models.py apps/vivaticket/models.py
#: contrib/caluire_axel/models.py contrib/dpark/models.py
#: contrib/esirius_swi/models.py contrib/fake_family/models.py
#: contrib/gdema/models.py contrib/greco/models.py
#: contrib/grenoble_gru/models.py contrib/isere_ens/models.py
#: contrib/isere_esrh/models.py contrib/iws/models.py
#: contrib/lille_kimoce/models.py contrib/mdph13/models.py
#: contrib/nantes_scrib/models.py contrib/planitech/models.py
#: contrib/rsa13/models.py contrib/sigerly/models.py
#: contrib/solis_afi_mss/models.py contrib/solis_apa/models.py
#: contrib/teamnet_axel/models.py contrib/toulouse_axel/models.py
#: contrib/toulouse_foederis/models.py contrib/toulouse_smart/models.py
msgid "Business Process Connectors"
msgstr "Connecteurs métiers"
@ -1153,9 +1153,10 @@ msgstr "Date de création"
msgid "Anything"
msgstr "Informations additionnelles"
#: apps/base_adresse/models.py apps/bdp/models.py apps/esabora/models.py
#: apps/gdc/models.py apps/okina/models.py apps/photon/models.py
#: apps/solis/models.py contrib/gdema/models.py contrib/solis_afi_mss/models.py
#: apps/base_adresse/models.py apps/bdp/models.py apps/carl/models.py
#: apps/esabora/models.py apps/gdc/models.py apps/okina/models.py
#: apps/photon/models.py apps/solis/models.py contrib/gdema/models.py
#: contrib/solis_afi_mss/models.py
msgid "Service URL"
msgstr "URL du webservice"
@ -1671,6 +1672,254 @@ msgstr ""
"Impossible de convertir le champ %s=%r : la valeur nest ni une date ni une "
"date/heure valide"
#: apps/carl/models.py
msgid "Carl object creation"
msgstr "Création dun objet Carl"
#: apps/carl/models.py
msgid "Allows carl object (and related objects) creation"
msgstr "Permet la création dun objet Carl avec ses objets liés"
#: apps/carl/models.py
msgid "The attributes of the Carl object we want to create"
msgstr "Les attributs de lobjet Carl que l'on souhaite créer"
#: apps/carl/models.py
msgid "The list of related object we want to create/link when creating"
msgstr ""
"La liste des objets liés que lon veut ajouter/lier lors de la création"
#: apps/carl/models.py
msgid "Describe the entity we want to create/link"
msgstr "Décrit lobjet que lon veut créer/lier"
#: apps/carl/models.py
msgid "A Carl object name"
msgstr "Un nom dobjet Carl"
#: apps/carl/models.py
msgid "The attributes of the Carl object"
msgstr "Les attributs de lobjet Carl"
#: apps/carl/models.py
msgid "The list of linked existing entities"
msgstr "La liste des objets liés éxistants"
#: apps/carl/models.py
msgid "The entity type name"
msgstr "Le nom du type dobjet"
#: apps/carl/models.py
msgid "The Carl's id of the entity"
msgstr "Lidentifiant de lobjet Carl"
#: apps/carl/models.py
msgid "Fetch the Carl's id from given filters"
msgstr "Récupère lidentifiant Carl en fonction des filtres indiqués"
#: apps/carl/models.py
msgid "Filter on given field name/value"
msgstr "Filtre en fonction dun nom de champ et dune valeur attendue"
#: apps/carl/models.py
msgid "Base webservice URL (such as https://carlsource.server.com/gmaoCS02/"
msgstr ""
"URL racine du service web ( par exemple https://carlsource.example.net/"
"gmaoCS02/ )"
#: apps/carl/models.py
msgid "Carl token authentication username"
msgstr "Nom dutilisateur pour lauthentification par jeton"
#: apps/carl/models.py
msgid "Carl token authentication password"
msgstr "Mot de passe pour lauthentification par jeton"
#: apps/carl/models.py
msgid "Carl"
msgstr "Carl"
#: apps/carl/models.py
msgid "Create a new entity"
msgstr "Créer un nouvel objet"
#: apps/carl/models.py
msgid "A field from the entity or from a related entity"
msgstr "Un champ de lobjet ou dun objet lié"
#: apps/carl/models.py
msgid ""
"Field present in both \"linked\" and \"related\": cannot be specified twice"
msgstr ""
"Champ présent dans \"linked\" et \"related\" : un champ pas être présent à "
"deux endroits"
#: apps/carl/models.py
msgid "Cannot give both \"id\" and \"filter\" keys"
msgstr ""
"Il nest pas possible denvoyer simultanément des valeurs pour \"id\" et "
"\"filter\""
#: apps/carl/models.py
msgid "A linked field must have an \"id\" or a \"filter\""
msgstr "Un champ lié doit avoir un \"id\" ou un \"filter\""
#: apps/carl/models.py
#, python-format
msgid "Error with specified linked fields: %s"
msgstr "Une erreur est survenue avec le champ lié : %s"
#: apps/carl/models.py
#, python-format
msgid ""
"More than one (%d) entities returned with given filters (%s) for field %r"
msgstr ""
"Plusieurs ( %d ) objets ont été renvoyés en filtrant ( %s ) le champ %r"
#: apps/carl/models.py
msgid " AND "
msgstr " ET "
#: apps/carl/models.py
#, python-format
msgid "No entities returned with given filters (%s) for field %r"
msgstr "Aucun objet na été renvoyé en filtrant ( %s ) le champ %r"
#: apps/carl/models.py
#, python-format
msgid "Error looking for linked fields: %s"
msgstr "Une erreur est survenue lors de la récupération du champ lié : %s"
#: apps/carl/models.py
#, python-format
msgid "Error with related fields %s"
msgstr "Erreur sur le champ lié %s"
#: apps/carl/models.py
#, python-format
msgid "Error with field %s (%s)"
msgstr "Erreur sur le champ %s ( %s )"
#: apps/carl/models.py
#, python-format
msgid ""
"Error creating entity: %s. Then error during related entities rollback: %s"
msgstr ""
"Erreur lors de la création de l'objet : %s. Ensuite une erreur est survenue "
"durant le rollback des entités liés : %s"
#: apps/carl/models.py
msgid "The q parameter will filters on values from given attribute"
msgstr "Le paramètre q permet de filtrer les valeurs de lattribut indiqué"
#: apps/carl/models.py
msgid "Only return the entity with corresponding ID"
msgstr "Renvoie uniquement lobjet avec lID correspondant"
#: apps/carl/models.py
msgid "Filter returned entity with given value"
msgstr "Filtre les objets renvoyés en fonction de la valeur indiquée"
#: apps/carl/models.py
msgid ""
"Comma separated list of fieldname pointing on foreign entity we want data to "
"be merged in the reply"
msgstr ""
"Liste de noms de champ, séparés par des virgules, faisant référence à une "
"entité dont on souhaite récupérer les données dans la réponse"
#: apps/carl/models.py
#, python-format
msgid "Error sending deletion request (%s/%s) to Carl: %s"
msgstr ""
"Erreur lors de lenvoi de la requête de suppression ( %s/%s ) à Carl : %s"
#: apps/carl/models.py
#, python-format
msgid "HTTP error (%%(status)d) during entity (%s/%s) deletion: %%(detail)s"
msgstr ""
"Erreur HTTP ( %%(status)d ) pendant la supression de lobjet ( %s/%s ) : "
"%%(detail)s"
#: apps/carl/models.py
#, python-format
msgid "Error during entities cleanup: %s"
msgstr "Erreur pendant le rollback des objets : %s"
#: apps/carl/models.py
#, python-format
msgid "Carl interaction error: %s"
msgstr "Error lors de lintéraction avec Carl : %s"
#: apps/carl/models.py
#, python-format
msgid "Invalid reply from Carl, unable to parse JSON: %s"
msgstr "Réponse invalide de Carl, erreur danalyse du JSON : %s"
#: apps/carl/models.py
#, python-format
msgid "Carl replies with HTTP %(status)d but errors set: %(detail)s"
msgstr ""
"Carl a répondu avec un code HTTP %(status)d mais lindicateur derreur est "
"présent : %(detail)s"
#: apps/carl/models.py
#, python-format
msgid "Unexpected JSON received , without data (HTTP %(status)d): %(detail)s"
msgstr ""
"Le JSON reçu ne contient pas le champ « data » attendu ( HTTP %(status)d : "
"%(detail)s"
#: apps/carl/models.py
#, python-format
msgid "Got an HTTP error code (%(status)d) from Carl: %(detail)s"
msgstr "Un code derreur HTTP ( %(status)d ) a été reçu de Carl : %(detail)s"
#: apps/carl/models.py
msgid "Trying to renew authentication token when no login/password set"
msgstr ""
"Tentative de renouvellement du token dauthentification alors que le nom "
"dutilisateur et/ou le mot de passe ne sont pas indiqués"
#: apps/carl/models.py
#, python-format
msgid "Failed to fetch token: %s"
msgstr "La récupération du token a échoué : %s"
#: apps/carl/models.py
msgid ""
"Not authorized (HTTP 401) when trying to authenticate: bad credentials ?"
msgstr ""
"Non autorisé (HTTP 401) reçu lors de la tentative dauthentification : une "
"erreur dans les identifiants ?"
#: apps/carl/models.py
#, python-format
msgid "Got an HTTP error code (%d) when trying to authenticate"
msgstr ""
"Un code derreur HTTP ( %d ) a été reçu durant la tentative "
"dauthentification"
#: apps/carl/models.py
#, python-format
msgid "Unexpected reply from Carl when authenticating. JSON invalid: %s"
msgstr "Une réponse inattendue a été reçue de Carl. Le JSON est invalide : %s"
#: apps/carl/models.py
#, python-format
msgid "Got an invalid token when authentication on Carl: %s"
msgstr "Le token renvoyé par Carl n'est pas valide : %s"
#: apps/carl/models.py
#, python-format
msgid "Missing information: %s"
msgstr "Information manquante : %s"
#: apps/carl/models.py
#, python-format
msgid "Expected \"expires_in\" to be an int but got %r"
msgstr "La valeur \"expires_in\" doit être un entier mais a pour valeur %r"
#: apps/cartads_cs/models.py
msgid "WSDL Base URL"
msgstr "URL de base des WSDL"

View File

@ -1223,7 +1223,7 @@ def test_carl_timeout(app, carl_conn, timeout_expt):
assert (
resp.json['err_desc']
== 'Error creating entity: \
Error sending request to Carl: timeout. \
Carl interaction error: timeout. \
Then error during related entities rollback: \
Error during entities cleanup: Error sending deletion request (%s/%s) to Carl: timeout'
% (fake['data']['type'], fake['data']['id'])