Skip to content
Snippets Groups Projects
Commit 04ac3987 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

Add i18n

parent f9a8b20c
Branches
Tags
No related merge requests found
duniter4j-elasticsearch.config= duniter4j-es-core.config=
duniter4j.blockIndexerService.detectFork.invalidBlock=[%s] [%s] Detecting fork\: block \#%s -> new hash [%s] duniter4j.blockIndexerService.detectFork.invalidBlock=[%s] [%s] Detecting fork\: block \#%s -> new hash [%s]
duniter4j.blockIndexerService.detectFork.invalidBlockchain=[%s] [%s] Peer has another blockchain (no common blocks \!). Skipping block \#%s - hash [%s]. duniter4j.blockIndexerService.detectFork.invalidBlockchain=[%s] [%s] Peer has another blockchain (no common blocks \!). Skipping block \#%s - hash [%s].
duniter4j.blockIndexerService.detectFork.remoteBlockNotFound=[%s] [%s] Unable to get block \#%s from peer\: %s duniter4j.blockIndexerService.detectFork.remoteBlockNotFound=[%s] [%s] Unable to get block \#%s from peer\: %s
duniter4j.blockIndexerService.detectFork.resync=[%s] [%s] Rollback index from block \#%s, and resync duniter4j.blockIndexerService.detectFork.resync=[%s] [%s] Rollback index from block \#%s, and resync
duniter4j.blockIndexerService.indexBlock=[%s] [%s] Indexing block \#%s - hash [%s] duniter4j.blockIndexerService.indexBlock=[%s] [%s] Indexing block \#%s - hash [%s]
duniter4j.blockIndexerService.indexLastBlocks.invalidBlockchain= duniter4j.blockIndexerService.indexLastBlocks.invalidBlockchain=[%s] [%s] Peer has another blockchain (no common blocks \!). Skipping last blocks indexation.
duniter4j.blockIndexerService.indexLastBlocks.otherPeers.task=Indexing missing blocks of [%s] from other peers duniter4j.blockIndexerService.indexLastBlocks.otherPeers.task=Indexing missing blocks of [%s] from other peers
duniter4j.blockIndexerService.indexLastBlocks.progress=[%s] [%s] Indexing block \#%s / %s (%s%%)... duniter4j.blockIndexerService.indexLastBlocks.progress=[%s] [%s] Indexing block \#%s / %s (%s%%)...
duniter4j.blockIndexerService.indexLastBlocks.remoteParametersError=[%s] Error when calling [/blockchain/parameters]\: %s duniter4j.blockIndexerService.indexLastBlocks.remoteParametersError=[%s] Error when calling [/blockchain/parameters]\: %s
...@@ -34,11 +34,11 @@ duniter4j.config.option.tasks.queueCapacity.description= ...@@ -34,11 +34,11 @@ duniter4j.config.option.tasks.queueCapacity.description=
duniter4j.config.option.temp.directory.description= duniter4j.config.option.temp.directory.description=
duniter4j.config.option.version.description= duniter4j.config.option.version.description=
duniter4j.config.parse.error= duniter4j.config.parse.error=
duniter4j.es.networkService.indexPeer= duniter4j.es.networkService.indexPeer=[%s] Indexing peer [%s]...
duniter4j.es.networkService.indexPeers.progress= duniter4j.es.networkService.indexPeers.progress=[%s] [%s] Indexing peers (%s%%)...
duniter4j.es.networkService.indexPeers.remoteParametersError= duniter4j.es.networkService.indexPeers.remoteParametersError=[%s] Error when calling [/blockchain/parameters]\: %s
duniter4j.es.networkService.indexPeers.succeed= duniter4j.es.networkService.indexPeers.succeed=[%s] [%s] All peers indexed\: found [%s] in [%s ms]
duniter4j.es.networkService.indexPeers.task= duniter4j.es.networkService.indexPeers.task=[%s] [%s] Indexing peers...
duniter4j.executor.task.waitingExecution= duniter4j.executor.task.waitingExecution=
duniter4j.job.stopped= duniter4j.job.stopped=
duniter4j.job.stopping= duniter4j.job.stopping=
......
...@@ -43,7 +43,7 @@ duniter4j.executor.task.waitingExecution= ...@@ -43,7 +43,7 @@ duniter4j.executor.task.waitingExecution=
duniter4j.job.stopped= duniter4j.job.stopped=
duniter4j.job.stopping= duniter4j.job.stopping=
duniter4j.job.success= duniter4j.job.success=
duniter4j.removeServiceUtils.waitThenRetry=Remote request failed [%s]. Waiting then retry [%s/%s]... duniter4j.removeServiceUtils.waitThenRetry=
duniter4j.task.issuer.system=Système duniter4j.task.issuer.system=Système
duniter4j.task.starting=Démarrage du traitement... duniter4j.task.starting=Démarrage du traitement...
duniter4j.threadPool.clusterHealthStatus.changed=Cluster health status changed to [%s]. Executing pending job... duniter4j.threadPool.clusterHealthStatus.changed=
...@@ -40,6 +40,13 @@ import java.util.Locale; ...@@ -40,6 +40,13 @@ import java.util.Locale;
*/ */
public class AdminService extends AbstractService { public class AdminService extends AbstractService {
static {
// Reserve i18n
I18n.n("duniter.admin.event.subject.INFO");
I18n.n("duniter.admin.event.subject.WARN");
I18n.n("duniter.admin.event.subject.ERROR");
}
private final UserEventService userEventService; private final UserEventService userEventService;
private final MailService mailService; private final MailService mailService;
...@@ -86,7 +93,7 @@ public class AdminService extends AbstractService { ...@@ -86,7 +93,7 @@ public class AdminService extends AbstractService {
if (StringUtils.isNotBlank(adminEmail)) { if (StringUtils.isNotBlank(adminEmail)) {
String subjectPrefix = pluginSettings.getMailSubjectPrefix(); String subjectPrefix = pluginSettings.getMailSubjectPrefix();
mailService.sendTextEmail( mailService.sendTextEmail(
I18n.l(locale, "duniter4j.event.subject."+event.getType().name(), subjectPrefix), I18n.l(locale, "duniter.admin.event.subject."+event.getType().name(), subjectPrefix),
event.getLocalizedMessage(locale), event.getLocalizedMessage(locale),
adminEmail); adminEmail);
} }
......
...@@ -140,7 +140,7 @@ public class MessageService extends AbstractService { ...@@ -140,7 +140,7 @@ public class MessageService extends AbstractService {
// Notify recipient // Notify recipient
userEventService.notifyUser(UserEvent.newBuilder(UserEvent.EventType.INFO, UserEventCodes.MESSAGE_RECEIVED.name()) userEventService.notifyUser(UserEvent.newBuilder(UserEvent.EventType.INFO, UserEventCodes.MESSAGE_RECEIVED.name())
.setRecipient(recipient) .setRecipient(recipient)
.setMessage(I18n.n("duniter.user.event.message.received"), issuer, ModelUtils.minifyPubkey(issuer)) .setMessage(I18n.n("duniter.user.event.MESSAGE_RECEIVED"), issuer, ModelUtils.minifyPubkey(issuer))
.setTime(time) .setTime(time)
.setReference(INDEX, INBOX_TYPE, messageId) .setReference(INDEX, INBOX_TYPE, messageId)
.build()); .build());
......
duniter.invitation.cert.received= duniter.user.event.CERT_RECEIVED=You have received a certification from %2$s.
duniter.user.event.CERT_RECEIVED= duniter.user.event.CERT_SENT=Your certification to %2$s was executed.
duniter.user.event.CERT_SENT= duniter.user.event.INVITATION_TO_CERTIFY=%2$s invites you to certify an identity.
duniter.user.event.INVITATION_TO_CERTIFY= duniter.user.event.MEMBER_ACTIVE=Your membership to %1$s has been renewed successfully.
duniter.user.event.MEMBER_ACTIVE= duniter.user.event.MEMBER_JOIN=You are now a member of currency %1$s!
duniter.user.event.MEMBER_JOIN= duniter.user.event.MEMBER_LEAVE=You are not a member anymore of currency %1$s!
duniter.user.event.MEMBER_LEAVE=
duniter.user.event.NODE_BMA_DOWN=Duniter node [%1$s\:%2$s] is DOWN\: no access from ES node [%3$s]. Last connexion at %4$d. Blockchain indexation waiting. duniter.user.event.NODE_BMA_DOWN=Duniter node [%1$s\:%2$s] is DOWN\: no access from ES node [%3$s]. Last connexion at %4$d. Blockchain indexation waiting.
duniter.user.event.NODE_BMA_UP=Duniter node [%1$s\:%2$s] is UP again. duniter.user.event.NODE_BMA_UP=Duniter node [%1$s\:%2$s] is UP again.
duniter.user.event.NODE_STARTED=Node started on cluster Duniter4j ES [%s] duniter.user.event.NODE_STARTED=Your node ES API [%1$s] is UP.
duniter.user.event.TX_RECEIVED= duniter.user.event.TX_RECEIVED=You received a payment from %2$s.
duniter.user.event.TX_SENT= duniter.user.event.TX_SENT=Your payment to %2$s was executed.
duniter.user.event.active= duniter.user.event.MESSAGE_RECEIVED=You received a message from %2$s.
duniter.user.event.cert.received= duniter.admin.event.subject.ERROR=[%s] Error message
duniter.user.event.cert.sent= duniter.admin.event.subject.INFO=[%s] Information message
duniter.user.event.join= duniter.admin.event.subject.WARN=[%s] Warning message
duniter.user.event.leave= duniter4j.ws.user.open=User [%1$s] connecting with id [%2$s] with locale [%3$s]
duniter.user.event.message.received=
duniter.user.event.ms.active=
duniter.user.event.ms.join=
duniter.user.event.ms.leave=
duniter.user.event.tx.received=
duniter.user.event.tx.sent=
duniter4j.event.subject.ERROR=[%s] Error message
duniter4j.event.subject.INFO=[%s] Information message
duniter4j.event.subject.WARN=[%s] Warning message
duniter4j.ws.user.open=User [%s] connecting with id [%s] with locale [%s]
duniter.user.event.CERT_RECEIVED=%2$s vous a certifié (certification prise en compte). duniter.user.event.CERT_RECEIVED=%2$s vous a certifié (certification prise en compte).
duniter.user.event.CERT_SENT=Votre certification de %2$s a été pris en compte. duniter.user.event.CERT_SENT=Votre certification de %2$s a été pris en compte.
duniter.user.event.INVITATION_TO_CERTIFY=%2$s vous invite à certifier une identité. duniter.user.event.INVITATION_TO_CERTIFY=%2$s vous invite à certifier une identité.
duniter.user.event.MEMBER_ACTIVE=Votre adhésion comme membre a bien été renouvellée duniter.user.event.MEMBER_ACTIVE=Votre adhésion comme membre a bien été renouvellée.
duniter.user.event.MEMBER_JOIN=Vous êtes maintenant membre de la monnaie duniter.user.event.MEMBER_JOIN=Vous êtes maintenant membre de la monnaie %1$s !
duniter.user.event.MEMBER_LEAVE=Votre adhésion comme membre à expirée duniter.user.event.MEMBER_LEAVE=Votre adhésion comme membre à expirée.
duniter.user.event.NODE_BMA_DOWN=Noeud Duniter [%1$s\:%2$s] non joignable, depuis le noeud ES API [%3$s]. Dernière connexion à %4$d. Indexation de blockchain en attente. duniter.user.event.NODE_BMA_DOWN=Noeud Duniter [%1$s\:%2$s] non joignable, depuis le noeud ES API [%3$s]. Dernière connexion à %4$d. Indexation de blockchain en attente.
duniter.user.event.NODE_BMA_UP=Noeud Duniter [%1$s\:%2$s] à nouveau accessible. duniter.user.event.NODE_BMA_UP=Noeud Duniter [%1$s\:%2$s] à nouveau accessible.
duniter.user.event.NODE_STARTED=Noeud ES API démarré sur le cluster Duniter [%1$s] duniter.user.event.NODE_STARTED=Noeud ES API [%1$s] est démarré.
duniter.user.event.TX_RECEIVED=Vous avez recu un paiement de %2$s duniter.user.event.TX_RECEIVED=Vous avez recu un paiement de %2$s.
duniter.user.event.TX_SENT=Votre paiement à %2$s a bien été executé duniter.user.event.TX_SENT=Votre paiement à %2$s a bien été executé.
duniter.user.event.message.received=Vous avez reçu un message de %2$s duniter.user.event.MESSAGE_RECEIVED=Vous avez reçu un message de %2$s.
duniter4j.event.subject.ERROR=%s Message d'erreur duniter.admin.event.subject.ERROR=%s Message d'erreur
duniter4j.event.subject.INFO=%s Message d'information duniter.admin.event.subject.INFO=%s Message d'information
duniter4j.event.subject.WARN=%s Message d'avertissement duniter.admin.event.subject.WARN=%s Message d'avertissement
duniter4j.ws.user.open=Utilisateur [%1$s] connecté id\=[%2$s] sur la locale [%3$s] duniter4j.ws.user.open=Utilisateur [%1$s] connecté id\=[%2$s] sur la locale [%3$s]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment