From 206e19d14e35725ddc269c30168ecb57fe231470 Mon Sep 17 00:00:00 2001 From: Nathan Phelps Date: Tue, 24 Sep 2024 11:19:11 -0400 Subject: [PATCH] i18n update. Removed old file. Removed deprecated variables. Signed-off-by: Nathan Phelps --- src/main/resources/messages_fr.txt | 7 ++++-- .../exchangeapi/ExchangeApiApp.scala | 15 +++--------- tools/Dockerfile-render | 24 ------------------- 3 files changed, 8 insertions(+), 38 deletions(-) delete mode 100755 tools/Dockerfile-render diff --git a/src/main/resources/messages_fr.txt b/src/main/resources/messages_fr.txt index 4b47d414..876f29cf 100644 --- a/src/main/resources/messages_fr.txt +++ b/src/main/resources/messages_fr.txt @@ -143,7 +143,7 @@ invalid.iam.api.key=clé d''API IAM non valide invalid.iam.token=jeton IAM non valide invalid.input.agbot.not.found=Entrée non valide : l''agbot {0} est introuvable invalid.input.message=entrée non valide : {0} -invalid.int.for.name=Valeur entière non valide ''{0}'' spécifiée pour {1} +invalid.int.for.name={0}, valeur d''entier signé 32 bits non valide invalid.logging.level=Niveau de consignation spécifié non valide ''{0}''. invalid.node.type2=Le paramètre d''URL ''nodetype'' doit avoir l''une des valeurs suivantes : {0} invalid.node.type=L''attribut ''nodeType'' doit avoir l''une des valeurs suivantes : {0} @@ -173,7 +173,7 @@ mgmtpol.created=la règle de gestion ''{0}'' a été créée mgmtpol.not.created=la règle de gestion ''{0}'' n''a pas été créée : {1} mgmtpol.not.updated=la règle de gestion ''{0}'' n''a pas été mise à jour : {1} mgmtpol.updated=règle de gestion mise à jour -msgid.must.be.int=L''ID message doit être un entier : {0} +msgid.must.be.int={0}, ''{1}'' n''est pas une valeur d''entier signé 32 bits valide must.specify.service.or.agreementservice=Vous devez spécifier au moins une valeur ''services'' ou ''agreementService''. no.access.to.org=L''appelant n''a pas accès à l''organisation : {0} no.agreements.found.for.agbot=Aucun accord trouvé pour l''agbot ''{0}'' @@ -253,6 +253,7 @@ node.policy.not.deleted=La règle du noeud ''{0}'' n''a pas été supprimée : { node.policy.not.found=La règle du noeud ''{0}'' n''a pas été trouvée node.policy.not.inserted.or.updated=La règle du noeud ''{0}'' n''a pas été insérée ni mise à jour : {1} node.policy.not.updated=La règle du noeud ''{0}'' n''a pas été mise à jour : {1} +node.public.key.not.token=la clé publique est définie pour le noeud ''{0}'', impossible de définir un jeton node.services.updated=Le paramètre registeredServices du noeud ''{0}'' a été mis à jour node.status.deleted=Le statut du noeud a été supprimé node.status.not.deleted=Le statut du noeud ''{0}'' n''a pas été supprimé : {1} @@ -327,6 +328,7 @@ policy.added.or.updated=La règle a été ajoutée ou mise à jour policy.not.inserted.or.updated=La règle du service ''{0}'' n''a pas été insérée ni mise à jour : {1} post.ok=post ok property.type.must.be=La valeur properties.type ''{0}'' doit être l''une des suivantes : {1} +public.key.no.replace=La clé publique d''un noeud ne peut pas être remplacée par une autre clé. reload.successful=Rechargement réussi req.service.has.wrong.arch=Le service requis ''{0}'' est associé à la valeur arch ''{1}'', qui est différente de celle de ce service ''{2}'' req.service.not.in.exchange=Le service requis suivant n''existe pas dans Exchange : org= {0}, url= {1}, version= {2}, arch= {3} @@ -365,6 +367,7 @@ service.policy.not.found=La règle du service ''{0}'' n''a pas été trouvée service.updated=Le service a été mis à jour services.configstate.org.not.specified=Attribut Org non détaillé pour une URL ou une version spécifique dans le corps de la demande. services.configstate.url.not.specified=La version ne peut pas être trouvée si l''attribut url n''est pas spécifié. +services.not.found=les services référencés suivants n''existent pas {0} status.added.or.updated=Le statut a été ajouté ou mis à jour token.cannot.be.empty.string=Le jeton ne doit pas être défini sur une chaîne vide token.must.not.be.blank=Le jeton spécifié ne doit pas être vide diff --git a/src/main/scala/org/openhorizon/exchangeapi/ExchangeApiApp.scala b/src/main/scala/org/openhorizon/exchangeapi/ExchangeApiApp.scala index d82a229d..0712355e 100644 --- a/src/main/scala/org/openhorizon/exchangeapi/ExchangeApiApp.scala +++ b/src/main/scala/org/openhorizon/exchangeapi/ExchangeApiApp.scala @@ -187,17 +187,7 @@ object ExchangeApiApp extends App implicit val system: ActorSystem = ActorSystem("actors", ConfigFactory.load("exchange")) // includes the loglevel - val serviceHost = system.settings.config.getString("api.service.host") - val servicePortEncrypted = - if (system.settings.config.hasPath("pekko.http.server.default-https-port")) - Option(system.settings.config.getInt("pekko.http.server.default-https-port")) - else - None - val servicePortUnencrypted = - if (system.settings.config.hasPath("pekko.http.server.default-http-port")) - Option(system.settings.config.getInt("pekko.http.server.default-http-port")) - else - None + implicit val executionContext: ExecutionContext = system.dispatcher ExchangeApi.defaultExecutionContext = executionContext // need this set in an object that doesn't use DelayedInit @@ -511,6 +501,7 @@ object ExchangeApiApp extends App var serverBindingHttp: Option[Http.ServerBinding] = None var serverBindingHttps: Option[Http.ServerBinding] = None + val serviceHost = system.settings.config.getString("api.service.host") val truststore: Option[String] = try { @@ -576,7 +567,7 @@ object ExchangeApiApp extends App } } - if(servicePortUnencrypted.isDefined) { + if(system.settings.config.hasPath("pekko.http.server.default-http-port")) { Http().newServerAt(serviceHost, -1) // pekko.http.server.default-http-port .bind(routes) //.bind(cors.corsHandler(routes)) .map(_.addToCoordinatedShutdown(hardTerminationDeadline = secondsToWait.seconds)) diff --git a/tools/Dockerfile-render b/tools/Dockerfile-render deleted file mode 100755 index b95f2fcb..00000000 --- a/tools/Dockerfile-render +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -e - -# Do not need this, using the ARG statement in the dockerfile and --build-arg on docker build. - -# Replace the variables in the dockerfile template with their values from the environment - -if [ "$#" -lt 2 ]; then - echo "Usage: $0 template_fname variables..." - exit 1 -fi - -TEMPLATE=$1 -P="$(dirname $TEMPLATE)" -FNAME="$(basename $TEMPLATE .tmpl)" -DEST="$P/$FNAME" -shift - -# cp "$TEMPLATE" "$DEST" - -# for v in ${@:2}; do -for name in $*; do - # replace the name of the variable with the value of the variable - sed -i "s|##${name}##|${!name}|g" "$DEST" -done