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/01/04 13:13:30 UTC

[isis] 08/11: ISIS-1911: updates docs on disabling translation service po

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch v2
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 1a1810f928c6f410d90ce0cbbf9b71690be7a039
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 4 11:40:13 2019 +0000

    ISIS-1911: updates docs on disabling translation service po
---
 .../_rgsvc_presentation-layer-spi_TranslationService.adoc   | 12 ++++++++----
 .../src/main/asciidoc/guides/ugbtb/_ugbtb_i18n.adoc         | 13 ++++++++++++-
 2 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_TranslationService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_TranslationService.adoc
index a846227..c0d50a5 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_TranslationService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_presentation-layer-spi_TranslationService.adoc
@@ -6,7 +6,9 @@
 
 
 
-The `TranslationService` is the cornerstone of Apache Isis' i18n support.  Its role is to be able to provide translated versions of the various elements within the Apache Isis metamodel (service and object classes, properties, collections, actions, action parameters) and also to translate business rule (disable/valid) messages, and exceptions.  These translations provide for both singular and plural forms.
+The `TranslationService` is the cornerstone of Apache Isis' i18n support.
+Its role is to be able to provide translated versions of the various elements within the Apache Isis metamodel (service and object classes, properties, collections, actions, action parameters) and also to translate business rule (disable/valid) messages, and exceptions.
+These translations provide for both singular and plural forms.
 
 
 [NOTE]
@@ -74,9 +76,11 @@ The default implementation of this domain service recognises the following confi
 
 |`isis.services.` +
 `translation.` +
-`po.mode`
-| `read`,`write`
-|Whether to force the `TranslationService` into either read or write mode. +
+`p`
+| `read`,`write`,`disabled`
+|Whether to force the `TranslationService` into either read or write mode.
+It can also be disabled.
+This can be useful for integration tests.
 
 See xref:../ugbtb/ugbtb.adoc#_ugbtb_i18n[i18n support] to learn more about the translation service.
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugbtb/_ugbtb_i18n.adoc b/adocs/documentation/src/main/asciidoc/guides/ugbtb/_ugbtb_i18n.adoc
index 6db178b..96dfabb 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugbtb/_ugbtb_i18n.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugbtb/_ugbtb_i18n.adoc
@@ -629,6 +629,8 @@ However, Apache Isis can be configured to read config files from an xref:../ugbt
 
 Thus, if in `web.xml` the external configuration directory has been set:
 
+TODO: v2: this almost certainly no longer workd, because we now set up configuration very early on.
+
 [source,xml]
 ----
 <context-param>
@@ -639,7 +641,7 @@ Thus, if in `web.xml` the external configuration directory has been set:
 
 Then this directory will be used as the base for searching for translations (rather than the default 'WEB-INF/' directory).
 
-=== Force read mode
+=== Force read mode, or disable
 
 As noted above, if running in prototype mode then `TranslationServicePo` will be in write mode, if in production mode then will be in read mode.
 To force read mode (ie use translations) even if in prototype mode, add the following configuration property to `isis.properties`:
@@ -649,6 +651,15 @@ To force read mode (ie use translations) even if in prototype mode, add the foll
 isis.services.translation.po.mode=read
 ----
 
+It's also possible to disable the service complelely.
+This can sometimes be useful in integration tests.
+
+[source,ini]
+----
+isis.services.translation.po.mode=disables
+----
+----
+
 == Supporting services
 
 The `TranslationServicePo` has a number of supporting/related services.