branch develop updated (17348adb -> 050ad685)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git from 17348adb fixes #151 I cannot delete my account new 73c393df fixes #46 Remove DevMode new 050ad685 fixes #130 sauvegarde de la langue de l'UI The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 050ad68591ee485b8231e8e8f415a41af7d76591 Author: Kevin Morin <morin@codelutin.com> Date: Tue Oct 3 11:45:48 2017 +0200 fixes #130 sauvegarde de la langue de l'UI commit 73c393df3094b57440fd58cf3a6806155a3162c2 Author: Kevin Morin <morin@codelutin.com> Date: Tue Oct 3 11:32:22 2017 +0200 fixes #46 Remove DevMode Summary of changes: pollen-services/src/main/config/PollenServices.ini | 8 ------ .../pollen/services/service/mail/EmailService.java | 30 ++++++++++++---------- pollen-ui-riot-js/src/main/web/i18n/en.json | 2 +- pollen-ui-riot-js/src/main/web/js/Session.js | 3 ++- 4 files changed, 19 insertions(+), 24 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 73c393df3094b57440fd58cf3a6806155a3162c2 Author: Kevin Morin <morin@codelutin.com> Date: Tue Oct 3 11:32:22 2017 +0200 fixes #46 Remove DevMode --- pollen-services/src/main/config/PollenServices.ini | 8 ------ .../pollen/services/service/mail/EmailService.java | 30 ++++++++++++---------- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/pollen-services/src/main/config/PollenServices.ini b/pollen-services/src/main/config/PollenServices.ini index 0dee8b98..91ebed00 100644 --- a/pollen-services/src/main/config/PollenServices.ini +++ b/pollen-services/src/main/config/PollenServices.ini @@ -1,13 +1,5 @@ description = PollenServicesConfig.description -[option devMode] -description = pollen.configuration.devMode -key = pollen.devMode -type = Boolean -defaultValue = false -transient = true -final = true - [option dataDirectory] description = pollen.configuration.data.directory key = pollen.data.directory diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/EmailService.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/EmailService.java index f2d15d13..fbc640e1 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/EmailService.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/EmailService.java @@ -299,19 +299,7 @@ public class EmailService extends PollenServiceSupport { } public void send(PollenMail mail) { - if (getPollenServiceConfig().isDevMode()) { - if (log.isInfoEnabled()) { - log.info("an email should have been sent if not in devMode: tos = " + - mail.getTos() + ". subject = '" + mail.getSubject() + "'. body = \n" + getBody(mail)); - } - if (log.isWarnEnabled()) { - if (!mail.isRecipientProvided()) { - log.warn("email has no recipient, would not have been sent " + mail); - } - } - } else { - doSend(mail); - } + doSend(mail); } public void resendEmails() { @@ -389,7 +377,20 @@ public class EmailService extends PollenServiceSupport { protected void doSend(String subject, String body, Collection<String> tos, Collection<String> bccs) throws EmailException { - PollenServicesConfig applicationConfig = getPollenServiceConfig(); + PollenServicesConfig applicationConfig = getPollenServiceConfig(); + + if (applicationConfig.getSmtpHost() == null) { + if (log.isInfoEnabled()) { + log.info("an email should have been sent if not in devMode: tos = " + + tos + ". subject = '" + subject + "'. body = \n" + body); + } + if (log.isWarnEnabled()) { + if ((tos == null || tos.isEmpty()) && (bccs == null || bccs.isEmpty())) { + log.warn("email has no recipient, would not have been sent"); + } + } + + } else { Email newEmail = new SimpleEmail(); newEmail.setHostName(applicationConfig.getSmtpHost()); @@ -406,6 +407,7 @@ public class EmailService extends PollenServiceSupport { } newEmail.setMsg(body); newEmail.send(); + } } protected String getBody(PollenMail mail) { -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 050ad68591ee485b8231e8e8f415a41af7d76591 Author: Kevin Morin <morin@codelutin.com> Date: Tue Oct 3 11:45:48 2017 +0200 fixes #130 sauvegarde de la langue de l'UI --- pollen-ui-riot-js/src/main/web/i18n/en.json | 2 +- pollen-ui-riot-js/src/main/web/js/Session.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pollen-ui-riot-js/src/main/web/i18n/en.json b/pollen-ui-riot-js/src/main/web/i18n/en.json index 30336511..864b4f6e 100644 --- a/pollen-ui-riot-js/src/main/web/i18n/en.json +++ b/pollen-ui-riot-js/src/main/web/i18n/en.json @@ -203,7 +203,7 @@ "signcheck_validating": "Your account is validating...", "signcheck_validating_error": "Your account could not be validated, try to send a new invitation.", "signcheck_validating_success": "Your account was validated! You can now sign in. Enjoy!", - "signin_title": "Connexion", + "signin_title": "Connection", "signin_login": "Email", "signin_login_placeholder": "Enter your email", "signin_password": "Password", diff --git a/pollen-ui-riot-js/src/main/web/js/Session.js b/pollen-ui-riot-js/src/main/web/js/Session.js index 949e046b..e1c16257 100644 --- a/pollen-ui-riot-js/src/main/web/js/Session.js +++ b/pollen-ui-riot-js/src/main/web/js/Session.js @@ -59,7 +59,7 @@ class Session { // pour contenir l"utillisateur connecté this.user = null; - let lang = navigator.language || navigator.userLanguage; + let lang = localStorage && localStorage.userLanguage || navigator.language || navigator.userLanguage; if (lang.indexOf("en") === 0) { this.locale = "en"; } else { @@ -123,6 +123,7 @@ class Session { changeLocale(locale) { this.locale = locale; + localStorage.userLanguage = locale; bus.trigger("locale", this.locale); } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm