You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2019/12/03 09:42:18 UTC
[isis] 04/08: ISIS-2194: always logs translations on shutdown. Also
simplifies init logic, whether to stay in write mode
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 7d563039ac6c24ec9ab16972e7b50dd647893d1d
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Dec 3 06:53:42 2019 +0000
ISIS-2194: always logs translations on shutdown. Also simplifies init logic, whether to stay in write mode
... by ignoring concept of in prototype or test, simply stay in write mode based on the configured translationMode. The rationale is that this is easy to configure in Spring Boot-based integration tests.
---
.../isis/runtime/services/i18n/po/TranslationServicePo.java | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/core/runtime-services/src/main/java/org/apache/isis/runtime/services/i18n/po/TranslationServicePo.java b/core/runtime-services/src/main/java/org/apache/isis/runtime/services/i18n/po/TranslationServicePo.java
index e5b8188..fb2f923 100644
--- a/core/runtime-services/src/main/java/org/apache/isis/runtime/services/i18n/po/TranslationServicePo.java
+++ b/core/runtime-services/src/main/java/org/apache/isis/runtime/services/i18n/po/TranslationServicePo.java
@@ -65,11 +65,9 @@ public class TranslationServicePo implements TranslationService {
return;
}
- final boolean prototypeOrTest = isPrototypeOrTest();
-
final boolean forceRead = (Mode.READ == translationMode);
- if(prototypeOrTest && !forceRead) {
+ if(!forceRead) {
// remain in write mode
return;
}
@@ -86,9 +84,7 @@ public class TranslationServicePo implements TranslationService {
@PreDestroy
public void shutdown() {
- if(systemEnvironment.isPrototyping() && !systemEnvironment.isUnitTesting()) {
- po.logTranslations();
- }
+ po.logTranslations();
}
@Override